项目作者: burgesQ

项目描述 :
Docker ldap setup for testing with an ABC SBC stack
高级语言:
项目地址: git://github.com/burgesQ/docker-ldap.git
创建时间: 2019-06-07T08:43:25Z
项目社区:https://github.com/burgesQ/docker-ldap

开源协议:

下载


README.md

ldap docker stack to perfom various test with an Frafos ABC SBC stack.

Start the container

  1. $ docker-compose up --build

Feed the ldap

  1. $ docker-compose exec ldap ldapadd -x -D "cn=admin,dc=example,dc=org" -w admin -H ldap://127.0.0.1:389 -f /ldap_entries/add_content.ldif
user pass bind dn
admin admin cn=admin,dc=example,dc=org
john johnldap uid=john,ou=People,dc=example,dc=org
jane janeldap uid=jane,ou=People,dc=example,dc=org

John is a member of the GUI group, while Jane belong to the Mistyc one.

Query the ldap (from host)

  1. $ ldapsearch -x -D "cn=admin,dc=example,dc=org" -w admin -H ldap://127.0.0.1:389 -b "dc=example,dc=org" "*"

Fetch ldap ip

  1. 11:07:55 docker inspect -f "{{.NetworkSettings.Networks.ldap_default.IPAddress}}" test-ldap

Access phpldapadmin

You can get the phpLDAPadmin IP by running :

  1. $ docker inspect -f "{{.NetworkSettings.Networks.dockerldapphp_default.IPAddress}}" dockerldap_phpldapadmin_1

You can then access the phpLDAPadmin at https://$IP_LDAP and log with those credentials :

Login DN Password
cn=admin,dc=example,dc=org admin

Attach to an ABC SBC docker stack

Attach an ldap container to a running Frafos ABC SBC stack

  1. $ # run the ldap container
  2. $ docker run -it \
  3. --rm \
  4. --name test-ldap \
  5. --hostname ldap \
  6. -p 389:389 \
  7. -p 636:636 \
  8. --network sbc_default \
  9. osixia/openldap:1.2.4
  10. $ # feed the docker
  11. $ ldapadd -x -D "cn=admin,dc=example,dc=org" -w admin -H ldap:// -f ./ldap_entries/add_content.ldif

Contributuing

First of all, thank you for contributing :hearts:

If you find any typo/misconfiguration/… please send me a PR or open an issue. You can also ping me on twitter.

Also, while creating your Pull Request on GitHub, please write a description which gives the context and/or explains why you are creating it.