feat: manage TLSA records
Test / test (push) Successful in 28m4s
Build and publish image / image (push) Successful in 28m43s

This commit is contained in:
bryanpedini committed 2026-11-22 11:31:59 +01:00
1 parent 9c2fb9d15b
commit a67183b646
14 files changed
+141 -15

No files matched your search

+8
View File
@@ -168,6 +168,8 @@ test.describe('core flow', () => {
nosrv: { name: '_none._tcp', type: 'SRV', ttl: 3600, data: { priority: 0, weight: 0, port: 0, target: '.' } },
caa: { name: '', type: 'CAA', ttl: 3600, data: { flag: 0, tag: 'issue', value: 'ca.example.net' } },
iodef: { name: '', type: 'CAA', ttl: 3600, data: { flag: 128, tag: 'iodef', value: 'mailto:security@example.net' } },
tlsa: { name: '_25._tcp.mail', type: 'TLSA', ttl: 3600, data: { usage: 3, selector: 1, matching_type: 1, certificate: '0123456789abcdef'.repeat(4) } },
tlsafull: { name: '_443._tcp.www', type: 'TLSA', ttl: 300, data: { usage: 0, selector: 1, matching_type: 0, certificate: '302a300506032b6570032100d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a' } },
sub: { name: 'sub', type: 'NS', ttl: 3600, data: { host: 'ns.example.net.' } },
wild: { name: '*', type: 'A', ttl: 0, data: { ip: '192.0.2.99' } },
wilddev: { name: '*.dev', type: 'TXT', ttl: 600, data: { text: 'wildcard dev' } },
@@ -235,6 +237,8 @@ test.describe('core flow', () => {
await add('SRV with the . target', R.nosrv, input(R.nosrv, { priority: '0', weight: '0', port: '0', target: '.' }));
await add('CAA issue', R.caa, input(R.caa, { flag: '0', tag: 'issue', value: 'ca.example.net' }));
await add('CAA iodef critical', R.iodef, input(R.iodef, { flag: '128', tag: 'iodef', value: 'mailto:security@example.net' }));
await add('TLSA DANE-EE SHA-256 pasted with colons and uppercase', R.tlsa, input(R.tlsa, { usage: '3', selector: '1', matching_type: '1', certificate: '01:23:45:67:89:AB:CD:EF:'.repeat(4).slice(0, -1) }));
await add('TLSA with zero usage and exact match', R.tlsafull, input(R.tlsafull, { usage: '0', selector: '1', matching_type: '0', certificate: String(R.tlsafull.data.certificate) }));
await add('NS of a delegated subdomain', R.sub, input(R.sub, { host: 'ns.example.net' }));
await add('wildcard A with TTL 0', R.wild, input(R.wild, { ip: '192.0.2.99' }));
await adminUi.expectRow({ name: '*', type: 'A', value: '192.0.2.99', ttl: 'default (360 s)' });
@@ -271,6 +275,9 @@ test.describe('core flow', () => {
R.srv = { ...R.srv, data: { ...R.srv.data, port: 5061 } };
await edit('edit CAA value', R.iodef, { ...R.iodef, data: { flag: 128, tag: 'iodef', value: 'mailto:dns@example.net' } }, input(R.iodef, { flag: '128', tag: 'iodef', value: 'mailto:dns@example.net' }));
R.iodef = { ...R.iodef, data: { flag: 128, tag: 'iodef', value: 'mailto:dns@example.net' } };
const sha512 = 'fedcba9876543210'.repeat(8);
await edit('edit TLSA to SHA-512', R.tlsa, { ...R.tlsa, data: { usage: 2, selector: 0, matching_type: 2, certificate: sha512 } }, input(R.tlsa, { usage: '2', selector: '0', matching_type: '2', certificate: sha512 }));
R.tlsa = { ...R.tlsa, data: { usage: 2, selector: 0, matching_type: 2, certificate: sha512 } };
await edit('edit NS host', R.sub, { ...R.sub, data: { host: 'ns2.example.net.' } }, input(R.sub, { host: 'ns2.example.net.' }));
R.sub = { ...R.sub, data: { host: 'ns2.example.net.' } };
await edit('edit wildcard address', R.wild, { ...R.wild, data: { ip: '192.0.2.98' } }, input(R.wild, { ip: '192.0.2.98' }));
@@ -287,6 +294,7 @@ test.describe('core flow', () => {
await del('delete long TXT', R.longtxt);
await del('delete SRV with the . target', R.nosrv);
await del('delete CAA', R.iodef);
await del('delete TLSA', R.tlsafull);
await del('delete NS of the subdomain', R.sub);
await del('delete wildcard TXT', R.wilddev);
await del('delete one A of an RRset', R.www2);