mirror of
https://github.com/NLnetLabs/domain.git
synced 2026-09-27 04:04:53 +02:00
- Add TSIG response signing middleware. - Update Stelline server integration tests to use the new TSIG middleware. - Add TSIG Stelline test recipe. - TSIG module changes: - Derive Clone for Key. - Added Key::compose_len() for determining how many response bytes to reserve. - Added ClientTransaction::wrapped_key(), ClientSequence::wrapped_key() and SigningContext::wrapped_key() to access the real underlying "wrapped" key type. - Added From<ServerTransaction<K>> for ServerSequence<K>. - Various minor RustDoc improvements. - Make Time48 obey mock (predictable and controllable) time so that TSIG signing uses mock time during Stelline tests. Other: - Remove unnecessary Unpin bounds on net::server::message::Request. - Remove unnecessary Clone bound on impl SendRequest for net::client::dgram::Connection. - Remove unnecessary mutex lock on middleware post-processing response state and rename PostprocessingConfig to PostprocessingState to better reflect its mutable nature. - Don't set the AA flag on test service responses as (a) actual zone serving doesn't do this yet and this still needs fixing, and (b) it violates the expectations of the TSIG Stelline test that verifies at a byte level the TSIG response signature. --------- Co-authored-by: Philip Homburg <philip@nlnetlabs.nl> Co-authored-by: Philip-NLnetLabs <93709748+Philip-NLnetLabs@users.noreply.github.com> Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
56 lines
2.7 KiB
Plaintext
56 lines
2.7 KiB
Plaintext
;------------ Server configuration --------------------------------------------
|
|
|
|
server:
|
|
; Define an in-memory zone to be served by the server.
|
|
local-data: "example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600"
|
|
local-data: "example.com. 3600 IN NS ns.example.net."
|
|
local-data: "www.example.com. 3600 IN A 1.2.3.4"
|
|
CONFIG_END
|
|
|
|
;------------ Test definition ------------------------------------------------
|
|
|
|
SCENARIO_BEGIN Test TSIG signed SOA query receives correctly signed reply.
|
|
|
|
;--- Mock replies
|
|
|
|
; None
|
|
|
|
;--- Test steps
|
|
|
|
; NOTE: See test-data/server/README.md regarding the effect of MOCK_CLIENT
|
|
; that is used here.
|
|
STEP 10 QUERY
|
|
ENTRY_BEGIN
|
|
MATCH UDP
|
|
MATCH MOCK_CLIENT
|
|
SECTION QUESTION
|
|
example.com. IN SOA
|
|
SECTION ADDITIONAL
|
|
; Stelline doesn't support parsing zone entries that use the ( multiline )
|
|
; format, otherwise we could use that here.
|
|
TESTKEY 0 CLASS255 TYPE250 \# 61 0b686d61632d73686132353600 000000000000 012c 0020 a1c86ced1815d60903129a525a14494516895d99ea94bf0b5b04338126a4d625 0000 0000 0000
|
|
; ^ Other Len
|
|
; ^ Error
|
|
; ^ Original ID
|
|
; ^ MAC
|
|
; ^ MAC Size
|
|
; ^ Fudge
|
|
; ^ Algorithm Name ^ Time Signed
|
|
; ^ RDATA byte length.
|
|
; ^ RFC 3597 CLASSNN TYPENN \# encoding of unknown DNS RR types.
|
|
; We use this so that we can define the RDATA using HEX bytes.
|
|
ENTRY_END
|
|
|
|
STEP 11 CHECK_ANSWER
|
|
ENTRY_BEGIN
|
|
MATCH all
|
|
REPLY QR NOERROR
|
|
SECTION QUESTION
|
|
example.com. IN SOA
|
|
SECTION ANSWER
|
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600
|
|
SECTION ADDITIONAL
|
|
TESTKEY 0 CLASS255 TYPE250 \# 61 0b686d61632d73686132353600 000000000000 012c 0020 6d7f9c5a14c2b48d4a0549000af29808e5eb25f7a80c22a2b1c0cf2ef3929bcd 0000 0000 0000
|
|
ENTRY_END
|
|
|
|
SCENARIO_END |