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 RFC for JWS-signing PGXN releases #5

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

theory
Copy link
Member

@theory theory commented Sep 18, 2024

No description provided.

@theory theory added the enhancement New feature or request label Sep 18, 2024
@theory theory self-assigned this Sep 18, 2024
text/0000-release-meta-spec-v2.md Outdated Show resolved Hide resolved
text/0000-release-meta-spec-v2.md Show resolved Hide resolved
text/0000-release-meta-spec-v2.md Outdated Show resolved Hide resolved
text/0000-release-meta-spec-v2.md Outdated Show resolved Hide resolved
@theory theory added rfc New RFC and removed enhancement New feature or request labels Sep 19, 2024
Also add some items to the "Unresolved questions" section and a "Future
possibilities" item for author signing.
text/0000-release-meta-spec-v2.md Outdated Show resolved Hide resolved
text/0000-release-meta-spec-v2.md Outdated Show resolved Hide resolved
text/0000-release-meta-spec-v2.md Outdated Show resolved Hide resolved
Comment on lines 77 to 78
"protected":"eyJhbGciOiJSUzI1NiJ9",
"header": {"kid": "2024-12-29" },

Choose a reason for hiding this comment

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

Normally a JWS is like headerB64.payloadB64.signatureB64, and therefore I am wondering about why the payload is separate from the header and signature. I believe it is like that in order to support multiple signatures.

Questions to consider are...

  • is it necessary to support multiple signatures?
  • For 'protected' and 'header', both of these parts typically included in the "header" as described in RFC 7515, so why not combine that into just 'header' as b64 encoded.
  • Wondering because if you take the payload, the header (as suggested in previous comment), signature, and concatenate them with "." joined (RFC7515 section 3.3), then would that make it exactly like a "normal" signature? i.e. easier to use with existing clients that do signature validation maybe.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's an official RFC 7515 format called JWS JSON Serialization. We don't need URL-safe serialization, so this is just a little friendlier for clients. And yes, it allows multiple signatures, which could be useful for author signing or gradual key rotation.

  1. I think it's useful to support multiple signatures because, unlike ephemeral HTTP requests, there's are records at rest and will be around for many years.
  2. protected and header are not combined because the JWS JSON Serialization format separates them.
  3. Clients should also support this format, as it's part of the standard. But even if they don't, conversion will be trivial, as you point out.

Really I wanted the payload not to be Base64 URL-encoded, as specified in JWS-JS, but I believe that spec was abandoned in favor of RFC 7515 JWS JSON Serialization, so going with that approved standard, instead.

Copy link

@sjmiller609 sjmiller609 left a comment

Choose a reason for hiding this comment

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

Embedding the public key in clients seems questionable to me, but looks good otherwise.

@theory
Copy link
Member Author

theory commented Sep 23, 2024

Embedding the public key in clients seems questionable to me, but looks good otherwise.

Switched to talking about downloading and using a JWK Set in 01140f3.

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

Successfully merging this pull request may close these issues.

3 participants