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

Add signature context #2222

Merged
merged 5 commits into from
Aug 15, 2022
Merged

Add signature context #2222

merged 5 commits into from
Aug 15, 2022

Conversation

jricher
Copy link
Contributor

@jricher jricher commented Jul 15, 2022

Adds an optional context parameter to signatures, to allow applications to signal specific usage between the signer and verifier.

Closes #2133

This PR does not add this to any examples yet, but we probably should if accepted.

Co-authored-by: Yaron Sheffer <yaronf@gmx.com>
Copy link
Contributor

@richanna richanna left a comment

Choose a reason for hiding this comment

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

I remain unconvinced that context provides any real value, so I'm against including it in the spec. If we do end up including it anyway, we must not imply that it provides security benefits that it does not.

@@ -480,6 +480,7 @@ The signature parameters component value is the serialization of the signature p
* `nonce`: A random unique value generated for this signature as a String value.
* `alg`: The HTTP message signature algorithm from the HTTP Message Signature Algorithm Registry, as a String value.
* `keyid`: The identifier for the key material as a String value.
* `context`: A context for the signature as a String value. This value is used by applications to help identify the signature's validity in specific applications or protocols. Context is often needed for avoiding cross-protocol attacks.
Copy link
Contributor

@richanna richanna Jul 29, 2022

Choose a reason for hiding this comment

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

Suggested change
* `context`: A context for the signature as a String value. This value is used by applications to help identify the signature's validity in specific applications or protocols. Context is often needed for avoiding cross-protocol attacks.
* `context`: A context for the signature as a String value. This value may be used by applications to help identify the intended usage of the signature.

I'm still not thrilled by the second sentence, but this wording seems more accurate to me. The third sentence is simply not true. Signing all components that are semantically meaningful to the application will prevent cross-protocol attacks in most cases; in the remaining cases, there is no reason to assume context will provide any additional mitigation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The third sentence was added by @yaronf in 1c081b0. I'm actually fine with backing it off from here because the discussion really should be in a larger space about using the context, in security considerations or something like that.

@jricher
Copy link
Contributor Author

jricher commented Aug 12, 2022

@richanna @yaronf I've walked the language in the definition back a bit and added it to an example. I think this is sufficient to include as a new feature.

@jricher jricher requested review from yaronf and richanna and removed request for yaronf August 12, 2022 22:01
Copy link
Contributor

@yaronf yaronf left a comment

Choose a reason for hiding this comment

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

Works for me. Thanks!

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

Successfully merging this pull request may close these issues.

Signature Context
3 participants