GithubHelp home page GithubHelp logo

liberty-openldap's Introduction

liberty-openldap

Simple Open Liberty App with Open LDAP

Setting up OpenLDAP

Run this command to start your OpenLDAP Docker container. It will bind ports 389 and 689.

docker run -p 389:389 -p 689:689 --name ldaptest --detach osixia/openldap:1.2.2

Then start and configure the phpLDAPadmin to connect to your OpenLDAP container.

docker run -p 6443:443 --env PHPLDAPADMIN_LDAP_HOSTS=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" ldaptest) --detach osixia/phpldapadmin:0.7.2

Once the container is running it can be accessed at https://localhost:6443. You'll need to login with the admin credentials. By default these are Login DN: => cn=admin,dc=example,dc=org:admin with Password: => admin .

Adding a user

You'll need to add a new user that you can use to log into the application. This app is configured to use the inetOrgPerson type.

  • In the phpLDAPAdmin click the drop down menu for the DN you have set up. It will be dc=example,dc=org by default.
  • Go to Create new entry here and select Default. Once in Default go to the drop down menu and select inetOrgPerson.
  • Set the RDN to cn and add an entry for the cn, sn, and password.
  • Click create and commit the entry.

You should now have a new user in your OpenLDAP registry.

Running and accessing the application

To run the application use:

mvn clean install liberty:start

Connect to the application at http://localhost:9080/ldap-test/.

Enter your user's name and password into the login box. You'll need to use the whole name you entered earlier, e.g. cn=user,dc=example,dc=org.

If all goes well you should see a message ending with: Hello, from a Servlet!

To stop the server use:

mvn liberty:stop

liberty-openldap's People

Contributors

mattbsox avatar scottkurz avatar

Watchers

 avatar  avatar

Forkers

scottkurz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.