Apache Directory Project - [jira] Commented: (DIRSERVER-949) Add support for LDAP URLs in

This is Interesting: Free IT Magazines  
Home > Archive > Apache Directory Project > May 2007 > [jira] Commented: (DIRSERVER-949) Add support for LDAP URLs in





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [jira] Commented: (DIRSERVER-949) Add support for LDAP URLs in
Enrique Rodriguez (JIRA)

2007-05-31, 1:11 am


[ https://issues.apache.org/jira/brow...action_12500283 ]

Enrique Rodriguez commented on DIRSERVER-949:
---------------------------------------------

Valid LDAP URL syntax includes no specified host or port, eg:

ldap:///o=University%20of%20Michigan,c=US

Note the triple-slash near the beginning. This example comes from RFC 2255. So, you could also require that no host and no port are specified.


> 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/t...p/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-eoiNrCBZWh+uvtTkCOosKA@public.gmane.org)";
> 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-eoiNrCBZWh+uvtTkCOosKA@public.gmane.org)
> 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.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com