-
-
Notifications
You must be signed in to change notification settings - Fork 8
Add IXFR out support. #605
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
Merged
Changes from 5 commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
2c1f606
Add limited initial IXFR out support (AXFR fallback only) and a minim…
ximon18 5dd79aa
PoC IXFR-out.
ximon18 fd6c2f3
Merge branch 'main' into ixfr-out
ximon18 9421203
Clippy.
ximon18 5345a2b
De-clutter ixfr-out system test output.
ximon18 39b0b20
Save last serial and key tags in zone state.
Philip-NLnetLabs 5c3c6cf
Switch to apex_remove and apex_extra.
Philip-NLnetLabs ce23145
Fmt.
Philip-NLnetLabs 3987494
Merge branch 'main' into ixfr-out
ximon18 538cc28
Review feedback: Remove outdated TODO comment.
ximon18 ddfdc2e
Review feedback: Better log message.
ximon18 941bf19
Review feedback: Remove unnecessary braces.
ximon18 92da4ff
Review feedback: Log at wrong level.
ximon18 54de825
Review feedback: Errant period in comment.
ximon18 a7120d2
Review feedback: Added some fn RustDocs.
ximon18 87ff6a7
Extend IXFR-out system test to use TSIG too.
ximon18 c2d1a7b
FIX: system-test should pass the `with-tsig` input correctly to the i…
ximon18 cd989d1
(WIP) Extend the ixfr-out test to actually verify produced output.
ximon18 c733215
Add more logging of request handling w.r.t. ACL processing.
ximon18 4e48270
FIX: include loaded RRs in the IXFR out, not just signed RRs.
ximon18 570415c
Review feedback.
Philip-NLnetLabs f0f9ebb
Merge branch 'main' into ixfr-out
ximon18 d399f1d
Adjust test condition.
ximon18 cfd91be
Review feedback: signal upgrade to TCP on UDP IXFR request.
ximon18 01fac00
Review feedback: Duplicate spawn comment.
ximon18 7905990
Review feedback: Note the potential to use flat_map() to avoid a vec …
ximon18 02efdfc
Review feedback: Remove irrelevant comment.
ximon18 baf4c64
Verify more XFR outputs against expectations.
ximon18 8f95fd4
Review feedback: Move IXFR diff logging from TRACE to DEBUG level.
ximon18 3781eae
FIX: Also store signed-only diffs.
ximon18 8b52b2b
Ignore NOTIFY if the zone was sourced from a file.
ximon18 35b8d5b
Serve diffs from the loaded reviewer server too.
ximon18 4ed1029
Merge loaded-review and signed-review IXFR out RR selection code.
ximon18 8312b8b
Remove unnecessary Options.
ximon18 c877ffc
Add an incremental signing based IXFR-out system test.
ximon18 d2ec91f
Merge branch 'main' into ixfr-out
ximon18 06d4bf0
Add IXFR out review server tests, and fix a bug that was found.
ximon18 393fb4d
Typo correction.
ximon18 0c692c6
Remove system tests, they will be moved to a separate PR.
ximon18 394b534
Review feedback: Return SERVFAIL instead of NOTAUTH for empty zone.
ximon18 1a3885b
Merge branch 'main' into ixfr-out
ximon18 1f47a28
Really remove the system tests.
ximon18 cb936e5
Remove change related to now removed system tests.
ximon18 7195745
I can't type...
ximon18 6f5f566
Review feedback: remove unnecessary step / temporary variable.
ximon18 10b717d
Enforce ACLs only on the publication server. (fixes #648)
ximon18 7bdc3ee
Query the transient diff at review servers. (fixes #652)
ximon18 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
This file contains hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,183 @@ | ||
| # Making reusable composite actions documented at | ||
| # https://docs.github.com/en/actions/tutorials/create-actions/create-a-composite-action#creating-a-composite-action-within-the-same-repository | ||
| name: 'Serve a zone via IXFR to the NSD secondary.' | ||
| description: 'Serve a zone via IXFR to the NSD secondary.' | ||
| defaults: | ||
| # see: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#defaultsrunshell | ||
| run: | ||
| shell: bash --noprofile --norc -eo pipefail -x {0} | ||
| inputs: | ||
| log-level: | ||
| description: The level of logging that Cascade should output. | ||
| required: false | ||
| default: debug | ||
| type: choice | ||
| options: | ||
| - error | ||
| - warning | ||
| - info | ||
| - debug | ||
| - trace | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - uses: ./.github/actions/prepare-systest-env | ||
| - uses: ./.github/actions/setup-and-start-cascade | ||
| with: | ||
| log-level: ${{ inputs.log-level }} | ||
|
|
||
| - name: Add a NOTIFY with TSIG outbound policy | ||
| run: | | ||
| POLICY_DIR=$(integration-tests/scripts/get-default-path.sh policy-dir) | ||
| cascade template policy | grep -Ev '(send-notify-to|accept-xfr-from)' > "${POLICY_DIR}/custom.toml" | ||
|
|
||
| sed -i -e 's/serial-policy = "date-counter"/serial-policy = "keep"/' "${POLICY_DIR}/custom.toml" | ||
| echo 'send-notify-to = ["127.0.0.1:1054"]' >> "${POLICY_DIR}/custom.toml" | ||
|
|
||
| # TODO: Extend the test to use TSIG (driven by inputs ala the tsig-downstream test) | ||
| # once PRs #564 and #587 have been merged. | ||
| # echo 'send-notify-to = ["127.0.0.1:1054^tsig-key"]' >> "${POLICY_DIR}/custom.toml" | ||
| # cascade tsig add tsig-key hmac-sha256 "COzoVsYQmXeXiyq1Quhp0bbVnMyxjPxsaGSoIWR98i0=" | ||
| cascade policy reload | ||
|
|
||
| - name: Make an initial zone based on RFC 1995 section 7 | ||
| run: | | ||
| tee example.test.zone <<'EOF' | ||
| EXAMPLE.TEST. IN SOA NS.EXAMPLE.TEST. mail.example.test. ( | ||
| 1 60 60 3600 5) | ||
| IN NS NS.EXAMPLE.TEST. | ||
| NS.EXAMPLE.TEST. IN A 133.69.136.1 | ||
| NEZU.EXAMPLE.TEST. IN A 133.69.136.5 | ||
| EOF | ||
|
|
||
| - name: Add the zone using the custom policy | ||
| run: | | ||
| cascade zone add --policy custom --source $PWD/example.test.zone example.test | ||
|
|
||
| - name: Check zone status | ||
| run: | | ||
| timeout=10 # seconds | ||
| start=$(date +%s) | ||
| until cascade zone status example.test | grep -q "Published zone available"; do | ||
| if (($(date +%s) > (start + timeout))); then | ||
| cascade zone status example.test | ||
| echo "timeout: zone status did not report published zone available" >&2 | ||
| exit 1 | ||
| fi | ||
| sleep 1 | ||
| done | ||
|
|
||
| - name: Check the SOA SERIAL at the NSD secondary | ||
| run: | | ||
| timeout=10 # seconds | ||
| start=$(date +%s) | ||
| until dig +short @127.0.0.1 -p 1054 example.test SOA | grep -q 'ns.example.test. mail.example.test. 1 60 60 3600 5'; do | ||
| if (($(date +%s) > (start + timeout))); then | ||
| cascade zone status example.test | ||
| dig +short @127.0.0.1 -p 1054 example.test SOA | ||
| echo "::error:: timeout: NSD did not acquire the zone changes" | ||
| exit 1 | ||
| fi | ||
| sleep 1 | ||
| done | ||
|
|
||
| - name: Edit the source zone and tell Cascade to reload it. | ||
| run: | | ||
| tee example.test.zone <<'EOF' | ||
| example.test. IN SOA ns.example.test. mail.example.test. ( | ||
| 2 60 60 3600 5) | ||
| IN NS NS.EXAMPLE.TEST. | ||
| NS.EXAMPLE.TEST. IN A 133.69.136.1 | ||
| JAIN-BB.EXAMPLE.TEST. IN A 133.69.136.4 | ||
| IN A 192.41.197.2 | ||
| EOF | ||
| cascade zone reload example.test | ||
|
|
||
| - name: Check zone status | ||
| run: | | ||
| timeout=10 # seconds | ||
| start=$(date +%s) | ||
| until cascade zone status example.test | grep -q "Published zone available"; do | ||
| if (($(date +%s) > (start + timeout))); then | ||
| cascade zone status example.test | ||
| echo "timeout: zone status did not report published zone available" >&2 | ||
| exit 1 | ||
| fi | ||
| sleep 1 | ||
| done | ||
|
|
||
| - name: Check the SOA SERIAL at the NSD secondary | ||
| run: | | ||
| timeout=10 # seconds | ||
| start=$(date +%s) | ||
| until dig +short @127.0.0.1 -p 1054 example.test SOA | grep -q 'ns.example.test. mail.example.test. 2 60 60 3600 5'; do | ||
| if (($(date +%s) > (start + timeout))); then | ||
| cascade zone status example.test | ||
| dig +short @127.0.0.1 -p 1054 example.test SOA | ||
| echo "::error:: timeout: NSD did not acquire the zone changes" | ||
| exit 1 | ||
| fi | ||
| sleep 1 | ||
| done | ||
|
|
||
| - name: Edit the source zone and tell Cascade to reload it. | ||
| run: | | ||
| tee example.test.zone <<'EOF' | ||
| EXAMPLE.TEST. IN SOA ns.example.test. mail.example.test. ( | ||
| 3 60 60 3600 5) | ||
| IN NS NS.EXAMPLE.TEST. | ||
| NS.EXAMPLE.TEST. IN A 133.69.136.1 | ||
| JAIN-BB.EXAMPLE.TEST. IN A 133.69.136.3 | ||
| IN A 192.41.197.2 | ||
| EOF | ||
| cascade zone reload example.test | ||
|
|
||
| - name: Check zone status | ||
| run: | | ||
| timeout=10 # seconds | ||
| start=$(date +%s) | ||
| until cascade zone status example.test | grep -q "Published zone available"; do | ||
| if (($(date +%s) > (start + timeout))); then | ||
| cascade zone status example.test | ||
| echo "timeout: zone status did not report published zone available" >&2 | ||
| exit 1 | ||
| fi | ||
| sleep 1 | ||
| done | ||
|
|
||
| - name: Check the SOA SERIAL at the NSD secondary | ||
| run: | | ||
| timeout=10 # seconds | ||
| start=$(date +%s) | ||
| until dig +short @127.0.0.1 -p 1054 example.test SOA | grep -q 'ns.example.test. mail.example.test. 3 60 60 3600 5'; do | ||
| if (($(date +%s) > (start + timeout))); then | ||
| cascade zone status example.test | ||
| dig +short @127.0.0.1 -p 1054 example.test SOA | ||
| echo "::error:: timeout: NSD did not acquire the zone changes" | ||
| exit 1 | ||
| fi | ||
| sleep 1 | ||
| done | ||
|
|
||
| # Note: There is no NSD metric that I am aware of that we can use to | ||
| # verify that it received IXFR from Cascade instead of AXFR, nor is there | ||
| # any Cascade Prometheus metric or CLI command that we can use to check | ||
| # this either. Increasing the NSD log level to 9 doesn't cause it to | ||
| # report whether it received IXFR or AXFR either. | ||
|
|
||
| # TODO: Verify the AXFR and IXFR response content is as expected / | ||
| # matching that of NSD. | ||
|
|
||
| - run: dig +onesoa +noall +answer @127.0.0.1 -p 4542 example.test AXFR > cascade-axfr.log | ||
|
|
||
| - run: dig +onesoa +noall +answer @127.0.0.1 -p 4542 example.test -t IXFR=1 >cascade-ixfr-1.log | ||
|
|
||
| - run: dig +onesoa +noall +answer @127.0.0.1 -p 4542 example.test -t IXFR=2 >cascade-ixfr-2.log | ||
|
|
||
| - run: dig +onesoa +noall +answer @127.0.0.1 -p 4542 example.test -t IXFR=3 >cascade-ixfr-3.log | ||
|
|
||
| - run: dig +onesoa +noall +answer @127.0.0.1 -p 1054 example.test AXFR >nsd-axfr.log | ||
|
|
||
| - name: Print log files on any failure in this job | ||
| uses: ./.github/actions/print-logfiles | ||
| if: failure() | ||
This file contains hidden or 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 hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.