0 Replies Latest reply on Jun 24, 2006 9:07 AM by peter_p

    Security realm for ExternalContext

    peter_p

      Hello,

      I would like to bind an external ldap server into the jndi-tree.
      In the documentation I found the class ExternalContext which
      is designed to do this.

      I would like to protect the access to the ldap server using
      a technical useraccount for connection to the server:

      <!-- Bind a remote LDAP server -->
      <mbean code="org.jboss.naming.ExternalContext"
       name="jboss.jndi:service=ExternalContext,jndiName=external/ldap">
       <attribute name="JndiName">external/ldap</attribute>
       <attribute name="Properties">
       java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
       java.naming.provider.url=ldap://localhost:389
       java.naming.security.authentication=simple
       java.naming.security.principal=uid=techuser,dc=users,dc=mydomain,dc=de
       java.naming.security.credentials=secret
       </attribute>
       <attribute name="InitialContext"> javax.naming.ldap.InitialLdapContext </attribute>
       <attribute name="RemoteAccess">false</attribute>
      </mbean>
      


      Unforunately I have to state the password in this mbean declaration as
      clear text. Does anybody know a method to use an encrypted password
      for an ExternalContext?

      I'm thinking about the same method as offered for databases. It would
      be a good thing to declare a security domain in the login-conf.xml using the
      SecureIdentityLoginModule and referencing this domain in the declaration
      of the ExternalContext.

      Thanks
      Peter