You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Hashir, Mehedi" <Me...@ibx.com> on 2007/11/14 20:13:58 UTC

Using JNDI tags and accessing LDAP with Security Principal and Authentication

Hi Folks , 
Using   JNDI Tags and accessing LDAP directory.
How do I supply the Security,  prinicpal and credential attributes ,
needed to complete this call successfully. ?
Is there something else I need to configure ? Is this possible with the
current version of JNDI tags ? 

This is the code written up to now, and below is the result
<jsp:useBean id="exampleMap" class="java.util.Hashtable"/>
<c:set target="${exampleMap}" property="Context.SECURITY_AUTHENTICATION"
value="simple" /> 
<c:set target="${exampleMap}" property="Context.SECURITY_PRINCIPAL"
value="cn=bacd" /> 
<c:set target="${exampleMap}" property="Context.SECURITY_CREDENTIALS"
value="xyz" /> 




<jndi:useDirContext 
    id="test" 
    scope="page" 
    initialFactory="com.sun.jndi.ldap.LdapCtxFactory" 
    providerUrl="ldap://ldaptest01:389"
    env="${exampleMap}"
   
/>

====================
javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid
Credentials]

Thanks

Mehedi


CONFIDENTIALITY NOTICE: This E-Mail is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you have received this communication in error, please do not distribute and delete the original message.  Please notify the sender by E-Mail at the address shown. Thank you for your compliance.


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


RE: Using JNDI tags and accessing LDAP with Security Principal and Authentication

Posted by "Hashir, Mehedi" <Me...@ibx.com>.
Kris , 
That worked,
Thanks

Mehedi 

-----Original Message-----
From: Kris Schneider [mailto:kris@directthought.com] 
Sent: Wednesday, November 14, 2007 2:33 PM
To: Tag Libraries Users List
Subject: Re: Using JNDI tags and accessing LDAP with Security Principal
and Authentication

On 11/14/07, Hashir, Mehedi <Me...@ibx.com> wrote:
> Hi Folks ,
> Using   JNDI Tags and accessing LDAP directory.
> How do I supply the Security,  prinicpal and credential attributes , 
> needed to complete this call successfully. ?
> Is there something else I need to configure ? Is this possible with 
> the current version of JNDI tags ?
>
> This is the code written up to now, and below is the result 
> <jsp:useBean id="exampleMap" class="java.util.Hashtable"/> <c:set 
> target="${exampleMap}" property="Context.SECURITY_AUTHENTICATION"
> value="simple" />
> <c:set target="${exampleMap}" property="Context.SECURITY_PRINCIPAL"
> value="cn=bacd" />
> <c:set target="${exampleMap}" property="Context.SECURITY_CREDENTIALS"
> value="xyz" />

Try:

<c:set target="${exampleMap}"
       property="java.naming.security.authentication"
       value="simple" />
<c:set target="${exampleMap}"
       property="java.naming.security.principal"
       value="cn=bacd" />
<c:set target="${exampleMap}"
       property="java.naming.security.credentials"
       value="xyz" />

> <jndi:useDirContext
>     id="test"
>     scope="page"
>     initialFactory="com.sun.jndi.ldap.LdapCtxFactory"
>     providerUrl="ldap://ldaptest01:389"
>     env="${exampleMap}"
>
> />
>
> ====================
> javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid 
> Credentials]
>
> Thanks
>
> Mehedi

--
Kris Schneider <ma...@directThought.com> directThought
<http://www.directThought.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org



CONFIDENTIALITY NOTICE: This E-Mail is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you have received this communication in error, please do not distribute and delete the original message.  Please notify the sender by E-Mail at the address shown. Thank you for your compliance.


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Using JNDI tags and accessing LDAP with Security Principal and Authentication

Posted by Kris Schneider <kr...@directthought.com>.
On 11/14/07, Hashir, Mehedi <Me...@ibx.com> wrote:
> Hi Folks ,
> Using   JNDI Tags and accessing LDAP directory.
> How do I supply the Security,  prinicpal and credential attributes ,
> needed to complete this call successfully. ?
> Is there something else I need to configure ? Is this possible with the
> current version of JNDI tags ?
>
> This is the code written up to now, and below is the result
> <jsp:useBean id="exampleMap" class="java.util.Hashtable"/>
> <c:set target="${exampleMap}" property="Context.SECURITY_AUTHENTICATION"
> value="simple" />
> <c:set target="${exampleMap}" property="Context.SECURITY_PRINCIPAL"
> value="cn=bacd" />
> <c:set target="${exampleMap}" property="Context.SECURITY_CREDENTIALS"
> value="xyz" />

Try:

<c:set target="${exampleMap}"
       property="java.naming.security.authentication"
       value="simple" />
<c:set target="${exampleMap}"
       property="java.naming.security.principal"
       value="cn=bacd" />
<c:set target="${exampleMap}"
       property="java.naming.security.credentials"
       value="xyz" />

> <jndi:useDirContext
>     id="test"
>     scope="page"
>     initialFactory="com.sun.jndi.ldap.LdapCtxFactory"
>     providerUrl="ldap://ldaptest01:389"
>     env="${exampleMap}"
>
> />
>
> ====================
> javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid
> Credentials]
>
> Thanks
>
> Mehedi

-- 
Kris Schneider <ma...@directThought.com>
directThought  <http://www.directThought.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org