...
The current implementation of the realm has started as a proof of concept, but already works quite well. You can find the sources here:
https://svn.apache.org/repos/asf/directory/sandbox/szoerner/apacheds-tomcatrealm
It is not an official artifact of Apache Directory yet. Although if some people are interested, it soon can be. In the meantime, there are no official releases etc.
...
Connecting to the embedded ApacheDS
There is no difference to connecting to any other LDAP server. By default, the following connection properties will do:
Parameter | value |
---|---|
Hostname | your hostname, e.g. "localhost" |
Port | 10389 |
Bind DN (user) | "uid=admin,ou=system" |
Password | "secret" |
Adding a user
Use Studio to create a new entry with object class inetOrgPerson (plus super classes).
A user tomcat may look like this in LDIF.
Code Block |
---|
dn: uid=tomcat,ou=users,ou=system
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
cn: Tomcat Administrator
sn: Tomcat
uid: tomcat
userPassword: tomcat
|
Adding a group
Use Studio to create a new entry with object class groupOfNames.
A group manager, which contains the previous user, may look like this in LDIF.
Code Block |
---|
dn: cn=manager,ou=groups,ou=system
objectClass: groupOfNames
objectClass: top
cn: manager
member: uid=tomcat,ou=users,ou=system
|
Trying it out
Browse to the Manager web application within your Tomcat installation, http://localhost:8080/manager/html
Using the user and password "tomcat" should lead you to the application, all other input should fail (401 or 403).
Next steps
Some ideas I have:
- Make it an official artifact within Apache Directory
- Create a single jar which contains all dependencies necessary for running within Tomcat 5.5 and/or Tomcat 6.0
- Create some users and groups by default (at least "tomcat" within role "admin")
- Add the abilility ability to define your own suffix ("dc=yourcompany,dc=com")
...
Feel free to check it out and provide feedback. Further discussions about whether we provide this as official artifact will be on the dev-list of Apache Directory project.