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

519 Commits

Author SHA1 Message Date
Matthijs Mekking
eddac8575d Minor fixes in trust anchor code
This commit makes some minor changes to the trust anchor code:

1. Replace the undescriptive n1, n2 and n3 identifiers with slightly
   better rdata1, rdata2, and rdata3.
2. Fix an occurrence where in the error log message a static number
   32 was printed, rather than the rdata3 length.
3. Add a default case to the switch statement checking DS digest
   algorithms to catch unknown algorithms.
2019-12-06 07:12:24 +00:00
Matthijs Mekking
8c37d3d320 Rename 'dnssec-keys' to 'trust-anchors' 2019-12-05 12:19:17 +01:00
Tinderbox User
767a2aef43 prep 9.15.6 2019-11-17 18:59:41 -08:00
Evan Hunt
1a8348e2b4 disallow use of DS- and key-style trust anchors for the same name 2019-11-15 15:47:41 -08:00
Evan Hunt
feba480527 read DS trust anchors in named.conf
(but they aren't used for anything yet)
2019-11-15 15:47:17 -08:00
Evan Hunt
3fede8a7e9 add "static-ds" and "initial-ds" keywords to config parser 2019-11-15 15:47:17 -08:00
Matthijs Mekking
5f464d15a0 dnssec-policy inheritance from options/view
'dnssec-policy' can now also be set on the options and view level and
a zone that does not set 'dnssec-policy' explicitly will inherit it
from the view or options level.

This requires a new keyword to be introduced: 'none'.  If set to
'none' the zone will not be DNSSEC maintained, in other words it will
stay unsigned.  You can use this to break the inheritance.  Of course
you can also break the inheritance by referring to a different
policy.

The keywords 'default' and 'none' are not allowed when configuring
your own dnssec-policy statement.

Add appropriate tests for checking the configuration (checkconf)
and add tests to the kasp system test to verify the inheritance
works.

Edit the kasp system test such that it can deal with unsigned zones
and views (so setting a TSIG on the query).
2019-11-06 22:36:21 +01:00
Matthijs Mekking
a50d707fdc Introduce dnssec-policy configuration
This commit introduces the initial `dnssec-policy` configuration
statement. It has an initial set of options to deal with signature
and key maintenance.

Add some checks to ensure that dnssec-policy is configured at the
right locations, and that policies referenced to in zone statements
actually exist.

Add some checks that when a user adds the new `dnssec-policy`
configuration, it will no longer contain existing DNSSEC
configuration options.  Specifically: `inline-signing`,
`auto-dnssec`, `dnssec-dnskey-kskonly`, `dnssec-secure-to-insecure`,
`update-check-ksk`, `dnssec-update-mode`, `dnskey-sig-validity`,
and `sig-validity-interval`.

Test a good kasp configuration, and some bad configurations.
2019-11-06 22:31:44 +01:00
Matthijs Mekking
b7c5bfb203 Extend ttlval to accept ISO 8601 durations
The ttlval configuration types are replaced by duration configuration
types. The duration is an ISO 8601 duration that is going to be used
for DNSSEC key timings such as key lifetimes, signature resign
intervals and refresh periods, etc. But it is also still allowed to
use the BIND ttlval ways of configuring intervals (number plus
optional unit).

A duration is stored as an array of 7 different time parts.
A duration can either be expressed in weeks, or in a combination of
the other datetime indicators.

Add several unit tests to ensure the correct value is parsed given
different string values.
2019-11-06 22:31:44 +01:00
Mark Andrews
20647657f9 accept 0 for dnskey-sig-validity (indicates off) 2019-10-24 23:15:09 +11:00
Mark Andrews
c2fcc9f16f check for relationship between dnstap and dnstap-output seperately 2019-10-21 11:08:06 +11:00
Michał Kępień
0476e8f1ac Make VS solution upgrading unnecessary
Until now, the build process for BIND on Windows involved upgrading the
solution file to the version of Visual Studio used on the build host.
Unfortunately, the executable used for that (devenv.exe) is not part of
Visual Studio Build Tools and thus there is no clean way to make that
executable part of a Windows Server container.

Luckily, the solution upgrade process boils down to just adding XML tags
to Visual Studio project files and modifying certain XML attributes - in
files which we pregenerate anyway using win32utils/Configure.  Thus,
extend win32utils/Configure with three new command line parameters that
enable it to mimic what "devenv.exe bind9.sln /upgrade" does.  This
makes the devenv.exe build step redundant and thus facilitates building
BIND in Windows Server containers.
2019-09-26 15:11:15 +02:00
Tinderbox User
d6a9407908 prep 9.15.3 2019-08-12 13:59:41 +00:00
Evan Hunt
efa5f7ed54 remove remaining DLV-related configuration checks 2019-08-09 09:22:05 -07:00
Mark Andrews
a7ec7eb6ed check that bits 64..71 in a dns64 prefix are zero 2019-07-31 21:51:11 +10:00
Ondřej Surý
9bdc24a9fd Use coccinelle to cleanup the failure handling blocks from isc_mem_strdup 2019-07-23 15:32:36 -04:00
Ondřej Surý
ae83801e2b Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
Mark Andrews
a4f38bec6a named-checkconf failed to report dnstap-output missing
from named.conf when dnstap was specified
2019-07-23 05:09:01 +10:00
Ondřej Surý
a912f31398 Add new default siphash24 cookie algorithm, but keep AES as legacy
This commit changes the BIND cookie algorithms to match
draft-sury-toorop-dnsop-server-cookies-00.  Namely, it changes the Client Cookie
algorithm to use SipHash 2-4, adds the new Server Cookie algorithm using SipHash
2-4, and changes the default for the Server Cookie algorithm to be siphash24.

Add siphash24 cookie algorithm, and make it keep legacy aes as
2019-07-21 15:16:28 -04:00
Witold Kręcicki
afa81ee4e4 Remove all cookie algorithms but AES, which was used as a default, for legacy purposes. 2019-07-21 10:08:14 -04:00
Evan Hunt
fea6b5bf10 add a search for GeoIP2 libraries in configure
- "--with-geoip" is used to enable the legacy GeoIP library.
- "--with-geoip2" is used to enable the new GeoIP2 library
  (libmaxminddb), and is on by default if the library is found.
- using both "--with-geoip" and "--with-geoip2" at the same time
  is an error.
- an attempt is made to determine the default GeoIP2 database path at
  compile time if pkg-config is able to report the module prefix. if
  this fails, it will be necessary to set the path in named.conf with
  geoip-directory
- Makefiles have been updated, and a stub lib/dns/geoip2.c has been
  added for the eventual GeoIP2 search implementation.
2019-06-27 14:58:13 -07:00
Ondřej Surý
5d1e7be582 Rename OPENSSL_INCLUDES to OPENSSL_CFLAGS in AX_CHECK_OPENSSL() macro
The ax_check_openssl m4 macro used OPENSSL_INCLUDES.  Rename the
subst variable to OPENSSL_CFLAGS and wrap AX_CHECK_OPENSSL() in
action-if-not-found part of PKG_CHECK_MODULE check for libcrypto.
2019-06-25 12:36:01 +02:00
Ondřej Surý
e3e6888946 Make the usage of json-c objects opaque to the caller
The json-c have previously leaked into the global namespace leading
to forced -I<include_path> for every compilation unit using isc/xml.h
header.  This MR fixes the usage making the caller object opaque.
2019-06-25 12:04:20 +02:00
Ondřej Surý
0771dd3be8 Make the usage of libxml2 opaque to the caller
The libxml2 have previously leaked into the global namespace leading
to forced -I<include_path> for every compilation unit using isc/xml.h
header.  This MR fixes the usage making the caller object opaque.
2019-06-25 12:01:32 +02:00
Evan Hunt
8136b09fa8 allocate memory for symtab keys
this prevents an intermittent failure when conflicts between
static and initializing keys are not detected by named-checkconf.
2019-06-10 18:39:53 -07:00
Evan Hunt
d07053c8f6 fail if using both dnssec-keys and managed-keys in the same config 2019-06-05 07:49:57 -07:00
Evan Hunt
821f041d8c "dnssec-keys" is now a synonym for "managed-keys"
- managed-keys is now deprecated as well as trusted-keys, though
  it continues to work as a synonym for dnssec-keys
- references to managed-keys have been updated throughout the code.
- tests have been updated to use dnssec-keys format
- also the trusted-keys entries have been removed from the generated
  bind.keys.h file and are no longer generated by bindkeys.pl.
2019-06-05 07:49:57 -07:00
Evan Hunt
82f5bce1bb update key checks in lib/bind9/check.c and fix checkconf test
- any use of trusted or static keys for the root zone will now
  elicit a warning, regardless of what the keys may be
- ditto for any use of a key for dlv.isc.org, static or managed
2019-06-05 07:49:57 -07:00
Evan Hunt
5ab252183b deprecate "trusted-keys"
- trusted-keys is now flagged as deprecated, but still works
- managed-keys can be used to configure permanent trust anchors by
  using the "static-key" keyword in place of "initial-key"
- parser now uses an enum for static-key and initial-key keywords
2019-06-05 07:49:23 -07:00
Tony Finch
a9dca5831b Remove cleaning-interval remnants.
Since 2008, the cleaning-interval timer has been documented as
"effectively obsolete" and disabled in the default configuration with
a comment saying "now meaningless".

This change deletes all the code that implements the cleaning-interval
timer, except for the config parser in whcih it is now explicitly
marked as obsolete.

I have verified (using the deletelru and deletettl cache stats) that
named still cleans the cache after this change.
2019-06-05 13:08:12 +10:00
Ondřej Surý
4d2d3b49ce Cleanup the way we detect json-c library to use only pkg-config 2019-05-29 15:08:52 +02:00
Evan Hunt
37e79bd79c reject the use of trusted-keys and managed-keys for the same name 2019-05-07 22:02:37 -07:00
Evan Hunt
91dca0f8da don't fail when allow-update{,-forwarding} is used globally 2019-03-21 21:17:49 -07:00
Evan Hunt
b3ff3bf2e4 remove configuration, syntax checking and implementation of dnssec-enable 2019-03-14 23:29:07 -07:00
Ondřej Surý
a04a390195 Convert *.vcxproj.user to CRLF line endings 2019-03-08 18:01:48 +01:00
Ondřej Surý
c2637c8429 Use ForcedIncludeFiles directive to include config.h everywhere automatically 2019-03-08 17:14:38 +01:00
Ondřej Surý
78d0cb0a7d Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
Michał Kępień
1a9fc624ca Look for named plugins in ${libdir}/named
When the "library" part of a "plugin" configuration stanza does not
contain at least one path separator, treat it as a filename and assume
it is a name of a shared object present in the named plugin installation
directory.  Absolute and relative paths can still be used and will be
used verbatim.  Get the full path to a plugin before attempting to
check/register it so that all relevant log messages include the same
plugin path (apart from the one logged when the full path cannot be
determined).
2019-03-05 16:06:25 -08:00
Evan Hunt
efb0d1e83d documentation changes setting up 9.15 development branch 2019-02-21 16:42:17 -08:00
Tinderbox User
b4d3f78293 prep 9.13.6 2019-02-06 22:13:05 +00:00
Evan Hunt
adcc16f2d7 error on allow-update and allow-update-forwarding at options/view level 2019-01-15 23:20:38 -08:00
Mark Andrews
b75970efa3 named-checkconf triggered a assertion when a mirror zone had a bad name 2018-12-20 13:19:18 +11:00
Evan Hunt
de13354caf only the debug build was fixed previously; release needs fixing too 2018-12-17 17:10:33 -05:00
Mark Andrews
53a33f7365 pass the correct object to cfg_obj_log 2018-12-14 16:29:02 +11:00
Ondřej Surý
e69dc0dbc7 Remove RSAMD5 support 2018-12-11 11:32:24 +01:00
Evan Hunt
c6527aedc7 fix win32 build
- add missing hooks.h and hooks.c to project files
- remove extraneous symbols from libns.def
2018-12-07 10:12:00 -08:00
Tinderbox User
5bd855251c prep 9.13.5 2018-12-07 03:41:19 +00:00
Michał Kępień
4234968798 add a function for processing a list of configured plugins
Add a new libisccfg function, cfg_pluginlist_foreach(), which allows an
arbitrary callback to be invoked for every "plugin" stanza present in a
configuration object.  Use this function for both loading plugins and
checking their configuration in order to reduce duplication of
configuration processing code present in bin/named/server.c and
lib/bind9/check.c.
2018-12-06 10:36:50 -08:00
Evan Hunt
fd20f10d52 name change from "hook modules" to "plugins"
- "hook" is now used only for hook points and hook actions
- the "hook" statement in named.conf is now "plugin"
- ns_module and ns_modlist are now ns_plugin and ns_plugins
- ns_module_load is renamed ns_plugin_register
- the mandatory functions in plugin modules (hook_register,
  hook_check, hook_version, hook_destroy) have been renamed
2018-12-06 10:36:50 -08:00
Evan Hunt
8da0c0e7d5 eliminate ns_hookctx structure, pass mctx/lctx/view directly 2018-12-06 10:36:44 -08:00