[jboss-user] [JBossWS] - Using custom principal class with JBossWS

ejb3workshop do-not-reply at jboss.com
Tue Mar 4 09:09:11 EST 2008

I would like to use my own Principal class with my own LoginModule. I configured the LoginModule in login-config.xml and annotated by SLSB as follows :

  | @Stateless(name="JobAPIWeb")
  | @WebService(name="JobAPIWeb", portName="...Port", serviceName="JobAPIWebService", targetNamespace="...")
  | @EndpointConfig(configName = "Standard WSSecurity Endpoint")
  | @SecurityDomain(value="THZone")
  | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.BARE)
  | public class JobAPIWeb implements JobAPIWebRemote {
  | ...

Authentication takes place, however when I try to access the principal via 

  | m_sessionContext.getCallerPrincipal().getClass().getName()

it presents me with a org.jboss.ws.extensions.security.SimplePrincipal, rather then my own class returned in the LoginModules commit method.

My search so far led me to ReceiveUsernameOperation in which the UserNameToken is converted to a SimplePrincipal.


Are there any configuration options which would allow me to access the principal object as it is returned by my LoginModule.

Thanks in advance.

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

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

More information about the jboss-user mailing list