Towards a Common Java LDAP API Emmanuel Lecharny Apache Directory - - PowerPoint PPT Presentation

towards a common java ldap api
SMART_READER_LITE
LIVE PREVIEW

Towards a Common Java LDAP API Emmanuel Lecharny Apache Directory - - PowerPoint PPT Presentation

Towards a Common Java LDAP API Emmanuel Lecharny Apache Directory elecharny@apache.org Ludovic Poitou OpenDS ludovic.poitou@sun.com A poor man's choice: JNDI or JLDAP/Netscape LDAP SDK Good News: Apache Directory Client API OpenDS


slide-1
SLIDE 1

Towards a Common Java LDAP API

Emmanuel Lecharny Apache Directory elecharny@apache.org Ludovic Poitou OpenDS ludovic.poitou@sun.com

slide-2
SLIDE 2
slide-3
SLIDE 3

A poor man's choice: JNDI

  • r

JLDAP/Netscape LDAP SDK

slide-4
SLIDE 4

Good News: Apache Directory Client API OpenDS Client SDK UnboundID LDAP SDK

slide-5
SLIDE 5

Why this resurgence of activity ?

  • Servers need to issue outbound

connections

  • A directory product is wrapped with

tools

  • Previous effort to agree on standard

API stalled

slide-6
SLIDE 6

Is the LDAP developers ecosystem that large ? We just need one good common API

slide-7
SLIDE 7

The foundation

  • JLDAP/Netscape SDK as template
  • Leveraging Java5 language

constructions

  • Synchronous and Asynchronous

methods

slide-8
SLIDE 8

Connection Request Response Handling Data

slide-9
SLIDE 9

Connection

  • LDAPConnection is an interface
  • Factory

–to hide I/O library –to handle single connection vs pooled connections

  • Referral Policies (including

Authentication)

slide-10
SLIDE 10

Request / Responses Synchronous vs Asynchronous 3 approaches Just a question of style

slide-11
SLIDE 11

Handling data Entries Attributes Values Names

slide-12
SLIDE 12

Entry description

  • Base object for the server
  • Contains the DN and the Attributes
  • Uses ellipsis :

entry.add( "ObjectClass", "top", "person" );

  • Constructor or factory ?
slide-13
SLIDE 13

Example : JNDI

DirContext ctx = new InitialDirContext( env ); Attributes attrs = new BasicAttributes( true ); // case-ignore Attribute objclass = new BasicAttribute("objectclass");

  • bjclass.add("top");
  • bjclass.add("organizationalUnit");

attrs.put(objclass); attrs.put( "ou", "fruits" ); Context result = ctx.createSubcontext("ou=Fruits", attrs);

Example : New API

Entry entry = new EntryImpl( new DN( "ou=fruits, dc=example, dc=com" ) ); entry.add( "objectClass", "top", "organizationalUnit" ); entry.add( "ou", "fruits" ); connection.add( entry );

slide-14
SLIDE 14

Values description

  • Much more an internal representation of

attribute data

  • Should it be exposed to the client?
  • It contains
  • either String (for H/R attributeTypes)
  • Or byte[] (Binary AttributeTypes)
  • From the server point of view,

everything is a byte[]

slide-15
SLIDE 15
slide-16
SLIDE 16

Search responses

  • Enumeration of Searched Entries
  • Should search always try to page (like

RDMBs queries) ?

  • Should it be additional APIs built on the

basic Search request ?

slide-17
SLIDE 17

Schema

  • Schema is required for handling DNs,

Entries, Values...

  • Some servers may return non schema

compliant data

  • Application may not know Server's schema
  • r works with multiple servers with different

schema

  • API needs to handle all scenarii
slide-18
SLIDE 18

Schema

  • Default schema must be present

– At least the standard one

  • Should be able to extend from file or server
  • How to deal with server specific schema

elements requiring code (Syntax, MatchingRules) ?

slide-19
SLIDE 19

Other aspects

  • Security : TLS handled under the hood
  • Exceptions
  • Extended operations
  • Controls
  • DSML
  • Reader / Writer / Utilities
  • LDIF
  • Reader / Writer / Utilities
slide-20
SLIDE 20

Conclusion

  • There is NO common API yet.
  • There are many aspects to address as a

community

  • Server vendors have their needs and their

proposed solutions

  • Application developers should participate and

provide input

  • It will take time to have that single best of the

world common LDAP JAVA API !

  • Interested ? Join the effort !