Hello IBM Folks,
I need to get a rather strange authentication/authorization scenario working for our WEB application deployed on a traditional WebSphere 9.0.5.10:
I have two user repositories:
1. A OpenIDRepository, which is managed by a n OpenID connect provider and configured as trusted authentication realm in WebSphere
2. A StandaloneCustomRegistry
All users and groups are contained in the StandaloneCustomRegistry. Some users/groups (which need SSO for another appplication) are contained in the OpenIDRepository, too.
I mapped certain groups of both registries to application roles, to authorize users in both registries to access the application pages, e.g:
Role_A -> Group_A@OpenIDRepository
Role_B -> Group_B@StandaloneCustomRegistry
I configured an OpenID Relying Party to call the authentication endpoint in our WEB application. The authentication endpoint requests username and password from the user and checks if the user is contained in the StandaloneCustomRegistry. If the user has a role, which requires SSO, the user agent is redirected to the redirection URI of the RP with an authorization code. The RP exchanges the tokes with the OpenID provider and redirects the user agent to the requested (protected) page. So far, so good!
If the user doesn't require SSO, I just call the method HttpServletRequest.login() to authenticate the user by the StandaloneCustomRegistry. Then the user agent should just be redirected to the requested application page. And here starts my problem:
If I redirect the user to the application page, the OpenID interceptor (RP) redirects the user agent again to the authentication endpoint, because it doesn't recognize, that the user is authenticated. If I redirect the user agent to the redirection URI of the RP with an error code (e.g. invalid_client. interaction_required) the RP logs an error and aborts the authentication process.
So, the question is: is there a way to tell the RP to continue if the user is authenticated and authorized by the StandaloneCustomRegistry? Or is there another way to achieve our needs?
Kind regards
Thomas
------------------------------
Thomas Mayr
------------------------------