FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: public jwks by woutermont · Pull Request #1865 · CommunitySolidServer/CommunitySolidServer · GitHub

feat: public jwks - #1865

Draft
woutermont wants to merge 3 commits into
mainfrom
feat/jwks
Draft

feat: public jwks#1865
woutermont wants to merge 3 commits into
mainfrom
feat/jwks

Conversation

Copy link
Copy Markdown
Contributor

This PR adds a JwksHandler that publishes the public key of a JwksGenerator as a JWK Set on a given path.

woutermont marked this pull request as draft March 13, 2024 07:26

Copy link
Copy Markdown
Contributor Author

Marked this as draft because I still need to add a change to the JwksGenerator to include key ids, but the code that is already here can be reviewed.

joachimvh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is to support the UMA implementation right? I'm thinking it might be better to include it in the configs specifically for that so this is only enabled when setting up as an RS for an UMA server.

Comment on lines +19 to +30
const { method, url } = request;

if (!allowedMethods.has(method)) {
throw new MethodNotAllowedHttpError(
methodsNotAllowed,
`Only GET or HEAD requests can target the storage description.`,
);
}

if (url !== this.path) {
throw new NotImplementedHttpError(`This handler is not configured for ${url}`);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

There is a RouterHandler class that we generally use to cover these cases, that can wrap around this one. If you looked at the StaticAssetHandler for inspiration, that one doesn't have it because it was made before we had that and we never bothered to update.

Copy link
Copy Markdown
Contributor Author

We use this in the UMA setup, yes, but I specifically separated it because it can also be used by packaging (signatures as provenance), HTTP Message Signatures (used in GNAP, which I hope to work on soon), and in fact any protocol relying on server-wide asymmetric crypto (often on the Well-Known jwks path).

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
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.

2 participants


Back | FazBrowse Home | New Git URL