I have two tomcat servers, one with OpenAM 12, one with the main web applications. Known: HTML pages authenticate without issue, programmatic login using the OpenAM java SDK works from within a servlet.
What fails is a call to HttpServletRequest.login(username, password)
This is the entry I have within the TomEE+ server:
<Realm className="com.sun.identity.agents.tomcat.v6.AmTomcatRealm" debug="99"/>
Here is the error I see within the AM J2EEAgent debug log:
amRealm:01/29/2014 02:29:47:497 PM EST: Thread[http-bio-443-exec-3,5,main]
SSOTokenValidator: validate failed with exception
[AgentException Stack]
com.sun.identity.agents.arch.AgentException: Invalid transport string
at com.sun.identity.agents.util.TransportToken.initializeFromString(TransportToken.java:135)
at com.sun.identity.agents.util.TransportToken.<init>(TransportToken.java:115)
at com.sun.identity.agents.common.SSOTokenValidator.validate(SSOTokenValidator.java:99)
at com.sun.identity.agents.realm.AmRealm.authenticate(AmRealm.java:143)
at com.sun.identity.agents.tomcat.v6.AmTomcatRealm.authenticate(AmTomcatRealm.java:106)
at org.apache.catalina.realm.CombinedRealm.authenticate(CombinedRealm.java:146)
at org.apache.tomee.catalina.TomEERealm.authenticate(TomEERealm.java:43)
at org.apache.catalina.authenticator.AuthenticatorBase.doLogin(AuthenticatorBase.java:818)
at org.apache.catalina.authenticator.AuthenticatorBase.login(AuthenticatorBase.java:800)
at org.apache.catalina.connector.Request.login(Request.java:2621)
at org.apache.catalina.connector.RequestFacade.login(RequestFacade.java:1065)