I continued to have fun with OpenDJ Rest2Ldap Interface.
So how does one determine whether the Rest2Ldap interface is enabled? By default, it is disabled.
To enable, follow the below example:
$ ./dsconfig set-connection-handler-prop --hostname am2.cdemo.sg --port 15444 --bindDN "cn=Directory Manager" --bindPassword password --handler-name "HTTP Connection Handler" --set listen-port:18080 --set enabled:true --no-prompt --trustAll
$ netstat -an | grep 18080
tcp 0 0 :::18080 :::* LISTEN
We can use the status command to check the HTTP Connection Handler status (aka Rest2Ldap interface).
Or, like myself, we can take a look at config.ldif.
ds-cfg-config-file is the "soul" of Rest2Ldap.
This is where the mapping occurs to expose directory data over HTTP as JSON resources. The artifact for serving JSON resources is a REST to LDAP Gateway, which is technically a Servlet. The Servlet will be followed by a REST to LDAP Connection Handler within OpenDJ.
The benefit is of course to allow applications that do not support LDAP protocol to retrieve directory data via HTTP transport.
.
No comments:
Post a Comment