Setup guide: [link]
At each change you may run the following bash file to on Unix environment for run the dockers.
After when you have downloaded the ldif files setup them on a folder so that they can be copied in to ldap image we are building.[link]
Observe here we do not use Dockerfile or docker-compose.yml to run ldap commands. This is because we cannot use the docker command 'RUN' for 'ldapadd' since the slapd service (ldap service name) need to be up and running first. So basic docker practice is using 'CMD' to run the command when the container is up. Yet having 'CMD' run will mess up openldap image developed by Osixia (so some reason I have not disclosed yet).
For this I used a bash file to run the docker-compose and then execute commands on ldap container with given container name.
Note that since we are adding OU to root, it requires root permission execute 'ldapadd'. Therefore set username and password along with the command.
At each change you may run the following bash file to on Unix environment for run the dockers.
$ sh docker-up.sh
OpenLDAP
Add object classes
We first have to add following object classes: [link]After when you have downloaded the ldif files setup them on a folder so that they can be copied in to ldap image we are building.[link]
Observe here we do not use Dockerfile or docker-compose.yml to run ldap commands. This is because we cannot use the docker command 'RUN' for 'ldapadd' since the slapd service (ldap service name) need to be up and running first. So basic docker practice is using 'CMD' to run the command when the container is up. Yet having 'CMD' run will mess up openldap image developed by Osixia (so some reason I have not disclosed yet).
For this I used a bash file to run the docker-compose and then execute commands on ldap container with given container name.
Add Organizational Units
Add Organizational Units as 'Users' and 'Groups'. [link]Note that since we are adding OU to root, it requires root permission execute 'ldapadd'. Therefore set username and password along with the command.
----
Nb: Please see that if you run by an error with ldap server as "Can't contact LDAP server (-1)" that is because the slapd (ldap service name) has not completely started yet. For this we add an delay before the ldapadd command is run. [link]
----
WSO2 Identity Server
Make sure you have the following files available at wso2is/files folder
- wso2is (use the compressed file of wso2is-5.6) [download link]
- jdk 8 (use the compressed file) [download link]
- mysql connector jar file (choose platform independent and download the compressed file where you can find jar file after decompress) [download link]
WSO2 configuration setup
For this we need to change two xml files "user-mgt.xml" and "tenant-mgt.xml" in <carbon-home>/repository/conf/ folder. While preserving original files the same, here I try to keep them separately for editing they and replace when creating the docker.[link]
"Cannot add user <username>. Error: Cannot access the directory context or user already exists in the system for user <username>"
it is because of mapping problem in the user attribute.
----
When adding a user, if you get an error as;"Cannot add user <username>. Error: Cannot access the directory context or user already exists in the system for user <username>"
it is because of mapping problem in the user attribute.
----
Steps to resolve
- Go to Home -> Identity -> Claims -> List.
- Select “urn:ietf:params:scim:schemas:core:2.0” and then click edit on “urn:ietf:params:scim:schemas:core:2.0:meta.resourceType”.
- Select an appropriate claim to map to it. For example you could use "http://wso2.org/claims/userType" and update.
Comments
Post a Comment