[
https://jira.jboss.org/jira/browse/SECURITY-339?page=com.atlassian.jira.p...
]
Marco Schulze commented on SECURITY-339:
----------------------------------------
Dear Anil,
thanks for your quick reply. I'm sorry to say, though, that your hint about the
"multi-threaded" property has nothing, really absolutely nothing to do with the
wrong behaviour that I described here in this issue.
First, I kindly ask you to read my last 2 comments again: It is *not* about different
threads colliding! It is about nested (stacked) logins on the *same* *thread*. And
that's IMHO the sole purpose of the property "restore-login-identity"!
Second, let me point you to the javadoc of ClientLoginModule:
"multi-threaded=[true|false]
When the multi-threaded option is set to true, the SecurityAssociation.setServer()
so that each login thread has its own principal and credential storage."
The "SecurityAssociation.setServer()" has definitely been called in the server
already. It is a *global* (i.e. JVM-wide) flag and I have - of course - debugged this a
long time ago. It is always true in the JBoss - at least I never saw this flag being
false.
Third, let me kindly ask you to look at the initialize(...) method and you'll see
that
- the javadoc is correct and setting this option has really only this one effect,
- the SecurityAssociation.setClient() is only called if you explicitely set this property
to "false", which I (of course) don't do.
Finally, I'd like to mention that I was of course not able to wait for this bug being
fixed and therefore have implemented the correct behaviour (as described in detail in this
issue) into my "real" login-module. Before I was using both login-modules
together. But after having found this bug, I dropped the
org.jboss.security.ClientLoginModule from my login configuration.
I say this, because my login module works absolutely fine and thus proves my error
descriptions as well as my suggested bugfix correct. Thus, please take a look at:
https://svn-de.nightlabs.org/svn/jfire-main/branches/jfire_1.0/JFireInteg...
Best regards, Marco :-)
ClientLoginModule improperly handles SecurityAssociation stack in
abort()
-------------------------------------------------------------------------
Key: SECURITY-339
URL:
https://jira.jboss.org/jira/browse/SECURITY-339
Project: JBoss Security and Identity Management
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JBossSX
Reporter: Marco Schulze
Assignee: Anil Saldhana
Fix For: JBossSecurity_2.0.4
The abort() method calls SecurityAssociationActions.popPrincipalInfo() even though the
corresponding push happens in commit() [via
SecurityAssociationActions.setPrincipalInfo(loginPrincipal, loginCredential, subject)].
That means, whenever a login fails, the commit is not called (thus nothing pushed), but
the abort pops out an element from the stack. This should not be done. IMHO the abort()
method should look like this:
public boolean abort() throws LoginException
{
if( trace )
log.trace("abort");
if( restoreLoginIdentity == false )
{
// Clear the entire security association stack
SecurityAssociationActions.clear();
}
return true;
}
--
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