You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Alex Karasulu (JIRA)" <ji...@apache.org> on 2007/05/31 06:49:15 UTC

[jira] Commented: (DIRSERVER-949) Add support for LDAP URLs in context searches

    [ https://issues.apache.org/jira/browse/DIRSERVER-949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500280 ] 

Alex Karasulu commented on DIRSERVER-949:
-----------------------------------------

This can be done however the URL should be reject by the server-side JNDI provider if the "host" component
of the LDAP URL is not the current host and the "port" component of the URL is not an LDAP or LDAPS port
bound to by the current server instance.  

If these are the case then this is acceptable and the server can just ignore the fact that it needs to conduct a remote
search to satisfy this LDAP URL.


> Add support for LDAP URLs in context searches
> ---------------------------------------------
>
>                 Key: DIRSERVER-949
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-949
>             Project: Directory ApacheDS
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 1.5.0
>            Reporter: Enrique Rodriguez
>            Priority: Minor
>
> LDAP URLs (RFC 2255) are not supported in context searches when using CoreContextFactory.  Searching with LDAP URLs is described in the Sun JNDI tutorial:
> http://java.sun.com/products/jndi/tutorial/ldap/misc/url.html 
> We have full support of RFC 2255 in shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL class.  However, with CCF, as in the following code ...
> {code}
> CoreContextFactory ccf = new CoreContextFactory();
> DirContext ctx = ( DirContext ) ccf.getInitialContext( env );
> String url = "ldap://localhost:" + port +
> "/ou=users,dc=example,dc=com?krb5PrincipalName?sub?(krb5PrincipalName=hnelson@EXAMPLE.COM)";
> NamingEnumeration answer = ctx.search( url, "", null );
> {code}
> ... the LDAP URL format for the name is not supported and the following exception is thrown:
> javax.naming.InvalidNameException: Bad DN :
> ldap://localhost:1024/ou=users,dc=example,dc=com?krb5PrincipalName?sub?(krb5PrincipalName=hnelson@EXAMPLE.COM)
>        at org.apache.directory.shared.ldap.name.LdapDnParser.parseInternal(LdapDnParser.java:151)
>        at org.apache.directory.shared.ldap.name.LdapDN.<init>(LdapDN.java:197)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.