We are implementing a Single Sign-On (SSO) integration between Pega and Keycloak. Due to specific architectural requirements, we are using an Authentication Service of type “Custom” rather than the standard “OpenID Connect” type.
Our service is configured with a custom authentication activity named CustomJWTSSO. However, when accessing the login URL (.../prweb/PRAuth/TestSSO), the browser displays the standard Pega Login screen instead of redirecting the user to the Keycloak authorization endpoint.
We require technical guidance on the following:
-
The Challenge Phase: What is the recommended Pega pattern/method (e.g.,
Redirect-URL) to programmatically trigger the redirect to the Keycloak Auth URL within the custom activity when no authorization code is present? -
Token Exchange: Best practices for handling the subsequent back-channel
Connect-RESTcall to the Keycloak/tokenendpoint to exchange thecodefor a JWT. -
JWT Validation: How to properly invoke a Token Profile and Keystore within the custom activity to verify the Keycloak signature