[
https://jira.jboss.org/jira/browse/GTNPORTAL-1048?page=com.atlassian.jira...
]
Sohil Shah commented on GTNPORTAL-1048:
---------------------------------------
ok so after running lots of scenarios and debugging here is what I have found out:
The core issue probably lies inside PicketLink or the exo identity components that
integrate with it. This issue affects all SSO frameworks, not just OpenSSO. I have can
replicate this issue "intermittently" with CAS and the newly added member
SPNEGO. Here is an explanation of what is going on.
The SSOLoginModules by design do not deal with a password. They deal with a trust token
for each framework, making a trust call back from GateIn, and then establishing an
authenticated Identity based on that trust. The problem lies with the fact that, if a
"password" based validation is not performed inside the LoginModule, looks like
the PicketLink Cache is out of sync with the authenticated state of the session.
When I add the following lines of code to the SSOLoginModule, everything works fine
consistently:
Credential[] credentials = new Credential[]{new UsernameCredential(username), new
PasswordCredential("gtn")};
String userId = authenticator.validateUser(credentials);
This is obviously for testing only. In SSO context, this does not make sense since its a
password-less authentication. The only code that should suffice for SSO is:
Identity identity = authenticator.createIdentity(username);
since the password input/validation is performed at the SSO framework's authentication
server.
Bolek- I hope this is enough narrowed down information to investigate deeper into why the
PL Cache Layer is out of sync.
btw- I did try the SPENGOFilter hack with OpenSSO and CAS, but those two did not work at
all. For some reason the Filter creating a TX context works for SPNEGO, but I seriously
think its not the right solution
GateIn+SSO integration: IdentityException thrown in special case when
HTTP session expire
-----------------------------------------------------------------------------------------
Key: GTNPORTAL-1048
URL:
https://jira.jboss.org/jira/browse/GTNPORTAL-1048
Project: GateIn Portal
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Identity integration
Affects Versions: 3.0.0-GA
Environment: GateIn trunk (revision 2479) with JBoss 5.1.0,
Picketlink IDM version: 1.1.2.CR01,
JOSSO 1.8.1 +Tomcat bundle integrated with GateIn and running on localhost:8888,
Reporter: Marek Posolda
Attachments: identityException-createCriteria.txt,
identityException-screenshot.png
I have GateIn configured with OpenSSO according to instructions in reference guide. And
going throught this scenario:
1) Go to
http://localhist:8080/portal
2) Click to "sign in" and login as root with OpenSSO console. User is
redirected back to GateIn and correctly logged
3) Wait 5 minutes (Assumption is that session expiration is configured to be 1 minute in
gatein.ear/02portal.war/WEB-INF/web.xml)
4) Go to
http://localhost:8080/portal/private/classic . Now I should be logged directly
into GateIn because of SSO cookie. And I am really is logged but I am not seeing user full
name (see attached screenshot). And exception is in server log (IdentityObjectType[USER]
not present in the store. Caused by: org.hibernate.HibernateException: createCriteria is
not valid without active transaction) Full exception is in server log.
I tried to debug and I founded that Hibernate transaction is not started when calling
orgService.getUserHandler().findUserByName(state.getIdentity().getUserId() from
CacheUserProfileFilter. It doesn't occur during normal user login because User object
is cached in PersistenceManagerImpl.findUser(). But problem occur when User is not cached
when findUserByName is called from CacheUserProfileFilter.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira