2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 13:08:06 +00:00

140 Commits

Author SHA1 Message Date
Ondřej Surý
011e9418ce Disable lame-ttl cache
The lame-ttl cache is implemented in ADB as per-server locked
linked-list "indexed" with <qname,qtype>.  This list has to be walked
every time there's a new query or new record added into the lame cache.
Determined attacker can use this to degrade performance of the resolver.

Resolver testing has shown that disabling the lame cache has little
impact on the resolver performance and it's a minimal viable defense
against this kind of attack.
2021-10-28 12:05:58 +02:00
Matthijs Mekking
8f324b4717 Change nsec3param default to iter 0 salt-length 0
When using 'nsec3param' in 'dnssec-policy' and no specific parameters
are provided, default to zero additional iterations and no salt, as
recommended by draft-ietf-dnsop-nsec3-guidance.
2021-10-25 11:27:23 +02:00
Evan Hunt
a55589f881 remove all references to isc_socket and related types
Removed socket.c, socket.h, and all references to isc_socket_t,
isc_socketmgr_t, isc_sockevent_t, etc.
2021-10-15 01:01:25 -07:00
Mark Andrews
bf2cde0e8a Document {krb5,ms}-subdomain-self-rhs update policy rules
Add documentation for ms-subdomain-self-rhs and krb5-subdomain-self-rhs
update policy rules.
2021-10-15 11:32:17 +11:00
Evan Hunt
69e25f41ae cleanup references to ancient named.conf options
some removed options were still referenced in config.c or the ARM.
2021-10-12 14:01:57 -07:00
Matthijs Mekking
2abad4d969 Change default of dnssec-dnskey-kskonly to yes
The extra RRSIG on DNSKEY, CDS and CDNSKEY RRsets add to the payload,
without having added value.
2021-10-12 13:45:44 +02:00
Artem Boldariev
4369d94f68 Provide an example of forward secrecy enabled TLS configuration
This commit adds and example of a perfect forward secrecy enabled TLS
configuration intended to be used as a starting point.
2021-10-01 15:56:02 +03:00
Artem Boldariev
9c34fa2896 Mention that "tls" options defaults are outside of our control
We have to mention that every option within a "tls" clause has
defaults out of our control as some platforms have means for defining
encryption policies globally for any application on the system.

In order to comply with these policies, we have not to modify TLS
contexts settings, unless we have to do so according to the options
specified within "tls" clauses.
2021-10-01 15:50:43 +03:00
Artem Boldariev
c759f25c7b Add "session-tickets" options to the "tls" clause
This commit adds the ability to enable or disable stateless TLS
session resumption tickets (see RFC5077). Having this ability is
twofold.

Firstly, these tickets are encrypted by the server, and the algorithm
might be weaker than the algorithm negotiated during the TLS session
establishment (it is in general the case for TLSv1.2, but the generic
principle applies to TLSv1.3 as well, despite it having better ciphers
for session tickets). Thus, they might compromise Perfect Forward
Secrecy.

Secondly, disabling it might be necessary if the same TLS key/cert
pair is supposed to be used by multiple servers to achieve, e.g., load
balancing because the session ticket by default gets generated in
runtime, while to achieve successful session resumption ability, in
this case, would have required using a shared key.

The proper alternative to having the ability to disable stateless TLS
session resumption tickets is to implement a proper session tickets
key rollover mechanism so that key rotation might be performed
often (e.g. once an hour) to not compromise forward secrecy while
retaining the associated performance benefits. That is much more work,
though. On the other hand, having the ability to disable session
tickets allows having a deployable configuration right now in the
cases when either forward secrecy is wanted or sharing the TLS
key/cert pair between multiple servers is needed (or both).
2021-10-01 15:50:43 +03:00
Artem Boldariev
16c6e2be06 Add "prefer-server-ciphers" options to the "tls" clause
This commit adds support for enforcing the preference of server
ciphers over the client ones. This way, the server attains control
over the ciphers priority and, thus, can choose more strong cyphers
when a client prioritises less strong ciphers over the more strong
ones, which is beneficial when trying to achieve Perfect Forward
Secrecy.
2021-10-01 15:50:43 +03:00
Artem Boldariev
3b88d783a2 Add "ciphers" options to the "tls" clause
This commit adds support for setting TLS cipher list string in the
format specified in the OpenSSL
documentation (https://www.openssl.org/docs/man1.1.1/man1/ciphers.html).

The syntax of the cipher list is verified so that specifying the wrong
string will prevent the configuration from being loaded.
2021-10-01 15:50:43 +03:00
Artem Boldariev
f2ae4c8480 DH-parameters loading support
This commit adds support for loading DH-parameters (Diffie-Hellman
parameters) via the new "dhparam-file" option within "tls" clause. In
particular, Diffie-Hellman parameters are needed to enable the range
of forward-secrecy enabled cyphers for TLSv1.2, which are getting
silently disabled otherwise.
2021-10-01 15:50:43 +03:00
Artem Boldariev
992f815770 Add "protocols" options to the "tls" clause
This commit adds the ability to specify allowed TLS protocols versions
within the "tls" clause. If an unsupported TLS protocol version is
specified in a file, the configuration file will not pass
verification.

Also, this commit adds strict checks for "tls" clauses verification,
in particular:

- it ensures that loading configuration files containing duplicated
"tls" clauses is not allowed;

- it ensures that loading configuration files containing "tls" clauses
missing "cert-file" or "key-file" is not allowed;

- it ensures that loading configuration files containing "tls" clauses
named as "ephemeral" or "none" is not allowed.
2021-10-01 15:50:43 +03:00
Matthijs Mekking
4e3ba81696 Remove copy paste error on zone-max-ttl
The "zone-max-ttl" option inside a "dnssec-policy" is not used to cap
the TTLs in a zone, only yo calculate key rollover timings.
2021-09-23 09:51:40 +02:00
Matthijs Mekking
9ddc23b2bf Add a note about salt length
Apparently it is confusing that you don't specify a specific salt,
but a salt length.
2021-09-23 09:51:40 +02:00
Matthijs Mekking
a73a07832e The s stands for security
So "hardware security modules" not "hardware service modules"
2021-09-23 09:51:40 +02:00
Ondřej Surý
edee9440d0 Remove the mastefile-format map option
As previously announced, this commit removes the masterfile-format
format 'map' from named, all the tools, the documentation and the
system tests.
2021-09-17 07:09:50 +02:00
Evan Hunt
a27860ba57 mark "cache-file" as ancient and remove all code implementing it
"cache-file" was already documented as intended for testing
purposes only and not to be used, so we can remove it without
waiting.  this commit marks the option as "ancient", and
removes all the documentation and implementing code, including
dns_cache_setfilename() and dns_cache_dump().

it also removes the documentation for the '-x cachefile`
parameter to named, which had already been removed, but the man
page was not updated at the time.
2021-09-16 00:19:02 -07:00
Ondřej Surý
c9a17c878a Document caveats related to single source port in the ARM
Discourage the single source port on general level and document that the
source port cannot be same as the listening port.  This applies to
query-source, transfer-source, notify-source, parental-source, and their
respective IPv6 counterparts.
2021-09-14 19:24:39 +02:00
Mark Andrews
e65ce00f11 Update sig-validity-interval description
Document that the interval on new RRSIG records is randomally
chosen between the limits specified by sig-validity-interval.
document the operatations when this occurs.
2021-09-03 13:16:33 +10:00
Evan Hunt
4b61e74470 expand map file documentation
discuss map file compatibility issues in more detail.
2021-08-28 07:31:13 -07:00
Evan Hunt
dcf2d48674 clarify 'notify-delay' documentation
- the explanation was unclear
- the reference to 'serial-query-rate' was outdated
2021-07-21 14:39:48 -07:00
Artem Boldariev
f5614be9df Update documentation to include the new HTTP configuration options
Documentation for the new DoH options has been added.
2021-07-16 11:50:22 +03:00
Artem Boldariev
954240467d Verify HTTP paths both in incoming requests and in config file
This commit adds the code (and some tests) which allows verifying
validity of HTTP paths both in incoming HTTP requests and in BIND's
configuration file.
2021-07-16 10:28:08 +03:00
Matthijs Mekking
b4c1f3b832 Update documentation
Update ARM and DNSSEC guide with the new checkds feature.
2021-06-30 17:28:49 +02:00
Matthijs Mekking
2872d6a12e Add "parental-source[-v6]" config option
Similar to "notify-source" and "transfer-source", add options to
set the source address when querying parental agents for DS records.
2021-06-30 17:28:48 +02:00
Matthijs Mekking
0311705d4b Add parental-agents configuration
Introduce a way to configure parental agents that can be used to
query DS records to be used in automatic key rollovers.
2021-06-30 17:28:47 +02:00
Matthijs Mekking
39a961112f Change primaries objects to remote-servers
Change the primaries configuration objects to the more generic
remote-servers, that we can reuse for other purposes (such as
parental-agents).
2021-06-30 17:21:11 +02:00
Ondřej Surý
4266f6dd2b Change the safe edns-udp-size from 1400 to 1432
When backporting the Don't Fragment UDP socket option, it was noticed
that the edns-udp-size probing uses 1432 as one of the values to be
probed and the documentation would be recommending 1400 as the safe
value.  As the safe value can be from the 1400-1500 interval, the
documentation has been changed to match the probed value, so we do not
skip it.
2021-06-23 20:57:05 +02:00
Michał Kępień
d877aa9adf Improve description of mirror zone validation
Expand the description of mirror zones in the ARM by adding a brief
discussion of how the validation process works for AXFR and IXFR.  Move
the paragraph mentioning the "file" option higher up.  Apply minor
stylistic and whitespace-related tweaks to the relevant section of the
ARM.
2021-06-22 22:49:36 +02:00
Michał Kępień
a43cafe77d Tweak descriptions of buffering-related options
Apply minor stylistical and whitespace-related tweaks to the
descriptions of the "tcp-receive-buffer", "udp-receive-buffer",
"tcp-send-buffer", and "udp-send-buffer" options in the ARM.
2021-06-22 22:26:46 +02:00
Michał Kępień
3ee62883e3 Fix typos in buffering-related option names
The ARM contains typos in the names of the following two options:

  - "tcp-receive-buffer"
  - "udp-receive-buffer"

Fix the ARM so that it contains proper option names.
2021-06-22 22:26:46 +02:00
Petr Špaček
a67ceb8dda Rework description of the "max-cache-size" option
Improve the description of the "max-cache-size" option in the ARM by
focusing on its meaning for multiple views and default values.
Add mention of a hash table preallocation.
2021-06-22 21:33:08 +02:00
Ondřej Surý
440fb3d225 Completely remove BIND 9 Windows support
The Windows support has been completely removed from the source tree
and BIND 9 now no longer supports native compilation on Windows.

We might consider reviewing mingw-w64 port if contributed by external
party, but no development efforts will be put into making BIND 9 compile
and run on Windows again.
2021-06-09 14:35:14 +02:00
Evan Hunt
05985f6889 clarify buffer size options
the documentation for {udp,tcp}-{send,receive}-buffer options
was not complete. also revised for grammar.
2021-05-17 09:34:08 -07:00
Ondřej Surý
4509089419 Add configuration option to set send/recv buffers on the nm sockets
This commit adds a new configuration option to set the receive and send
buffer sizes on the TCP and UDP netmgr sockets.  The default is `0`
which doesn't set any value and just uses the value set by the operating
system.

There's no magic value here - set it too small and the performance will
drop, set it too large, the buffers can fill-up with queries that have
already timeouted on the client side and nobody is interested for the
answer and this would just make the server clog up even more by making
it produce useless work.

The `netstat -su` can be used on POSIX systems to monitor the receive
and send buffer errors.
2021-05-17 08:47:09 +02:00
Matthijs Mekking
fadc57d3d0 Update documentation with "insecure" policy
Update the ARM to mention the new built-in "insecure" policy.  Update
the DNSSEC guide recipe "Revert to unsigned" to add the additional
step of reconfiguring the zone to "insecure" (instead of immediately
set it to "none").
2021-04-30 11:18:38 +02:00
Michal Nowak
aeb43a45ac Make use of the :rfc: role in the ARM consistent
Make sure all RFC references in the ARM use the stock :rfc: Sphinx role.
2021-04-29 13:24:21 +02:00
Matthijs Mekking
104b676235 Serve-stale nit fixes
While working on the serve-stale backports, I noticed the following
oddities:

1. In the serve-stale system test, in one case we keep track of the
   time how long it took for dig to complete. In commit
   aaed7f9d8c2465790d769221dfe8378c7147f5eb, the code removed the
   exception to check for result == ISC_R_SUCCESS on stale found
   answers, and adjusted the test accordingly. This failed to update
   the time tracking accordingly. Move the t1/t2 time track variables
   back around the two dig commands to ensure the lookups resolved
   faster than the resolver-query-timeout.

2. We can remove the setting of NS_QUERYATTR_STALEOK and
   DNS_RDATASETATTR_STALE_ADDED on the "else if (stale_timeout)"
   code path, because they are added later when we know we have
   actually found a stale answer on a stale timeout lookup.

3. We should clear the NS_QUERYATTR_STALEOK flag from the client
   query attributes instead of DNS_RDATASETATTR_STALE_ADDED (that
   flag is set on the rdataset attributes).

4. In 'bin/named/config.c' we should set the configuration options
   in alpabetical order.

5. In the ARM, in the backports we have added "(stale)" between
   "cached" and "RRset" to make more clear a stale RRset may be
   returned in this scenario.
2021-04-28 12:24:24 +02:00
Matthijs Mekking
bad5c3cf7c Document relative path of $INCLUDE
Add to the ARM from where relative paths are searched.
2021-04-14 10:04:40 +02:00
Matthijs Mekking
e443279bbf Change default stale-answer-client-timeout to off
Using "stale-answer-client-timeout" turns out to have unforeseen
negative consequences, and thus it is better to disable the feature
by default for the time being.
2021-04-07 14:10:31 +02:00
Michał Kępień
3878cf4ac5 Fix documentation for the "max-ixfr-ratio" option
Commit 9fb6d11abbdb10ded128f0ee5c004f24b4030ede (which converted BIND 9
documentation from DocBook to Sphinx) inadvertently removed a paragraph
from the description of the "max-ixfr-ratio" option.  Add the missing
paragraph back.
2021-03-08 12:27:39 +01:00
Matthijs Mekking
313de3a7e2 Add purge-keys config option
Add a new option 'purge-keys' to 'dnssec-policy' that will purge key
files for deleted keys. The option determines how long key files
should be retained prior to removing the corresponding files from
disk.

If set to 0, the option is disabled and 'named' will not remove key
files from disk.
2021-02-23 09:16:48 +01:00
Evan Hunt
2b2e1a02bd allow configuration of "default" http endpoint
specifying "http default" in a listen-on statement sets up
the default "/dns-query" endpoint. tests and documentation
have been updated.
2021-02-16 16:24:35 -08:00
Evan Hunt
07f525bae5 require "tls none" for unencrypted HTTP listeners
unencrypted DoH connections may be used in some operational
environments where encryption is handled by a reverse proxy,
but it's going to be relatively rare, so we shouldn't make it
easy to do by mistake.  this commit changes the syntax for
listen-on and listen-on-v6 so that if "http" is specified, "tls"
must also be specified; for unencrypted listeners, "tls none"
can be used.
2021-02-16 16:24:35 -08:00
Evan Hunt
931ccd225f update ARM with "http" grammar
add a link to the http statement grammar and explanations and examples
for configuring DoH listeners.
2021-02-03 12:06:17 +01:00
Evan Hunt
06951472dd Add parser support for DoH configuration options
This commit adds stub parser support and tests for:
- an "http" global option for HTTP/2 endpoint configuration.
- command line options to set http or https port numbers by
  specifying -p http=PORT or -p https=PORT.  (NOTE: this change
  only affects syntax; specifying HTTP and HTTPS ports on the
  command line currently has no effect.)
- named.conf options "http-port" and "https-port"
- HTTPSPORT environment variable for use when running tests.
2021-02-03 12:06:17 +01:00
Ondřej Surý
e488309da7 implement xfrin via XoT
Add support for a "tls" key/value pair for zone primaries, referencing
either a "tls" configuration statement or "ephemeral". If set to use
TLS, zones will send SOA and AXFR/IXFR queries over a TLS channel.
2021-01-29 12:07:38 +01:00
Diego Fronza
6ab9070457 Add documentation for stale-answer-client-timeout 2021-01-25 10:47:14 -03:00
Matthijs Mekking
87744f218d Remove a lot of obsoleted options
These options were ancient or made obsolete a long time ago, it is
safe to remove them.

Also stop printing ancient options, they should be treated the same as
unknown options.

Removed options: lwres, geoip-use-ecs, sit-secret, use-ixfr,
acache-cleaning-interval, acache-enable, additional-from-auth,
additional-from-cache, allow-v6-synthesis, dnssec-enable,
max-acache-size, nosit-udp-size, queryport-pool-ports,
queryport-pool-updateinterval, request-sit, use-queryport-pool, and
support-ixfr.
2021-01-19 10:12:40 +01:00