You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7de2de4
Browse filesBrowse the repository at this point in the historyBrowse files
fix(auth): allow public CIMD clients to use the jwt-bearer grant
The enterprise-managed authorization extension (section 5) lets a client
that is not pre-registered use its Client ID Metadata Document URL as
client_id and present an ID-JAG without client authentication. The token
handler rejected every secretless client for this grant.
Add OAuthAuthorizationServerProvider.is_metadata_document_client
(default False). When it returns True for a secretless client, the
handler accepts the grant if the ID-JAG's client_id claim names the
requesting client, and otherwise answers invalid_grant. Advertise none
in token_endpoint_auth_methods_supported when identity assertion is
enabled.
Fixes#3598
Copy file name to clipboardExpand all lines: docs/client/identity-assertion.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,7 @@ The SDK can also *be* the authorization server: `create_auth_routes` returns the
85
85
```
86
86
87
87
*`identity_assertion_enabled=True` gates everything. Off, which is the default, `/token` answers this grant with `unsupported_grant_type` even if you implemented the hook, and the metadata does not mention it. On, the metadata gains the `jwt-bearer` grant type and lists `urn:ietf:params:oauth:grant-profile:id-jag` in `authorization_grant_profiles_supported`, the field the extension uses to advertise support. (This SDK's client never reads it: it is provisioned for one issuer and simply asks.)
88
-
***`exchange_identity_assertion`** is the hook. Before it runs, the SDK has authenticated the client, refused public clients, and refused clients whose registration does not list the grant. You get an `IdentityAssertionParams` (the raw `assertion`, the requested `scopes` and `resource`) and return a plain `OAuthToken`.
88
+
***`exchange_identity_assertion`** is the hook. Before it runs, the SDK has authenticated the client, refused public clients (unless `is_metadata_document_client` reports the client was resolved from a Client ID Metadata Document and the ID-JAG's `client_id` claim names it), and refused clients whose registration does not list the grant. You get an `IdentityAssertionParams` (the raw `assertion`, the requested `scopes` and `resource`) and return a plain `OAuthToken`.
89
89
* Dynamic client registration refuses this grant unconditionally, so `get_client` here serves a hand-provisioned client. An ID-JAG client cannot register itself into existence.
90
90
* Half the class is refusals. `OAuthAuthorizationServerProvider` is the *whole* authorization server, so it also asks for the authorization-code flow; a server that signs users in as well implements those for real, and this one has exactly one door.
0 commit comments