Hi all,
  I have a problem with security authentication using Jaas and Seam. What I'd 
like to do is to authenticate a user programmatically from a Stateless Bean 
acting as a Seam component named "login"


  | public String login() {
  |   SecurityAssociationHandler handler = new SecurityAssociationHandler();
  |   SimplePrincipal user = new SimplePrincipal(userid);
  |   handler.setSecurityInfo(user, password.toCharArray());
  |   loginContext = new 
LoginContext("atlasAuthenticationPolicy",(CallbackHandler)handler);
  |   loginContext.login();
  |   Subject subject = loginContext.getSubject();
  |   Set principals = subject.getPrincipals();
  |   principals.add(user);
  |   SecurityAssociation.setSubject(subject);
  | 
  | ....
  |    
  | 

Authentication process via DatabaseLoginModule it's ok and, after that, any 
call to other protected ejb goes well.
What I'm not able todo is to propagate the autenthication to the view layer, so 
any link that call a jsf action takes me to the authentication form again.
I've set security domain correctly also in jboss-web.xml


  | <?xml version="1.0" encoding="UTF-8"?>
  | <jboss-web>
  |     <security-domain>java:/jaas/atlasAuthenticationPolicy</security-domain>
  |     <context-root>/atlasweb</context-root>
  | </jboss-web>
  | 

Why the web layer can't see credentials and principals (the security domain is 
the same)?
Is this authentication process wrong? What I have todo if I want to avoid the 
use of j_security_check?

Thank's in advance for any help,
  bye
   Roby


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953780#3953780

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953780

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to