Monday, January 18, 2016

Setting up Authentication

Had an opendj installed on a Debian64 machine, just needed to reset the password for cn=Directory Manager
Followed http://allidm.com/blog/2012/09/change-password-for-directory-manager-in-forgerock-opendj/ just make sure when you copy into vi you ensure to delete the trailing white space heh.
Then I could run /opt/opendj/bin/status and enter the credentials successfully.
Tested connecting with Ldap admin using cn=Directory Manager
Connected. To set a user password under ou=Users, right click set Password, chose plain text and enter the password. Right click user again and select "copy dn to clipboard." Open another instance of the LDAP Admin tool, new connection, enter the IP and paste the dn of the user, enter the password, and verify with test connection.

In Java project create test class to connect following http://www.codejava.net/coding/connecting-to-ldap-server-using-jndi-in-java
Test same using and verify connected using dn and "simple" for the java.naming.security.authentication.


Installed MySQL and created a database and user on the Debian Wheezy VM per https://www.rackspace.com/knowledge_center/article/installing-mysql-server-on-debian

Following http://people.cis.ksu.edu/~hankley/d764/tut07/Nigusse_Spring.pdf now to populate a user info object from session. Get right maven dependencies from http://www.mkyong.com/spring/maven-spring-jdbc-example/ and http://examples.javacodegeeks.com/enterprise-java/spring/jdbc/spring-jdbctemplate-example/
Modify my.cnf to set bind-address to static ip. then /etc/init.d/mysql restart



No comments:

Post a Comment