-
1. Re: Custom Login-Module for JBOSS AS 7
anil.saldhana Nov 7, 2011 2:58 PM (in response to firstlion)http://community.jboss.org/wiki/SAMLWebBrowserSSOOnJBossAS70
Did you try out the ServerEnvironment attribute set to "jboss" in picketlink-idfed.xml?
-
2. Re: Custom Login-Module for JBOSS AS 7
firstlion Nov 8, 2011 2:49 AM (in response to anil.saldhana)Thanks for your answer. Yes, the attribute is set to "jboss". But this doesn't change anything, because the ServerDetector just checks the following:
Class clazz = SecurityActions.loadClass(super.getClass(), "org.jboss.system.Service"); if (clazz != null) { this.jboss = true; return; }
This is done twice in the class "SPPostFormAuthenticator", once at startup in the constructor and the second one in the query, that i mentioned before.
So the parameter isn't used.
Mfg Martin
-
3. Re: Custom Login-Module for JBOSS AS 7
anil.saldhana Nov 8, 2011 9:55 AM (in response to firstlion)It is a bug. We will fix it.
-
4. Re: Custom Login-Module for JBOSS AS 7
firstlion Nov 8, 2011 9:56 AM (in response to anil.saldhana)Great, thank you.
-
5. Re: Custom Login-Module for JBOSS AS 7
anil.saldhana Nov 8, 2011 10:11 AM (in response to firstlion)1 of 1 people found this helpfulFixed in trunk.
You can checkout: http://anonsvn.jboss.org/repos/picketlink/federation/trunk/
mvn clean install
The jar with the fix is : picketlink-fed-2.0.2-SNAPSHOT.jar under the assembly/target
When 2.0.2.final happens, you will get the fix.
-
6. Re: Custom Login-Module for JBOSS AS 7
allertonm Feb 16, 2012 2:40 PM (in response to anil.saldhana)As far as I can tell, the version of ServerDetector in trunk does not work either - it's based on the faulty assumption that SecurityActions.loadClass will throw an exception if the class cannot be found. It does not, it returns null. Since the new check for the AS7 bootstrap is done in the exception handler for the attempt to find AS5's bootstrap, it never gets executed as no exception will be thrown.
I rewrote the detectServer method like so and this appears to be working fine:
private void detectServer() { //Detect JBoss Class me = getClass(); Class clazz = null; clazz = SecurityActions.loadClass(me, "org.jboss.system.Service"); if (clazz != null) { jboss = true; return; } clazz = SecurityActions.loadClass(me, "org.jboss.as.server.Bootstrap"); if (clazz != null) { jboss = true; return; } clazz = SecurityActions.loadClass(me, "org.apache.cataline.Server"); if (clazz != null) { tomcat = true; return; } }
Also worth noting that the classname used to check for Tomcat is wrong too ("cataline" not "catalina".)