-
Notifications
You must be signed in to change notification settings - Fork 9
Add encrypted JWPs #136
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
Merged
Merged
Add encrypted JWPs #136
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -451,6 +451,29 @@ This example flattened JSON serialization shows the presentation form with both | |
<{{./fixtures/build/bbs-holder.json.jwp.wrapped}}> | ||
Figure: JSON Serialization of Presentation | ||
|
||
# Encrypted JSON Web Proofs | ||
|
||
Access to JWPs containing non-public material | ||
by parties without legitimate access to the non-public information | ||
MUST be prevented. | ||
This can be accomplished by encrypting the JWP | ||
when potentially observable by such parties | ||
to prevent the disclosure of private information. | ||
The use of an Encrypted JWP, which is a JWE [@!RFC7516] | ||
with a JWP as its plaintext value, | ||
is recommended for this purpose. | ||
The processing of Encrypted JWPs is identical to | ||
the processing of other JWEs. | ||
|
||
A `cty` (content type) Header Parameter value of `jwp` is used to indicate | ||
that the content of the JWE is a JWP using the JWP Compact Serialization. | ||
A `cty` (content type) Header Parameter value of `jwp+json` is used to indicate | ||
that the content of the JWE is the UTF-8 encoding of a JWP using the JWP JSON Serialization. | ||
In both cases, the `cty` (content type) Header Parameter MUST be present | ||
unless the application knows that the encrypted content is | ||
a JWP by another means or convention, | ||
in which case the `cty` value would typically be omitted. | ||
|
||
# Security Considerations {#SecurityConsiderations} | ||
|
||
Notes to be expanded: | ||
|
@@ -657,7 +680,8 @@ This section registers the `+jwp` | |
structured syntax suffix [@RFC6838] | ||
in the IANA "Structured Syntax Suffix" registry (#IANA.StructuredSuffix) | ||
in the manner described in [@RFC6838], | ||
which can be used to indicate that the media type is encoded as a JWP. | ||
which can be used to indicate that the media type is encoded as a JWP | ||
using the JWP Compact Serialization. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
||
#### The +jwp Structured Syntax Suffix | ||
|
||
|
@@ -767,7 +791,8 @@ for his valuable contributions to this specification. | |
|
||
[[ To be removed from the final specification ]] | ||
|
||
* Update reference to new repository home | ||
* Update reference to new repository home. | ||
* Fixed #83: Added encrypted JWPs. | ||
|
||
-05 | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These seem like they should be identical to the guidance in JWP around
typ
- if present, they SHOULD be the effective media type of the contained JWP. This MAY be in the JWP as thetyp
protected header parameter, or omitted from the JWP based on context.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would need to define two new "typ" values saying that the whole thing is an encrypted JWT using one or the other serializations if we were to go that route. But it would be better to use application-defined "typ" values using the +jwp suffix and/or application-defined "typ" values using the JSON Serialization.
Instead, the encryption treatment is intentionally exactly the same as for JWKs. Compare the language in this PR with that at https://www.rfc-editor.org/rfc/rfc7517.html#section-7 and let me know if there are changes you'd like to make it even more paralle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait - I get it now. Now that we have explicit typing, we should use the "typ" value of the enclosed JWP as the JWE "cty" value. I'll take a stab at that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dwaite I updated the description to cater to explicit typing. Please re-review.