1 Reply Latest reply on Apr 19, 2013 11:20 AM by crazycradd

    Servlet 3 login fails with javax.servlet.ServletException: No authenticator available for programmatic login

    crazycradd

      Hi

       

      I have been tring to get Jboss As7.1.1 working with opanAm and all seems to be going ok up to now (I have altered the openamAgent to use servlet login as the prior impl raised a classnotfoundexception).

       

      I have built a global module that contains the classes used and my application is redirected to the openAm servers login page as expected. but when the agent call to request.login is doen the above exception is thrown.

       

      I have the following in my standalone.xml

      <security-domain name="AMRealm" cache-type="default">

                          <authentication>

                              <login-module code="com.sun.identity.agents.jboss.v40.AmJBossLoginModule" flag="required">

                                  <module-option name="unauthenticatedIdentity" value="anonymous"/>

                              </login-module>

                          </authentication>

                      </security-domain>

       

      And the following in Jboss-web.xml

       

      <jboss-web>

          <security-domain>AMRealm</security-domain>

      </jboss-web>

       

      Do I have to do anything else to get this to work ?

        • 1. Re: Servlet 3 login fails with javax.servlet.ServletException: No authenticator available for programmatic login
          crazycradd

          The answer is yes you do you need an entry in web.xml to prevent the above exception

           

          <security-constraint>
              <web-resource-collection>
                  <web-resource-name>All resources</web-resource-name>
                  <description>Protects all resources</description>
                  <url-pattern>*.do</url-pattern>
              </web-resource-collection>
          </security-constraint>

           

          I also found that you now need a jboss-web.xml file aswell as a jboss-app.xml, in the old versions of AS 4.2.3 the jboss-app.xml was all that was needed in an ear file..

           

          I have now ported openam 3.0.3 agent to work using a module in as7 via servlet3 login and the changes above