Configuring JSON Web Token authentication for OpenID Connect
You can configure a Liberty server to accept a JSON Web Token (JWT) token as an authentication token from a trusted authentication proxy, a trusted service client, or an OAuth authorization server.
About this task
Documentation for JSON Web Token authentication for OpenID Connect can be found on the Open Liberty website.
To configure a Liberty server to accept a
JWT token as an authentication token, enable the openidConnectClient-1.0
feature,
set inboundPropagation="required"
, and configure a truststore and SSL. You can
optionally specify additional JWT configuration, such as user registries, authentication filters,
and claim-to-subject mapping. The configuration for using JWT as an authentication token is similar
to Configuring an OpenID Connect Client in Liberty.
Any trusted party in possession of a JWT token can use that token to get access to the associated
resources in Liberty. The Liberty resource server validates the JWT token
and creates the authenticated subject from the JWT token. To be accepted as an authentication token,
the JWT token must contain iss
, sub
, and exp
claims and be signed with the RS256 or HS256 algorithm. In version 21.0.0.12 and earlier, encrypted
JWT is not supported.
In version 22.0.0.1 and later, encrypted JWT is supported. For more
information, see the Open Liberty website
{
"iss":"https://idp.acme.com:8020/jwt",
"sub":"marissa@acme.com",
"exp":1385066178,
"aud":"https://resource.acme.com/services",
"iat":1385062578,
"groupIds": [
"group1", "group2"
]
}