bind9/lib
Matthijs Mekking 7f43520893 Test migration to dnssec-policy, retire old keys
Migrating from 'auto-dnssec maintain;' to dnssec-policy did not
work properly, mainly because the legacy keys were initialized
badly.  Earlier commit deals with migration where existing keys
match the policy.  This commit deals with migration where existing
keys do not match the policy.  In that case, named must not
immediately delete the existing keys, but gracefully roll to the
dnssec-policy.

However, named did remove the existing keys immediately.  This is
because the legacy key states were initialized badly.  Because
those keys had their states initialized to HIDDEN or RUMOURED, the
keymgr decides that they can be removed (because only when the key
has its states in OMNIPRESENT it can be used safely).

The original thought to initialize key states to HIDDEN (and
RUMOURED to deal with existing keys) was to ensure that those keys
will go through the required propagation time before the keymgr
decides they can be used safely.  However, those keys are already
in the zone for a long time and making the key states represent
otherwise is dangerous: keys may be pulled out of the zone while
in fact they are required to establish the chain of trust.

Fix initializing key states for existing keys by looking more closely
at the time metadata.  Add TTL and propagation delays to the time
metadata and see if the DNSSEC records have been propagated.
Initialize the state to OMNIPRESENT if so, otherwise initialize to
RUMOURED.  If the time metadata is in the future, or does not exist,
keep initializing the state to HIDDEN.

The added test makes sure that new keys matching the policy are
introduced, but existing keys are kept in the zone until the new
keys have been propagated.
2020-04-03 08:29:22 +02:00
..
bind9 Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
dns Test migration to dnssec-policy, retire old keys 2020-04-03 08:29:22 +02:00
irs Fixup the headers formatting 2020-03-11 10:19:32 +01:00
isc Reduce rwlock contention in isc_log_wouldlog() 2020-04-02 11:23:16 +02:00
isccc Stop leaking OpenSSL types and defines in the isc/md.h 2020-03-17 09:11:13 +01:00
isccfg Refactor the isc_log API so it cannot fail on memory failures 2020-03-18 09:05:59 +01:00
ns netmgr refactoring: use generic functions when operating on sockets. 2020-03-24 20:31:43 +00:00
samples Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
win32/bindevt apply the modified style 2020-02-13 15:05:06 -08:00
.gitignore added gitignore, removed cvsignore 2012-03-03 23:10:05 -08:00
Kyuafile link in lib/isccc/tests/Kyuafile 2018-11-13 07:23:36 +11:00
Makefile.in remove lib/tests as nothing uses it anymore 2018-03-09 14:12:50 -08:00