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

Do not sign BADKEY and BADSIG TSIG error responses #1316

Merged
merged 3 commits into from Dec 20, 2021

Conversation

chrisohaver
Copy link
Contributor

Per RFC 8945 5.3.2, responses with BADKEY and BADSIG errors must not be signed.

When a server detects an error relating to the key or MAC in the
incoming request, the server SHOULD send back an unsigned error
message (MAC Size == 0 and empty MAC). It MUST NOT send back a
signed error message.

https://datatracker.ietf.org/doc/html/rfc8945#section-5.3.2

Signed-off-by: Chris O'Haver cohaver@infoblox.com

@miekg
Copy link
Owner

miekg commented Dec 3, 2021

Good catch. The PR description should at least also show up in the commit and commit title could also just be the PR title used here.

tsig.go Outdated Show resolved Hide resolved
tsig.go Outdated Show resolved Hide resolved
tsig.go Outdated Show resolved Hide resolved
…be signed.

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
@chrisohaver
Copy link
Contributor Author

Good catch. The PR description should at least also show up in the commit and commit title could also just be the PR title used here.

Commits squashed with a more descriptive commit message. "Per RFC 8945 5.3.2, responses with BADKEY and BADSIG errors must not be signed."

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
tsig.go Outdated Show resolved Hide resolved
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
Copy link
Collaborator

@tmthrgd tmthrgd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@miekg miekg merged commit 3a58872 into miekg:master Dec 20, 2021
aanm pushed a commit to cilium/dns that referenced this pull request Jul 29, 2022
* Per RFC 8945 5.3.2, responses with BADKEY and BADSIG errors must not be signed.

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* refactor to remove else block

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* skip signing only for BADKEY and BADSIG

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants