grant-type:jwt-bearer similar to client credentials but with proper support for URL client_id#2053
Draft
elf-pavlik wants to merge 5 commits intoCommunitySolidServer:mainfrom
Draft
grant-type:jwt-bearer similar to client credentials but with proper support for URL client_id#2053elf-pavlik wants to merge 5 commits intoCommunitySolidServer:mainfrom
elf-pavlik wants to merge 5 commits intoCommunitySolidServer:mainfrom
Conversation
This was referenced Aug 17, 2025
This was referenced Nov 12, 2025
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
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.
Warning
very early and rough draft, practically proof of concept
supersedes #2041
TODO
ClientIDAdapterunless new adapter is neededJwtAssertionsDetailsHandlerTODOCSS JWT assertions authn
CSS supports client credentials which use a combintation of:
and internally has those credentials associated with
webidof the user which created them.Current implementation doesn't support use of URL as
client_id, I made a PR with a naive quick fix. It would be very limited since with multiple tenants only one could register a client with any given URL.RFC7523: JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants defines
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearerwhich can be used together with anassertionencoded as JWT.This allows any user to issue a distinct assertion for the client with a given URL. And when
tokenis requested based on that assertion OP will know which WebID to use aswebidclaim in atoken.assertion
The
assertionis issued by the OP as signed JWTAn example from
Identity.test.tsThe assertion already includes
client_idinclientclaim. It is used due to howoidc-providerpackage work. It might be possible to remove it in the future.current draft
When verified only the signature is checked so it doesn't need to be stored by the OP except for revocations (currently not checked)
An example logged from integration test in
Identity.test.ts{ "client": "http://localhost:6009/client-id", "agent": "http://localhost:6009/test/profile/card#me", "iat": 1755382374900, "jti": "7b65988e-2344-4368-a7ab-2503c4ab8a34" }planned
Sender constrained using client's public key 👇
client authentication
current draft
Effectivelly the assertion acts as client secret (bearer)
planned
RFC7523 also defines
client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearerwhich has a separate JWTclient_assertionwhich is created and signed by the client.It would discover keys based on Client ID document.
Note
This would be in lines of authenticating client based on
redirect_urisin ClientID Document