Conversation
|
!build Note: Target locations of links might be accessible only to IBM employees. |
|
!build Note: Target locations of links might be accessible only to IBM employees. |
Code analysis and actionsDO NOT DELETE THIS COMMENT.
|
5a230b6 to
5445ead
Compare
Code analysis and actionsDO NOT DELETE THIS COMMENT.
|
…element
Adds two new configuration attributes to the MicroProfile JWT <mpJwt>
element to give operators control over realm resolution:
realmName - static string; when set, always used as the realm
realmIdentifier - JWT claim name to read the realm from (default: \"realm\")
Resolution order mirrors openidConnectClient behaviour:
1. realmName (if non-empty)
2. claim named by realmIdentifier
3. iss fallback
Fixes a customer issue (TS022732550) where an IdP issues tokens with
\"realm\": \"/idbroker\" (slash-prefixed). The slash caused
AccessIdUtil.matcher() to return null, which broke authentication.
Setting realmName=\"myapp\" in <mpJwt> bypasses the problematic claim
entirely and authentication succeeds.
Components changed:
com.ibm.ws.security.mp.jwt - metatype, config interface/impl,
JwtPrincipalMapping, TAIMappingHelper,
unit tests
com.ibm.ws.security.jwtsso - stub getters in JwtSsoComponent
com.ibm.ws.security.mp.jwt.1.1_fat - MPJwtRealmConfigTests + 4 server
configs + FATSuite registration"
5445ead to
97ef88c
Compare
|
!build Note: Target locations of links might be accessible only to IBM employees. |
|
!build Note: Target locations of links might be accessible only to IBM employees. |
|
Fixes #35741 |
Code analysis and actionsDO NOT DELETE THIS COMMENT.
|
1 similar comment
Code analysis and actionsDO NOT DELETE THIS COMMENT.
|
jantley-ibm
left a comment
There was a problem hiding this comment.
Minor ID review comment attached. I will add the "ID reviewed" label when we agree on edits. Let me know if you have any questions or concerns. Thanks!
36fd84d to
79bb402
Compare
- Remove the redundant 4-arg JwtPrincipalMapping constructor; update the only call site (TAIMappingHelper no-config constructor) to pass "realm" explicitly to the 5-arg constructor instead of relying on the null fallback path. - Gate setRealm() on mapToUserRegistry, matching the openidConnectClient pattern in AttributeToSubject. When mapToUserRegistry is true, realm resolution (realmName, realmIdentifier, iss fallback) is skipped entirely since the user registry provides the identity. - Align metatype.properties NLS strings for realmIdentifier and realmName with the openidConnectClient equivalents, substituting "JWT token" for "ID token" and "mapToUserRegistry" for "mapIdentityToRegistryUser". Add the "do not translate mapToUserRegistry" translator hint.
79bb402 to
ffb3a3b
Compare
|
!build Note: Target locations of links might be accessible only to IBM employees. |
|
!build Note: Target locations of links might be accessible only to IBM employees. |
Code analysis and actionsDO NOT DELETE THIS COMMENT.
|
1 similar comment
Code analysis and actionsDO NOT DELETE THIS COMMENT.
|
- metatype.properties: clarify realmName.desc to state it overrides the realm claim in the token - JwtPrincipalMapping: move null-check/REALM_CLAIM fallback into getRealm() and drop unnecessary isEmpty() guard on realmIdentifierAttr - TAIMappingHelper: simplify setRealm() by eliminating duplicate getMappedRealm() call; add Javadoc describing realm resolution priority
|
!build Note: Target locations of links might be accessible only to IBM employees. |
Code analysis and actionsDO NOT DELETE THIS COMMENT.
|
Adds two new configuration attributes to the MicroProfile JWT element to give operators control over realm resolution:
realmName - static string; when set, always used as the realm
realmIdentifier - JWT claim name to read the realm from (default: "realm")
Resolution order mirrors openidConnectClient behaviour:
Fixes a customer issue (TS022732550) where an IdP issues tokens with "realm": "/idbroker" (slash-prefixed). The slash caused AccessIdUtil.matcher() to return null, which broke authentication. Setting realmName="myapp" in bypasses the problematic claim entirely and authentication succeeds.
Components changed:
com.ibm.ws.security.mp.jwt - metatype, config interface/impl,
JwtPrincipalMapping, TAIMappingHelper,
unit tests
com.ibm.ws.security.jwtsso - stub getters in JwtSsoComponent
com.ibm.ws.security.mp.jwt.1.1_fat - MPJwtRealmConfigTests + 4 server
configs + FATSuite registration"
release buglabel if applicable: https://github.com/OpenLiberty/open-liberty/wiki/Open-Liberty-Conventions).