Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid using the key tag in the filename for a key. #40

Open
Philip-NLnetLabs opened this issue Nov 29, 2024 · 2 comments
Open

Avoid using the key tag in the filename for a key. #40

Philip-NLnetLabs opened this issue Nov 29, 2024 · 2 comments
Labels

Comments

@Philip-NLnetLabs
Copy link
Member

For the keygen subcommand:

When a zone has multiple keys with the same key tag, making filenames unique using the key tag would fail. Use something like a SHA-2 hash instead. This does not impact the ldns-keygen mode.

@bal-e
Copy link
Contributor

bal-e commented Nov 29, 2024

At the moment, dnst-keygen will fail if it has to overwrite any existing files. This means that if another file with the same name K<name>+<alg>+<keytag>.* exists, it won't be overwritten. However, keytag collisions across names and algorithms are not currently detected. Given that e.g. the EDNS key-tag option doesn't account for names and algorithms, only for keytags, I agree that we should check for keytags across names and algorithms. But it's hard to do this comprehensively.

@Philip-NLnetLabs
Copy link
Member Author

we should avoid K++.* because we don't know where they end up. An operator may generate a new key in an empty directory and copy the files somewhere else. Using key tags in filenames is a bad habit we need to get rid of.

We can do two things: one iterate over 'K'* and collect all key tags we can find. The other is to add an option where the user can give a list of files from which to extract key tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants