grant-type:jwt-bearer similar to client credentials but with proper support for URL client_id #2053
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
ClientIDAdapter
unless new adapter is neededJwtAssertionsDetailsHandler
TODO
CSS JWT assertions authn
CSS supports client credentials which use a combintation of:
and internally has those credentials associated with
webid
of 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-bearer
which can be used together with anassertion
encoded as JWT.This allows any user to issue a distinct assertion for the client with a given URL. And when
token
is requested based on that assertion OP will know which WebID to use aswebid
claim in atoken
.assertion
The
assertion
is issued by the OP as signed JWTAn example from
Identity.test.ts
The assertion already includes
client_id
inclient
claim. It is used due to howoidc-provider
package 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
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-bearer
which has a separate JWTclient_assertion
which 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_uris
in ClientID Document