Directory ServicesEDSDemo Java Code ExampleOverviewEDSDemo is a set of custom Java classes that demonstrates one way to use secure Enterprise Directory Services (EDS). The program queries the Groups Directory Service (GDS) and then the Person Directory Service (PDS). For GDS, it demonstrates a simple group membership check. For PDS, it demonstrates a simple person lookup.
The EDSDemo program uses the Directory class to connect to and query each directory. The Directory class uses the PEMStore class to read in TLS credentials (a trusted CA certificate, client certificate, and private key) using the PCKS1 class to read in the RSA private key. It then establishes a connection to the specified LDAP server, issues the StartTLS extended operation binding with the SASL EXTERNAL (TLS client certificate authentication) mechanism, and performs a simple search using the defined searchbase and filter. UsageTo use the EDSDemo program modify it to use your settings, compile it, and then launch EDSDemo:
|