]> git.ipfire.org Git - thirdparty/pdns.git/blame - docs/domainmetadata.rst
spelling: cannot
[thirdparty/pdns.git] / docs / domainmetadata.rst
CommitLineData
0e2063c3
PL
1Per zone settings: Domain Metadata
2==================================
3
4Each served zone can have "metadata". Such metadata determines how this
5zone behaves in certain circumstances.
6
7.. warning::
9cf95124 8 When multiple backends are in use, domain metadata is only retrieved from and written to the first DNSSEC-capable or metadata-capable backend, no matter where the related zones live.
a426f021 9
0e2063c3
PL
10For the BIND backend, this information is either stored in the
11:ref:`setting-bind-dnssec-db` or the hybrid database,
12depending on your settings.
13
14For the implementation in non-sql backends, please review your backend's
15documentation.
16
17Apart from raw SQL statements, setting domain metadata can be done with
18``pdnsutil set-meta`` and retrieving metadata is done with ``pdnsutil get-meta``.
19
8cf9e4df 20The following options can only be read (not written to) via the HTTP API metadata endpoint.
160e66e7 21
20ee5fa8 22* API-RECTIFY
ecd936d4 23* AXFR-MASTER-TSIG
20ee5fa8 24* LUA-AXFR-SCRIPT
ecd936d4
M
25* NSEC3NARROW
26* NSEC3PARAM
27* PRESIGNED
ecd936d4
M
28* TSIG-ALLOW-AXFR
29
a13849bc 30The option SOA-EDIT-API cannot be written or read via the HTTP API metadata endpoint.
20ee5fa8 31
0e2063c3
PL
32.. _metadata-allow-axfr-from:
33
34ALLOW-AXFR-FROM
35---------------
36
37Per-zone AXFR ACLs can be stored in the domainmetadata table.
38
39Each ACL specifies one subnet (v4 or v6), or the magical value 'AUTO-NS'
40that tries to allow all potential slaves in.
41
42Example:
43
633489be 44.. code-block:: shell
0e2063c3
PL
45
46 pdnsutil set-meta powerdns.org ALLOW-AXFR-FROM AUTO-NS 2001:db8::/48
47
48Each ACL has its own row in the database:
49
50::
51
633489be 52 sql> select id from domains where name='example.com';
0e2063c3 53 7
633489be
GD
54 sql> insert into domainmetadata (domain_id, kind, content) values (7,'ALLOW-AXFR-FROM','AUTO-NS');
55 sql> insert into domainmetadata (domain_id, kind, content) values (7,'ALLOW-AXFR-FROM','2001:db8::/48');
0e2063c3
PL
56
57To disallow all IP's, except those explicitly allowed by domainmetadata
58records, add ``allow-axfr-ips=`` to ``pdns.conf``.
59
986e4858
PL
60.. _metadata-api-rectify:
61
62API-RECTIFY
63-----------
690bd03e 64.. versionadded:: 4.1.0
986e4858
PL
65
66This metadata item controls whether or not a zone is fully rectified on changes
67to the contents of a zone made through the :doc:`API <http-api/index>`.
68
69When the ``API-RECTIFY`` value is "1", the zone will be rectified on changes.
a7ce955b 70Any other value means that it will not be rectified. If this is not set
b8cd24cc
SH
71at all, rectifying of the zone depends on the config variable
72:ref:`setting-default-api-rectify`.
986e4858 73
0e2063c3
PL
74.. _metadata-axfr-source:
75
76AXFR-SOURCE
77-----------
78
79The IP address to use as a source address for sending AXFR and IXFR
80requests.
81
82ALLOW-DNSUPDATE-FROM, TSIG-ALLOW-DNSUPDATE, FORWARD-DNSUPDATE, SOA-EDIT-DNSUPDATE, NOTIFY-DNSUPDATE
83---------------------------------------------------------------------------------------------------
84
85See the documentation on :ref:`Dynamic DNS update <dnsupdate-metadata>`.
86
87.. _metadata-also-notify:
88
89ALSO-NOTIFY
90-----------
91
92When notifying this domain, also notify this nameserver (can occur
8fab0658 93multiple times). The nameserver may contain an optional port
0e2063c3
PL
94number. e.g.:
95
633489be 96.. code-block:: shell
0e2063c3
PL
97
98 pdnsutil set-meta powerdns.org ALSO-NOTIFY 192.0.2.1:5300
99 pdnsutil set-meta powerdns.org ALLOW-AXFR-FROM 2001:db8:53::1
100
0e2063c3
PL
101
102AXFR-MASTER-TSIG
103----------------
104
105Use this named TSIG key to retrieve this zone from its master, see :ref:`tsig-provision-signed-notify-axfr`.
106
107GSS-ALLOW-AXFR-PRINCIPAL
108------------------------
5e8d94f1
PD
109.. versionchanged:: 4.3.1
110
111 GSS support was removed
112
113.. versionchanged:: 4.7.0
114
115 GSS support was added back
0e2063c3
PL
116
117Allow this GSS principal to perform AXFR retrieval. Most commonly it is
118``host/something@REALM``, ``DNS/something@REALM`` or ``user@REALM``.
119(See :ref:`tsig-gss-tsig`).
120
121GSS-ACCEPTOR-PRINCIPAL
122----------------------
123
124Use this principal for accepting GSS context.
125(See :ref:`tsig-gss-tsig`).
126
127IXFR
128----
129
130If set to 1, attempt IXFR when retrieving zone updates. Otherwise IXFR
131is not attempted.
132
133LUA-AXFR-SCRIPT
134---------------
135
136Script to be used to edit incoming AXFRs, see :ref:`modes-of-operation-axfrfilter`.
137This value will override the :ref:`setting-lua-axfr-script` setting. Use
138'NONE' to remove a global script.
139
140NSEC3NARROW
141-----------
142
143Set to "1" to tell PowerDNS this zone operates in NSEC3 'narrow' mode.
144See ``set-nsec3`` for :doc:`pdnsutil <dnssec/pdnsutil>`.
145
146NSEC3PARAM
147----------
148
149NSEC3 parameters of a DNSSEC zone. Will be used to synthesize the
150NSEC3PARAM record. If present, NSEC3 is used, if not present, zones
151default to NSEC. See ``set-nsec3`` in :doc:`pdnsutil <dnssec/pdnsutil>`.
6830fcce 152Example content: "1 0 0 -".
0e2063c3
PL
153
154.. _metadata-presigned:
155
156PRESIGNED
157---------
158
159This zone carries DNSSEC RRSIGs (signatures), and is presigned. PowerDNS
160sets this flag automatically upon incoming zone transfers (AXFR) if it
161detects DNSSEC records in the zone. However, if you import a presigned
162zone using ``zone2sql`` or ``pdnsutil load-zone`` you must explicitly
163set the zone to be ``PRESIGNED``. Note that PowerDNS will not be able to
164correctly serve the zone if the imported data is bogus or incomplete.
165Also see ``set-presigned`` in :doc:`pdnsutil <dnssec/pdnsutil>`.
166
167If a zone is presigned, the content of the metadata must be "1" (without
168the quotes). Any other value will not signal presignedness.
169
39c73478
PD
170.. _metadata-publish-cdnskey-publish-cds:
171
0e2063c3
PL
172PUBLISH-CDNSKEY, PUBLISH-CDS
173----------------------------
174
02d797b8 175Whether to publish CDNSKEY and/or CDS records as defined in :rfc:`7344`.
0e2063c3
PL
176
177To publish CDNSKEY records of the KSKs for the zone, set
178``PUBLISH-CDNSKEY`` to ``1``.
179
180To publish CDS records for the KSKs in the zone, set ``PUBLISH-CDS`` to
181a comma- separated list of `signature algorithm
182numbers <http://www.iana.org/assignments/ds-rr-types/ds-rr-types.xhtml#ds-rr-types-1>`__.
183
184This metadata can also be set using the
185:doc:`pdnsutil <dnssec/pdnsutil>` commands ``set-publish-cdnskey``
186and ``set-publish-cds``. For an example for an :rfc:`7344` key rollover,
187see the :doc:`guides/kskrollcdnskey`.
188
39c73478
PD
189Global defaults for these values can be set via :ref:`setting-default-publish-cdnskey` and :ref:`setting-default-publish-cds`.
190
7b4e8eed
MH
191.. _metadata-slave-renotify:
192
193SLAVE-RENOTIFY
194--------------
195.. versionadded:: 4.3.0
196
197If set to 1, will make PowerDNS renotify the slaves after an AXFR is received from a master.
198Any other value means that no renotifies are done. If not set at all, action will depend on
199the :ref:`setting-slave-renotify` setting.
200
0e2063c3
PL
201.. _metadata-soa-edit:
202
203SOA-EDIT
204--------
205
206When serving this zone, modify the SOA serial number in one of several
207ways. Mostly useful to get slaves to re-transfer a zone regularly to get
cabb2e9a 208fresh RRSIGs. See the :ref:`DNSSEC
0e2063c3
PL
209documentation <soa-edit-ensure-signature-freshness-on-slaves>`
210for more information.
211
cd46fc6c
PL
212.. _metadata-soa-edit-api:
213
214SOA-EDIT-API
215------------
216
217On changes to the contents of a zone made through the :doc:`API <http-api/index>`,
218the SOA record will be edited according to the SOA-EDIT-API rules. These rules
219are the same as the :ref:`SOA-EDIT-DNSUPDATE <dnsupdate-soa-serial-updates>` rules.
220If not set during zone creation, a SOA-EDIT-API metadata record is created and set to ``DEFAULT``.
221If this record is removed from the backend, the default behaviour is to not do any SOA editing based on this setting.
222This is different from setting ``DEFAULT``.
223
224
0e2063c3
PL
225TSIG-ALLOW-AXFR
226---------------
227
228Allow these named TSIG keys to AXFR this zone, see :ref:`tsig-provision-signed-notify-axfr`.
229
230TSIG-ALLOW-DNSUPDATE
231--------------------
232
233This setting allows you to set the TSIG key required to do an :doc:`dnsupdate`.
234If :ref:`GSS-TSIG <tsig-gss-tsig>` is enabled, you can put kerberos principals here as well.
235
236Extra metadata
237--------------
238
239Through the API and on the ``pdnsutil set-meta`` commandline, metadata
240unused by PowerDNS can be added. It is mandatory to prefix this extra
241metadata with "X-" and the name of the external application; the API
242will only allow this metadata if it starts with "X-".