Commit graph

36294 commits

Author SHA1 Message Date
Petr Špaček
9b2bf0f8be
Pretty-print grammar for zones
It turns out the tree of dictionaries is not the best structure to
represent our grammar, unfortunatelly. The problem is that "zone" has
several context-dependent variants which change meaning of "zone" based
on inner field "type".

Redesigning the whole structure does not seem to be worth, so I settled
on this terrible hack.

(cherry picked from commit 0392144e99)
2022-07-01 10:21:05 +02:00
Petr Špaček
c4133e8779
Add zone definitions into the view grammar
I cannot see a reasonable way to achieve this without the hack in this
commit.

(cherry picked from commit 435cbb61ba)
2022-07-01 10:21:05 +02:00
Petr Špaček
bc729e39da
Add option to suppress grammar rendering
A new flag
.. namedconf:statement::
   :suppress_grammar:
suppresses pretty-printing grammar.

It is useful mostly for zones because each zone has it's own grammar, so
printing all of them at once usually does not make sense.

(cherry picked from commit 1f5bc4fe3b)
2022-07-01 10:21:05 +02:00
Petr Špaček
243ae3b6a7
Remove auto-generated rst files in repo in favour of grammar pretty printer
(cherry picked from commit 0bbbdc6244)
2022-07-01 10:20:56 +02:00
Petr Špaček
f34c1034f2
Warn about experimental and deprecated options
(cherry picked from commit 7b4ad8a3ff)
2022-07-01 10:00:28 +02:00
Petr Špaček
3a692b068c
Render statement's grammar
This is replacement for auto-generated *.rst files stored in the repo.

(cherry picked from commit c6fe8970f6)
2022-07-01 10:00:28 +02:00
Petr Špaček
2df4072d43
Render list of blocks accepting a given statement
(cherry picked from commit eba3b1ad16)
2022-07-01 10:00:28 +02:00
Petr Špaček
a486e6e294
Detect unsupported statement:: directives with multiple names
(cherry picked from commit d61d998e3b)
2022-07-01 10:00:28 +02:00
Petr Špaček
4c53d6f906
Warn about statements not found in the grammar
(cherry picked from commit ebe6ede2ec)
2022-07-01 10:00:28 +02:00
Petr Špaček
b11b1c6414
Warn about statements in grammar not described in docs
Skip over obsolete options.

(cherry picked from commit cbad1803a5)
2022-07-01 10:00:27 +02:00
Petr Špaček
7fe582629a
Give Sphinx configuration domains access to grammar
(cherry picked from commit 1c6f2c5ad1)
2022-07-01 10:00:27 +02:00
Petr Špaček
160428a0f7
Add helper to unify options and zone block grammars
A helper is needed to combine cfg_test output for generic options and
all the type-dependent zone block variants.

(cherry picked from commit a691ebd0c9)
2022-07-01 10:00:27 +02:00
Petr Špaček
ec9af7dbc7
Add pretty printer for JSON grammar
It produces the same format as cfg_test --grammar. The advantage is that
it allows to print any node in configuration the tree, not just whole
blocks.

(cherry picked from commit 190004e46c)
2022-07-01 10:00:27 +02:00
Petr Špaček
aabdff9551
Add utility to search for context-dependent configuration statements
The utility detects statements which use the same name (e.g.
max-zone-ttl) but use different grammar in different contexts. These
typically need special case in docs.

(cherry picked from commit 8960d51aa3)
2022-07-01 10:00:27 +02:00
Petr Špaček
a78b461653
Add a new library to parse grammar format produced by cfg_test
It transforms named.conf/rndc.conf grammar from text format into Python
dictionary. This allows granular access to grammar elements.

Beware: It heavity depens on cfg_test output format!
(cherry picked from commit df08982930)
2022-07-01 10:00:27 +02:00
Petr Špaček
e9d21cee3b
Add rndc.conf grammar into doc/misc
It uses the same mechanism as all other grammars, but the file is named
differently to distinguish it from named.conf grammars.

(cherry picked from commit fb474de3ab)
2022-07-01 10:00:27 +02:00
Petr Špaček
214da1de67
Un-format grammar files in doc/misc
The next commit is going to add parser for ISC configuration format.
To simplify the parser the grammar files in doc/misc are no longer
line-wrapped as handling it would make the grammar parser unnecessairly
complicated.

This affects visible output in the ARM, but in the end we are going to
replace the auto-generated .rst files with grammar pretty printed, so
formatting of these files does not matter in practical terms.

(cherry picked from commit 699570cdec)
2022-07-01 10:00:20 +02:00
Petr Špaček
a46f671a30
Add missing comment markers to doc/misc/ grammar files
These files can be consumed by scripts, so obviously missing comment
markers wreak havoc.

(cherry picked from commit af3683f436)
2022-07-01 09:26:18 +02:00
Petr Špaček
19e40f34bc Merge branch 'sgoldlust/arm-tag-query-transfer-v9_18' into 'v9_18'
Add tags and short descriptions for query and transfer statements [v9_18]

See merge request isc-projects/bind9!6504
2022-06-30 16:16:00 +00:00
Petr Špaček
364a15da16
Accept rst syntax in .. statement:: short: text
Nested rst syntax is now parsed and rendered. E.g.:

.. namedconf:statement:: example
   :short: Use ``this`` **cool** syntax!

(cherry picked from commit 563eb8e1b9)
2022-06-30 18:12:01 +02:00
Petr Špaček
5513f47e53
Disambiguate address_match_list link anchor
Let's keep just the :term: produced by grammar glossary.

(cherry picked from commit 0e7ca5b5e0)
2022-06-30 18:12:01 +02:00
Suzanne Goldlust
d4b1916a59
Add the :tags: and :short: descriptions for the category "transfer"
(cherry picked from commit 3cf976bd78)
2022-06-30 18:12:01 +02:00
Suzanne Goldlust
51057d3c85
Add the :tags: and :short: descriptions for the category "query"
(cherry picked from commit 7187a5cf77)
2022-06-30 18:12:01 +02:00
Petr Špaček
62958590cd
Resurrect DNS NOTIFY chapter in the ARM
It was accidentally removed in the heat of
25eb91d23c.

(cherry picked from commit 2630cf8e76)
2022-06-30 18:11:54 +02:00
Michal Nowak
783be731bf Merge branch '2371-add-stress-testing-with-rpz-v9_18' into 'v9_18'
[v9_18] Add stress testing with RPZ

See merge request isc-projects/bind9!6497
2022-06-28 19:47:05 +00:00
Michal Nowak
46a8cf94c6
Add stress testing with RPZ
(cherry picked from commit d272574653)
2022-06-28 20:37:40 +02:00
Petr Špaček
2de747d246 Merge branch '3408-drop-debian-9-stretch-v9_18' into 'v9_18'
Drop support for Debian 9 (Stretch) [v9_18]

See merge request isc-projects/bind9!6495
2022-06-28 15:57:20 +00:00
Petr Špaček
ccb608ebea
Declare Debian 9 (Stretch) community-maintained
(cherry picked from commit 4ce1f25210)
2022-06-28 17:56:34 +02:00
Petr Špaček
85de8f8c15
Drop Debian 9 (Stretch) from CI
(cherry picked from commit aa86a8bcf0)
2022-06-28 17:56:34 +02:00
Artem Boldariev
07cbd5500e Merge branch '3415-update-http-listeners-on-reconfig-v9-18' into 'v9_18'
[Backport to 9.18]: Update HTTP listeners settings on reconfiguration

See merge request isc-projects/bind9!6494
2022-06-28 14:27:31 +00:00
Artem Boldariev
69e1d3804e doth test: extend with HTTP endpoints reconfiguration check
This commit add a check which verifies that HTTP endpoints are being
picked up properly by the BIND instance on a reconfiguration.

(cherry picked from commit 7822670d0f)
2022-06-28 16:38:21 +03:00
Artem Boldariev
12a6fafae2 Update CHANGES [GL #3415]
Mention that the settings are now applied properly on reconfiguration.

(cherry picked from commit 502c78c339)
2022-06-28 16:38:18 +03:00
Artem Boldariev
b6b07c5646 Update the set of HTTP endpoints on reconfiguration
This commit ensures that on reconfiguration the set of HTTP
endpoints (=paths) is being updated within HTTP listeners.

(cherry picked from commit d2e13ddf22)
2022-06-28 16:37:31 +03:00
Artem Boldariev
bb8ba2c027 Update max concurrent streams limit in HTTP listeners on reconfig
This commit ensures that HTTP listeners concurrent streams limit gets
updated properly on reconfiguration.

(cherry picked from commit e72962d5f1)
2022-06-28 16:37:31 +03:00
Artem Boldariev
1ccbb24078 Update HTTP listeners quotas on reconfiguration
This commit ensures that on reconfiguration a proper value for HTTP
connections limit is picked up.

The commit also refactors how listeners settings are updated so that
there is less code duplication.

(cherry picked from commit a2379135fa)
2022-06-28 16:37:31 +03:00
Artem Boldariev
63a4c12227 Store HTTP quota size inside a listenlist instead of the quota
This way only quota size is passed to the interface/listener
management code instead of a quota object. Thus, we can implement
updating the quota object size instead of recreating the object.

(cherry picked from commit 3f0b310772)
2022-06-28 16:37:31 +03:00
Matthijs Mekking
1330732872 Merge branch 'matthijs-dnssec-policy-defaults-in-config-dot-c-v9_18' into 'v9_18'
[v9_18] Move built-in dnssec-policies into defaultconf

See merge request isc-projects/bind9!6493
2022-06-28 13:30:26 +00:00
Matthijs Mekking
35f6cabab4 Add isccfg duration utility functions
Add function isccfg_duration_toseconds and isccfg_parse_duration to get
rid of code duplication.

(cherry picked from commit d8dae61832)
2022-06-28 14:37:26 +02:00
Matthijs Mekking
feaf3950fd Fix a bug in the duration_fromtext function
The function actually did not enforce that the duration string starts
with a P (or p), just that there is a P (or p) in the string.

(cherry picked from commit 8e18fa5874)
2022-06-28 14:37:19 +02:00
Matthijs Mekking
8af88d4111 Also inherit from "default" for "insecure" policy
Remove the duplication from the defaultconf and inherit the values
not set in the "insecure" policy from the "default" policy. Therefore,
we must insist that the first read built-in policy is the default one.

(cherry picked from commit c2a7950417)
2022-06-28 14:37:10 +02:00
Matthijs Mekking
bd15b7c3c6 Add change entry for dnssec-policy in defaultconf
(cherry picked from commit 80b55f9cfa)
2022-06-28 14:37:02 +02:00
Matthijs Mekking
fd34ea8523 Nit changes in keymgr and kasp
Use the ISC_MAX define instead of "x = a > b ? a : b" paradigm.

Remove an unneeded include.

(cherry picked from commit 5d6f0de84b)
2022-06-28 14:36:53 +02:00
Matthijs Mekking
e16cfce91d When loading dnssec-policies, inherit from default
Most of the settings (durations) are already inheriting from the default
because they use the constants from lib/dns/kasp.h. We need them as
constants so we can use them in named-checkconf to verify the policy
parameters.

The NSEC(3) parameters and keys should come from the actual default
policy. Change the call to cfg_kasp_fromconfig() to include the default
kasp. We also no longer need to corner case where config is NULL we load
the built-in policy: the built-in policies are now loaded when config is
set to named_g_config.

Finally, add a debug log (it is useful to see which policies are being
loaded).

(cherry picked from commit 20acb8d3a3)
2022-06-28 14:36:45 +02:00
Matthijs Mekking
03c0c72aeb Store built-in dnssec-policies in defaultconf
Update the defaultconf with the built-in policies. These will now be
printed with "named -C".

Change the defines in kasp.h to be strings, so they can be concatenated
in the defaultconf. This means when creating a kasp structure, we no
longer initialize the defaults (this is fine because only kaspconf.c
uses dns_kasp_create() and it inherits from the default policy).

In kaspconf.c, the default values now need to be parsed from string.

Introduce some variables so we don't need to do get_duration multiple
times on the same configuration option.

Finally, clang-format-14 decided to do some random formatting changes.

(cherry picked from commit 5ff414e986)
2022-06-28 14:36:38 +02:00
Matthijs Mekking
4fb2ecd444 Move duration structure to libisccfg/duration
Having the duration structure and parsing code here, it becomes
more accessible to be used in other places.

(cherry picked from commit a28d919503)
2022-06-28 14:36:31 +02:00
Michał Kępień
d75ce232a6 Merge branch '3216-run-sslyze-in-gitlab-ci-v9_18' into 'v9_18'
[CVE-2022-1183] [v9_18] Run sslyze in GitLab CI

See merge request isc-projects/bind9!6492
2022-06-27 21:19:49 +00:00
Michał Kępień
a649bd2148 Also test DNS-over-TLS code using sslyze
Since sslyze can test any TLS-enabled server, also use it for exercising
DNS-over-TLS code rather than just DNS-over-HTTPS code.

(cherry picked from commit 4f12892740)
2022-06-27 23:10:00 +02:00
Michał Kępień
4cda066de2 Add regression test for CVE-2022-1183
If sslyze is available in PATH, run it in a loop as part of the "doth"
system test.

(cherry picked from commit e97b4697cf)
2022-06-27 23:10:00 +02:00
Matthijs Mekking
11abb69fb4 Merge branch '3422-dnssec-policy-clarifications-v9_18' into 'v9_18'
[v9_18] Add some clarifications wrt dynamic zones

See merge request isc-projects/bind9!6489
2022-06-27 09:54:52 +00:00
Matthijs Mekking
f2fc0e9c9e Add some clarifications wrt dynamic zones
These were suggested by GitLab user @elmaimbo.

(cherry picked from commit fb517eb52a)
2022-06-27 11:04:11 +02:00