systemd icon indicating copy to clipboard operation
systemd copied to clipboard

resolved: allow configuring DNSSEC signature algorithms and digests

Open msekletar opened this issue 1 year ago • 4 comments

Filing as a draft to get initial idea from folks about the general approach.

Btw, this was lightly test on my machine and with the patch resolved starts and it seems to work as expected but I haven't spent too much time trying to crash it.

msekletar avatar Oct 27 '23 18:10 msekletar

why? i mean, the DNS servers publish what the DNS servers publish, we have to work with that

poettering avatar Oct 30 '23 21:10 poettering

System-wide policy for crypto libraries might be such that some algorithm is disabled and library returns error (e.g. RSASHA1 by default on RHEL-9) and then we would also return resolution error when DNSSEC=yes. But with this option (e.g. DNSSECAlgorithms=~RSASHA1) you can soften this and just return "authenticated: no" validation result instead of failing resolving. DNSSEC validators in bind and knot implement similar behavior.

msekletar avatar Oct 31 '23 12:10 msekletar

Updated. @poettering @keszybz PTAL.

msekletar avatar Jan 04 '24 16:01 msekletar

1191s ../src/resolve/resolved-dns-query.c: In function ‘dns_query_accept’:
1191s ../src/resolve/resolved-dns-query.c:944:27: error: ‘r’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
1191s   944 |         q->answer_errno = -r;
1191s       |                           ^~
1191s cc1: all warnings being treated as errors

This is already fixed by 5169f8cfd543cbce498871527ea8aa454ff2c252. Please rebase.

yuwata avatar Jan 11 '24 05:01 yuwata

We discussed this again, and the conclusion was that it does not play nicely with the global openssl policy. In resolved, we could limit what algorithms are supported, but we cannot bring back the algorithms that were disabled by policy. So anyway, the user will have to configure the policy, and it's not useful to provide a second layer of configuration.

If openssl would allow the policy to be configured by the application, doing this here would make a lot more sense.

keszybz avatar Jun 26 '24 08:06 keszybz