-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NSEC3 and multiple key signing support. #416
Open
ximon18
wants to merge
542
commits into
main
Choose a base branch
from
initial-nsec3-generation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 203 commits
Commits
Show all changes
542 commits
Select commit
Hold shift + click to select a range
9325956
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 8c2b140
Rename strategy fns to refer to what they are selecting more accurately.
ximon18 12c252f
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 e4a5bf9
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 b9f9b4a
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 ad795a9
Merge branch 'main' into initial-nsec3-generation
ximon18 33178c2
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 10193c7
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 5f6f7e7
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 254b52f
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 bc68b0b
Make key selection more flexible. (#464)
ximon18 c7f26ac
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 6b7321c
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 64da561
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 7503455
Merge branch 'main' into initial-nsec3-generation
ximon18 15b72c0
Add a tab before the RDATA as well as within it, to match LDNS tabbed…
ximon18 5c23fdb
Update changelog.
ximon18 c141bf9
Add a tab before the RDATA as well as within it, to match LDNS tabbed…
ximon18 660d2f2
Update changelog.
ximon18 8c583b5
Add a tab before the RDATA as well as within it, to match LDNS tabbed…
ximon18 8f97bd3
Update changelog.
ximon18 85ffaf7
Add a tab before the RDATA as well as within it, to match LDNS tabbed…
ximon18 254dc9c
Update changelog.
ximon18 2359531
Raise errors instead of unwrapping on missing apex.
ximon18 f788ba5
Add a logging related TODO.
ximon18 dc79547
Also log the key tag when debug logging the keys to use for signing.
ximon18 02f64a4
Don't emit duplicate DNSKEY RRs for zonefiles that already contain th…
ximon18 ca982a4
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 68d7141
FIX: When extending SortedRecords, don't permit duplicate RRs to cree…
ximon18 200f0bb
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 31fabac
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 9c1cd42
Don't attempt to sign a zone or select keys to use if no keys are pro…
ximon18 80007c3
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 7f1bcb9
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 55c6975
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 99d4fcc
Improve signing keys debug output.
ximon18 b92f2f4
FIX: Only sign the apex if given the apex and remove unnecessary erro…
ximon18 69e8415
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 29cc4a1
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 9c82849
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 2a80b17
Actually check that we were given THE apex, not AN apex.
ximon18 518b4d7
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 2a956f7
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 23031e5
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 605efe6
Extend zone parsing to let the caller know when the origin has been d…
ximon18 493e870
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 3320bc9
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 7ff0cf8
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 f7b9351
Revert "Extend zone parsing to let the caller know when the origin ha…
ximon18 0a71293
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 529e6e6
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 0600feb
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 c0016c1
Use the correct TTL for added DNSKEY RRs when signing.
ximon18 8ba17e9
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 931d134
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 54ab872
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 b17fb85
FIX: Don't allow duplicate RRs to be imported via `impl From`.
ximon18 ed4fb30
Add a comment explaining why the apex name we use for an RRSIG meets …
ximon18 9aa7f7c
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 d3b3da5
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 d124294
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 c93eae7
Merge branch 'main' into initial-nsec3-generation
ximon18 bb0945a
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 8aadb43
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 aeb6d93
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 c5c422d
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 2034f32
FIX: Sign a merged DNSKEY RR set containing existing and new DNSKEY R…
ximon18 9cb5d8d
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 d863dba
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 d6a3f1d
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 398e70b
Clippy-suggested code improvements.
partim f00acc6
WIP: Use a hash provider.
ximon18 ae94056
Update changelog.
partim f0d383e
[zonefile/inplace] Handle backslashes in quoted strings
ximon18 3943d26
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 7deffd0
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 bd7f436
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 a9aa52c
Merge branch 'main' into initial-nsec3-generation
ximon18 8d53906
Merge branch 'initial-nsec3-generation' into multiple-key-signing
ximon18 6586302
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 3319ec6
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 e4a3aec
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 1342d4c
FIX: Don't omit DNSKEY RRs when signing if there were no pre-exisitng…
ximon18 29105f5
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 dd120bc
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 8af5518
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 222d862
Don't hard-code NSEC3 hash capture, instead use a HashProvider.
ximon18 427dd83
Merge branch 'multiple-key-signing' into byo-signing-sorter-impl
ximon18 072cc4c
Merge branch 'byo-signing-sorter-impl' into sortedrecords-zonemd-remo…
ximon18 a98182b
Merge branch 'sortedrecords-zonemd-remove-replace' into sortedrecords…
ximon18 8911c93
Cargo fmt.
ximon18 4ad8177
Merge branch 'sortedrecords-zonemd-remove-replace-plus-pr444' into so…
ximon18 822c95a
Enhanced zone signing. (#418)
ximon18 4c96f94
Merge branch 'multiple-key-signing' into initial-nsec3-generation
ximon18 ea56b58
Merge branch 'main' into initial-nsec3-generation
ximon18 40c678c
Correct outdated code comment.
ximon18 7165146
Improved/additional logging during NSEC3 generation.
ximon18 e0cd687
Remove commented out code.
ximon18 f6df4fb
Make signing work with any objects as keys as long as they can answer…
ximon18 340a70a
Minor import cleanup.
ximon18 a4492ce
Comment tweaks.
ximon18 880f334
FIX: Neither NSEC and NSEC3 nor hashing should include non-authoritat…
ximon18 c90026d
Add Rtype::is_pseudo() for use by NSEC and NSEC3 logic.
ximon18 03b70ca
Implement MUST constraints from RFC 4034 and RFC 5155 excluding "pseu…
ximon18 844418e
Replace the Signer with access to signing via new traits SignableZone…
ximon18 35609cc
Cargo fmt.
ximon18 e663e65
Fix doc tests.
ximon18 b868b42
RustDoc fix.
ximon18 c2f1fbd
Better generic type name.
ximon18 6162b72
More descriptive and consistent fn name.
ximon18 28e2144
Add sorted_records::as_slice().
ximon18 0dbeffb
Also allow RRsets to be signed via trait fn which is simpler than cal…
ximon18 79d5b91
Clippy.
ximon18 e6d0844
FIX: Add missing required dependency to fix broken compilation of the…
ximon18 33beefe
Take out references to BIND and LDNS.
ximon18 fc29943
De-duplicate SignableZone::sign_zone() and SignableZoneInPlace::sign_…
ximon18 2e761c1
Remove the confusnig OctsMut generic type.
ximon18 ceab294
Default TTL for newly created non-NSEC(3) RRs should be that of the S…
ximon18 397ade4
Add TODO comment.
ximon18 ce3d52f
Merge branch 'main' into initial-nsec3-generation
ximon18 7e7d384
Remove unnecessary function.
ximon18 70a1894
Use Deref instead of adding a new RecordSlice trait.
ximon18 b7a65c0
Make it possible to construct SortedRecords without specifying the so…
ximon18 34f681a
Make the Default SigningConfig actually have default behaviour.
ximon18 5da1bb0
FIX: Don't panic when signing a zone that lacks a SOA.
ximon18 955d320
Start updating the RustDoc for the sign module.
ximon18 9e9baec
RustDoc formatting.
ximon18 d45960f
Remove errant backticks in RustDoc.
ximon18 51d5bed
Use user supplied sort impl everywhere, and require CanonicalOrd.
ximon18 ecf0f59
Merge branch 'main' into initial-nsec3-generation
ximon18 8d49648
Group and move things around in the sign module.
ximon18 174e694
Fix doc tests.
ximon18 7c3c995
Use the generic parameter name Inner everywhere for consistency.
ximon18 af545ff
Consistency.
ximon18 d5c31d7
Cargo fmt.
ximon18 681456a
Remove FamilyName, rename Family to OwnerRrs, and remove class checks…
ximon18 b1f7a20
As zone signing assumes, but does not check, that the zone is ordered…
ximon18 1056703
Revert "As zone signing assumes, but does not check, that the zone is…
ximon18 f563f32
Fix doc test.
ximon18 5549ba7
Pass an is_ent flag to the Nsec3Provider to allow it to be recorded f…
ximon18 f128a60
Rename remaining references to family.
ximon18 e8bbd08
Clippy.
ximon18 3fc8c01
Cleanup:
ximon18 f945240
RustDoc tweaks.
ximon18 87ba5c6
RustDoc tweaks.
ximon18 faaa7db
RustDoc tweaks.
ximon18 d26d620
RustDoc tweaks.
ximon18 d7ee3c0
FIX: When signing to another collection rather than in-place don't n…
ximon18 d134cca
Merge branch 'main' into initial-nsec3-generation
ximon18 55e333a
Undo unintended changes compared to main.
ximon18 28623dd
More RustDoc tweaks for the sign module, and restore the crypto commo…
ximon18 d20e52e
Fix broken doc tests.
ximon18 1aef63f
Cargo fmt.
ximon18 bcac30c
Move crypto errors in to the main error submodule of sign.
ximon18 bac2e8a
Re-export some types that live only in modules by the same name or wh…
ximon18 d23c1e8
Fix missing feature guards.
ximon18 2812600
Ensure re-exports refer only to descendants of the current module.
ximon18 8c2709a
Add missing RRSIG term in RustDoc comment.
ximon18 1f75a00
Rename the hashing module to authnext (authenticated non-existence) a…
ximon18 ba144e9
Minor RustDoc tweaks.
ximon18 e843da5
Cargo fmt.
ximon18 5a2959e
Rename the authnext module to authnonext which doesn't sound like the…
ximon18 d22880a
Rename authnonext to denial as ext is not really a good abbreviation …
ximon18 f4899e1
Move SigningConfig and signing::traits to the top of the sign module …
ximon18 495cc96
Delete empty sign::zone sub-module.
ximon18 501ae94
Minor RustDoc tweak.
ximon18 2f415a8
Add RustDoc for the `sign_zone()` function.
ximon18 d724fce
More `sign_zone()` RustDoc.
ximon18 1db6220
Typo correction.
ximon18 e8375ee
Typo correction.
ximon18 78b48eb
RustDoc correction.
ximon18 5a82490
Cargo fmt.
ximon18 5dd9a6f
More RustDoc.
ximon18 51f8352
Log each signed RRSET at trace level, not debug level.
ximon18 2d961d3
Remove unnecessary owner_name argument from sign_rrset(), don't requi…
ximon18 73e1e78
Reject attempts to sign an RRSIG RRset. (a) they should never be sign…
ximon18 6d61377
Reject invalid signature validity periods in sign_rrset().
ximon18 3644ca4
Typo fix in error message.
ximon18 0ab6294
Add a TODO comment.
ximon18 4fdf5a5
Add a debug time assert in sign_rrset() checking the label counts per…
ximon18 01e6b59
Add some RFC 4035 and 4035 based tests of sign_rrset().
ximon18 4f15520
RustDoc updates for the sign module.
ximon18 b15fab6
Cargo fmt.
ximon18 6a17341
Clippy.
ximon18 47760e8
Fix messed up test code.
ximon18 0e71ecd
Review feedback.
ximon18 041c92f
Corrected a RustDoc comment.
ximon18 b906e53
Corrected a RustDoc comment.
ximon18 287576e
Replace incorrect references to hashing which is only true for NSEC3,…
ximon18 fb4f159
Report the invalid signature validity period when sign_rrset() fails.
ximon18 8b53b6c
No need to check for pseudo RTYPEs being added as the input ZoneRecor…
ximon18 0755ee0
Determine the TTL for NSEC records within generate_nsecs() because it…
ximon18 dbd09b2
Add RustDoc for generate_nsecs().
ximon18 fe8fc8e
Add tests for generate_nsecs().
ximon18 df72cb4
Cargo fmt.
ximon18 b4b7e91
Clippy.
ximon18 9c6f866
Fix broken/missing RustDoc links.
ximon18 6321f73
Minor test name corrections.
ximon18 edc513b
- Make generate_rrsigs() take a config object instead of multiple con…
ximon18 3fc07c4
Minor cleanup of the way test keys are generated and used by generate…
ximon18 5fc894e
Require a version of Bytes that supports From<Box<[u8]>> (as Dnskey u…
ximon18 801fd2d
FIX: Don't sign the apex twice.
ximon18 671da3b
FIX: Don't skip signing when the apex isn't matched.
ximon18 48ec284
- Move test helper functions to a shared module.
ximon18 391d7dc
Use SmallVec instead of Vec, to avoid allocation for a small temporar…
ximon18 406818f
And missing line break.
ximon18 b281261
Fix compilation error.
ximon18 fdb5c66
FIX: At least one key for both roles is needed for signing.
ximon18 e701add
Additional RustDoc comments.
ximon18 c5cdf3c
FIX: Doc tests broken by recent logic fix.
ximon18 5b4c4fe
Default to adding missing DNSKEY RRs, as RFC 4035 section 2.1 require…
ximon18 294770d
FIX: Adding records to SortedRecords via iterator should also use ext…
ximon18 614d815
Better parameter name.
ximon18 f6c2ce5
Minor improvements.
ximon18 94cf97d
Extend testing of generate_rrsigs() with a full zone to cover various…
ximon18 8984921
Clippy.
ximon18 019934c
FIX: Inverted flag.
ximon18 ab40d90
Organize imports.
ximon18 0f7ca2b
Add test for generating RRSIGs without adding DNSKEYs.
ximon18 e7d2460
Rename parameter.
ximon18 976b83e
Use existing helper fns to simplify test code.
ximon18 26911fd
Add missing [must_use] attributes.
ximon18 0bd93ec
Correct / generalize old comments.
ximon18 ffa16b3
Ah, the [must_use] are already inffered and duplicate and annoy Clipp…
ximon18 3717c66
Corrections and additions to the RustDoc for generate_rrsigs().
ximon18 1887d7e
Add a test of calling generate_rrsigs() on an already signed zone.
ximon18 7764e6b
- Remove the DNSKEY RRs from the input test zonefile as it is assumed…
ximon18 d807d4b
- Also use SmallVec here.
ximon18 2f39e2f
Merge branch 'main' into initial-nsec3-generation
ximon18 56ce3b0
Normalize the generate_xxx interfaces to take config objects and retu…
ximon18 0680c1f
Fix broken doc test, restore flexible signature for Default impl for …
ximon18 14cd78f
More normalization of the generate_xxx interfaces to take config obje…
ximon18 5efcccf
Initial NSEC3 unit tests based on existing NSEC tests.
ximon18 1660cba
Fix missing feature dependency.
ximon18 13f8e51
Take validity time for a signature as input to signing, not from a ke…
ximon18 4910b9b
Impl Display for IntendedKeyPurpose.
ximon18 6b6588c
Review feedback: Remove From<Dnskey> as it is not needed.
ximon18 1d950ae
Remove unnecessary Send bounds.
ximon18 01f542b
Add setter for RRSIg validity period to SigningConfig.
ximon18 d311371
Simplify NSEC unit test code.
ximon18 2d33877
Simplify NSEC3 unit test code and fix up the occluded test copied fro…
ximon18 3086e85
- Added a unit test verifying that existing NSEC RRs are ignored by g…
ximon18 ae36053
FIX: Inverted flag.
ximon18 1904364
Review feedback: Wrong comment.
ximon18 3c0746a
FIX: Use the supplied sorter.
ximon18 72b7785
- Remove NSEC3 type bit map merging as it is not necessary due to the…
ximon18 daa6159
Clippy.
ximon18 f372c91
Remove temporary init_logging() helper fn.
ximon18 fcc94d2
Add a test for hashing not producing the expected result.
ximon18 a197804
Merge branch 'main' into initial-nsec3-generation
Philip-NLnetLabs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely comfortable with the "best-practice" value being
default()
. If the best practices for NSEC3 ever change, we'd have to change thedefault()
implementation or (to avoid breaking changes) introduce a newfn new_best_practices() -> Self
, and end up with a confusing interface. I'd rather have afn best_practices()
method from the beginning, and noDefault
impl. This also makes it more clear to end users that they're opting into a best-practices value rather than a default inherent to the type. They're also more likely to find and read the documentation, rather than just callingDefault::default()
and assuming that will work.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you make a good point.
My intent was to provide good defaults.