Autenticació LDAP
La revisió el 14:20, 4 març 2022 per Joan (discussió | contribucions) (Es crea la pàgina amb « thumbnail <pre> https://scytalelabs.com/setup-and-configure-openldap-using-docker-image-on-ubuntu-16-04/ $ mkdir openldap_prova $ cd ope...».)
https://scytalelabs.com/setup-and-configure-openldap-using-docker-image-on-ubuntu-16-04/
$ mkdir openldap_prova
$ cd openldap_prova/
$ docker run -p 389:389 --name ldap-service --hostname ldap-service --env LDAP_ORGANISATION="ScytaleLabs" --env LDAP_DOMAIN="scytalelabs.com" \
--env LDAP_ADMIN_PASSWORD="adminPassword" --env LDAP_BASE_DN="dc=scytalelabs,dc=com" --volume /data/slapd/database:/var/lib/ldap \
--volume /data/slapd/config:/etc/ldap/slapd.d --detach osixia/openldap:1.3.0
$ docker run --name phpldapadmin-service --hostname phpldapadmin-service --link ldap-service:ldap-host --env PHPLDAPADMIN_LDAP_HOSTS=ldap-service --detach osixia/phpldapadmin:0.9.0
$ docker inspect -f "{{ .NetworkSettings.IPAddress }}" phpldapadmin-service
172.17.0.3
https://172.17.0.3
docker run -p 389:389 --name ldap-service --hostname ldap-service --env LDAP_ORGANISATION="ScytaleLabs" --env LDAP_DOMAIN="scytalelabs.com" \
--env LDAP_ADMIN_PASSWORD="adminPassword" --env LDAP_BASE_DN="dc=scytalelabs,dc=com" --volume /data/slapd/database:/var/lib/ldap \
--volume /data/slapd/config:/etc/ldap/slapd.d --detach osixia/openldap:1.3.0
docker run --name phpldapadmin-service --hostname phpldapadmin-service --link ldap-service:ldap-host --env PHPLDAPADMIN_LDAP_HOSTS=ldap-service --detach osixia/phpldapadmin:0.9.0
PHPLDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" phpldapadmin-service)
echo "Go to: https://$PHPLDAP_IP"
Per crear un usuari:
You probably just want to create an end user account by selecting the 'Default' option and selecting the inetOrgPerson object class and click the "Proceed" button. On the next screen, you can complete the attribute template to create your entry.
---
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e6cf9de7ca04 osixia/phpldapadmin:0.9.0 "/container/tool/run" 5 days ago Exited (0) 11 seconds ago phpldapadmin-service
4ff8564a1df8 osixia/openldap:1.3.0 "/container/tool/run" 5 days ago Exited (0) 5 seconds ago ldap-service
docker start 4ff8564a1df8
docker start e6cf9de7ca04
docker inspect -f "{{ .NetworkSettings.IPAddress }}" phpldapadmin-service
https://172.17.0.3
login: cn=admin,dc=scytalelabs,dc=com
password: adminPassword
$ cd DAW_M08_DESPL/UF3/LDAP/
scripts PHP:
Connexió:
*http://localhost/M08/UF3/LDAP/autenticacio_ldap.php
*http://localhost/M08/UF3/LDAP/autenticacio_ldap2.php
*Consulta dels usuaria:
*http://localhost/M08/UF3/LDAP/ldap.examples-basic.php
scripts node:
$ node autenticacio_ldap
$ node autenticacio_ldapw
creat per Joan Quintana Compte, març 2022