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
Principal extraction from nested username claim was broken (#194)
* Principal extraction from nested username claim was broken
Signed-off-by: Marko Strukelj <[email protected]>
* Add proper support for nested claims
Signed-off-by: Marko Strukelj <[email protected]>
* Address PR comments and suggestions
Signed-off-by: Marko Strukelj <[email protected]>
* Remove testsuite run using Kafka 3.3.2 from Travis build
Signed-off-by: Marko Strukelj <[email protected]>
* Replace custom parsing with JsonPath already used for groups extraction
Signed-off-by: Marko Strukelj <[email protected]>
* Fix javadoc issue
Signed-off-by: Marko Strukelj <[email protected]>
---------
Signed-off-by: Marko Strukelj <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -316,12 +316,12 @@ If the configured `oauth.client.id` is `kafka`, the following are valid examples
316
316
317
317
JWT tokens contain unique user identification in `sub` claim. However, this is often a long number or a UUID, but we usually prefer to use human-readable usernames, which may also be present in JWT token.
318
318
Use `oauth.username.claim` to map the claim (attribute) where the value you want to use as user id is stored:
-`oauth.username.claim` (e.g.: "preferred_username", for nested attributes use `[topAttrKey].[subAttrKey]`. Claim names can also be single quoted: `['topAttrKey'].['subAttrKey']`)
320
320
321
321
If `oauth.username.claim` is specified the value of that claim is used instead, but if not set, the automatic fallback claim is the `sub` claim.
322
322
323
323
You can specify the secondary claim to fall back to, which allows you to map multiple account types into the same principal namespace:
-`oauth.fallback.username.claim` (e.g.: "client_id", for nested attributes use `[topAttrKey].[subAttrKey]`. Claim names can also be single quoted: `['topAttrKey'].['subAttrKey']`)
If `oauth.username.claim` is specified but value does not exist in the token, then `oauth.fallback.username.claim` is used. If value for that doesn't exist either, the exception is thrown.
@@ -400,10 +400,10 @@ Introspection Endpoint may or may not return identifying information which we co
400
400
If the information is available we attempt to extract the user id from Introspection Endpoint response.
401
401
402
402
Use `oauth.username.claim` to map the attribute where the user id is stored:
-`oauth.username.claim` (e.g.: "preferred_username", for nested attributes use `[topAttrKey].[subAttrKey]`. Claim names can also be single quoted: `['topAttrKey'].['subAttrKey']`)
404
404
405
405
You can fall back to a secondary attribute, which allows you to map multiple account types into the same user id namespace:
-`oauth.fallback.username.claim` (e.g.: "client_id", for nested attributes use `[topAttrKey].[subAttrKey]`. Claim names can also be single quoted: `['topAttrKey'].['subAttrKey']`)
If `oauth.username.claim` is specified but value does not exist in the Introspection Endpoint response, then `oauth.fallback.username.claim` is used. If value for that doesn't exist either, the exception is thrown.
@@ -985,7 +985,7 @@ Audience is sent to the Token Endpoint when obtaining the access token.
985
985
986
986
For debug purposes you may want to properly configure which JWT token attribute contains the user id of the account used to obtain the access token:
-`oauth.username.claim` (e.g.: "preferred_username", for nested attributes use `[topAttrKey].[subAttrKey]`. Claim names can also be single quoted: `['topAttrKey'].['subAttrKey']`)
989
989
990
990
This does not affect how Kafka client is presented to the Kafka Broker.
991
991
The broker performs user id extraction from the token once again or it uses the Introspection Endpoint or the User Info Endpoint to get the user id.
0 commit comments