Debian Codegraph @

cmd/atomdns/handlers/tsig/README.md

raw
1 # Name
2
3 _tsig_ - validate incoming TSIG signed messages
4
5 # Description
6
7 With _tsig_, you can define TSIG secret keys. Using those keys, _tsig_ validates incoming TSIG messages. This
8 is only done for notifies and zone transfers. It does not itself sign messages; it is up to the respective
9 handler sending those to use the data added to the context by _tsig_. See the "Context" section for details.
10
11 # Syntax
12
13 ```
14 tsig NAME ALGORITHM SECRET
15 ```
16
17 - **SECRET** must be base64 encoded. **NAME** is the name of the key (this is a domain name, and may thus
18 contain dots). And **ALGORITHM** is the key's algorithm like `hmac-sha512` for instance. See the `Hmac*`
19 constants in the dns package.
20
21 # Examples
22
23 ```
24 example.org {
25 tsig example.org.key hmac-sha512 NoTCJU+DMqFWywaPyxSijrDEA/eC3nK0xi3AMEZuPVk=
26 dbhost ... {
27 # ...
28 }
29 }
30 ```
31
32 # Context
33
34 The _tsig_ handler adds the following keys to the context:
35
36 | Key | Type | Example | Description |
37 | :--------------- | :------- | :--------------- | :----------------------------- |
38 | `tsig/status` | `bool` | true | The validation status of TSIG. |
39 | `tsig/name` | `string` | example.org.key. | Name, as configured. |
40 | `tsig/secret` | `string` | No...Pkv= | Secret, as configured. |
41 | `tsig/algorithm` | `string` | hmac-sha512. | Algorithm, as configured. |
42
43 Each of these can be used by respective "upstream" handlers to sign messages. Note _tsig_ does not register a
44 `tsig/msgfunc` as these are unconditionally executed by all handlers that returns a message.