[JBoss Portal] - LDAP Authentication problem
by Valdier
I am currently in the process of evaluating JBoss for use as our corporate portal site but seem to be running into a basic issue with authentication and authorization.
After following the documentation regarding ldap setup I get the following error on first attempting to login:
10:10:20,330 ERROR [IdentityLoginModule] Error when validating password
org.jboss.portal.common.transaction.NestedException: javax.security.auth.login.L
oginException: org.jboss.portal.identity.IdentityException: Unable to connect to
LDAP: Name: null, Host: authserv, Port: 389, Context factory: com.sun.jndi.ldap.Ldap
CtxFactory, Admin user: cn=testad, Admin password: ***, Authentication: simple, P
rotocol: null
setup is as such:
| <datasources>
| <datasource>
| <name>LDAP</name>
| <config>
| <option>
| <name>host</name>
| <value>x-8</value>
| </option>
| <option>
| <name>port</name>
| <value>389</value>
| </option>
| <option>
| <name>adminDN</name>
| <value>cn=tdude</value>
| </option>
| <option>
| <name>adminPassword</name>
| <value>123456</value>
| </option>
| <!--<option>
| <name>protocol</name>
| <value>ssl</value>
| </option>-->
| </config>
| </datasource>
| </datasources>
| <option-group>
| <group-name>common</group-name>
| <option>
| <name>userCtxDN</name>
| <value>ou=wss,dc=wss,dc=com</value>
| </option>
| <option>
| <name>roleCtxDN</name>
| <value>ou=wss,dc=wss,dc=com</value>
| </option>
| </option-group>
|
Any assistance on this would be appreciated...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074117#4074117
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074117
18Â years, 11Â months
[JBoss Seam] - Security context propagation between Seam EJB components and
by eyrignou
I use Seam 1.2.1GA in my application, under JBoss 4.0.5GA; the presentation layer is made of Session EJBs which are Seam components, and the service and persistance layers are made of "standard" EJBs (ie. not Seam components).
Therefore I need a way to communicate the security context from the Seam components to the "standard" EJBs.
I use the Seam authentication and authorization mecanisms, which work very fine... But only in Seam components.
The user gets authenticated thanks to an "authenticator" JavaBean-Seam Component which I wrote after from the Seam Documentation (I have also put in place all the configuration indicated in the Seam Documentation http://docs.jboss.org/seam/1.2.1.GA/reference/en/html/security.html):
| public boolean authenticate() {
|
| boolean result = false;
|
| SylveaUser user = getSecurityDAO().getUser(Identity.instance().getUsername());
|
| if ( user != null ) {
| Identity.instance().addRole(user.getProfile().getName());
|
| if ( Encryption.getInstance().equals(user.getPassword(), Identity.instance().getPassword())) {
| result = true;
| }
| }
| return result;
| }
|
In the components.xml, I use the "pure" Seam authentication:
| <security:identity authenticate-method="#{authenticator.authenticate}"/>
|
In my Seam-EJBs components, everything works fine when I use the Seam API, ie. Identity.instance( ).*
But if I try to use the JEE API, I get an exception: "java.lang.IllegalStateException: No valid security context for the caller identity"
Here is an example of my code:
| @Stateful
| @Scope(ScopeType.CONVERSATION)
| @Name("myAction")
| public class MyActionImpl extends MyAction {
|
| @Resource
| private SessionContext context;
|
| @Factory(value="intermediaireList", scope=ScopeType.EVENT)
| public void findIntermediaires() {
| boolean loggedIn = Identity.instance().isLoggedIn(); // works fine
| Principal principal = context.getCallerPrincipal(); // IllegalArgumentException
| String name = principal.getName();
| ...
| }
| }
|
When I try to use the JEE API in my "standard" EJBs if the service and persistance layers, I get the same IllegalArgumentException. Does anyone have an idea ?
Thanks in advance,
Marc.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074106#4074106
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074106
18Â years, 11Â months