Enabling single sign on for clients via JWT token configuration
Enabling single sign on for clients via JWT token configuration
As a system programmer, you can customize how JWT authentication is performed, the service that provides the JWT authentication token, whether it's possible to refresh JWT token and other characteristics of JWT for consumption.
- Using SAF as an authentication provider
- Enabling a JWT token refresh endpoint
- Authorization
- Additional customizable properties when using JWT tokens
Using SAF as an authentication provider
By default, the API Gateway uses z/OSMF as an authentication provider. It is possible to switch to SAF as the authentication provider instead of z/OSMF. The intended usage of SAF as an authentication provider is for systems without z/OSMF. If SAF is used and the z/OSMF is available on the system, the created tokens are not accepted by z/OSMF. Use the following procedure to switch to SAF.
- Open the
zowe.yaml
configuration file. - Find or add the following property, and set the value to
saf
:
components.gateway.apiml.security.auth.provider
- Restart Zowe.
Authentication requests now utilize SAF as the authentication provider. API ML can run without z/OSMF present on the system.
Enabling a JWT token refresh endpoint
Enable the /gateway/api/v1/auth/refresh
endpoint to exchange a valid JWT token for a new token with a new expiration date. Call the endpoint with a valid JWT token and trusted client certificate. When using the z/OSMF authentication provider, enable API Mediation Layer for PassTicket generation and configure the z/OSMF APPLID.
For more information, see Configure Passtickets.
- Open the file
zowe.yaml
. - Configure the following properties:
-
components.gateway.apiml.security.allowtokenrefresh: true
Add this property to enable the refresh endpoint. -
components.gateway.apiml.security.zosmf.applid
If you use z/OSMF as an authentication provider, provide a validAPPLID
. The API ML generates a PassTicket for the specifiedAPPLID
and subsequently uses this PassTicket to authenticate to z/OSMF. The default value in the installation of z/OSMF isIZUDFLT
.
Problems have been noted with the functionality of the property components.gateway.apiml.security.allowtokenrefresh
. For more information about the bug, see issue #3468 in the api-layer repo.
We recommend you use the following workaround:
- Configure the following parameter in
environments
:
zowe:
environments:
APIML_SECURITY_ALLOWTOKENREFRESH: true
- Restart Zowe.