4 Replies Latest reply on Sep 3, 2012 9:58 AM by akrambenaissi

    Configure the auth-method of the web.xml externally to the EAR file

    lordsephiroth

      Hi,

      My question looks quite simple, but a fairly long Google search did not give any answer. My need is straight forward : I'd like to configure the <auth-method> element of the web.xml in the server rather than hardcoded in the web.xml file.

      The reason is simple : our tests, integration and productive environments do use CLIENT-CERT authentication with LDAP (Active Directory) role verification. This perfectly works on all these environments.

       

      However, the developers doesn't have locally all the truststores for the SSL connection to the LDAP server. Consequently, we do use BASIC for the local development and need to change to CLIENT-CERT right before building the EAR archive to deploy on any server of the company.

       

      I tried something like :

       

      <login-config>
       <auth-method>${ch.mobi.prest.prest_authMethod}</auth-method>
       <realm-name>PREST Authentication</realm-name>
      </login-config>

       

      Sadly, it does not work and fail at startup with this error :

       

        12:56:01,773 ERROR [org.apache.catalina.startup.ContextConfig] (MSC service thread 1-4) Cannot configure an authenticator for method ${ch.mobi.prest.prest_authMethod}

       

      Is there a way to do this and access to a system property configured in the JBoss server ?

       

      Any help will be appreciated !