How are you switching users? What is your client application look like?
I would expect the above is correct when PassthroughAuthentication= true, unless you are re-authenticating the second user independent of Teiid.
(1) All users in this case are part of test-security-domain that uses Login Module "UserRoles"
(2) Our Application is ODATA/JPA resides in the same JBoss AS instance as Teiid. We configure Teiid to use the same security domain as our application's security domain (test-security-domain mentioned above ) and not force the user to re-authenticate.
(3) Debugging Teiid 8.7 source code indicated the second user's security context with correct subject was pass to Teiid/JBOSS, but it failed to find it during authenticate() after it closed the session to use second user's security context.
IMO, there is not much you gain from using switching user on LocalConnection as there is minimal overhead and no socket connection. However, if need to switch user i.e re-use same connection with different user, you need to use procedure defined here https://docs.jboss.org/author/display/TEIID/Reauthentication.
When using the pass through authentication, I am not sure how you configured. Did you configure data source configuration in standalone-teiid.xml for LocalConnection? Or you trying to create one dynamically? I do not think Teiid even supports this!
Ramesh, thanks for the response.
(1) We didn't configure data source for LocalConnection.
(2) We have been using Teiid local connection and pass through authentication to get data source metadata for quite a while without any issue. we created Teiid local connection using:
(3) Now there is a need in our application to retrieve the user specific information along with data source metadata and we try to use same teiid local connection session but different users.
(4) I will try out the suggested Teiid procedure and posted on the forum..
we have changed to access data source defined in standalone-.xml and not trying to create one dynamically. Now Teiid is able to switch identity without any issue.
Thank you very much for all your help.