Vcenter authenticate SSO by Open-ldap users
Create the necessary directory in the main directory
mkdir -p ./postgres
mkdir -p ./openldap/slapd/database
mkdir -p ./openldap/slapd/config:/etc/ldap/slapd.d
mkdir -p ./openldap/slapd/schema
Incert schema at scheam directory
cp schema.local ./openldap/slapd/schema
Running postgres, keycloak, openldap, phpldapadmin container
docker-compose up -d --force-recreate
Add new client, then specify :
- Client ID : {name}
- Client Protocol : {openid-conect}
- Root URL : {vcenter-URL}
- * Valid Redirect URIs : {https://VCENTER_URL/ui/login/oauth2/authcode}
- Admin URL : {vcenter-URL}
- Web Origins : {*}
- Backchannel Logout URL : {https://VCENTER_URL/ui/login}
- Access Type : {confidential}
- Direct Access Grants Enabled : {ON}
- Backchannel Logout Session Required {ON}
- Client Authenticator : {Clienr ID and Secret}
In Mappers TAB:
Create 3 Mappers:
- domain >>> Hardcoded claim >>> Protocol : {openid-connect} >>> Claim JSON Type : {string} >>> Add to ID token, Add to access token, Add to userinfo : {on} >>> includeInAccessTokenResponse.label {OFF}
- groups_script >>> Script Mapper >>>
```script
token.setOtherClaims("group", user.getGroups().toArray()[0].getName())
```
- nameid >>> Script Mapper >>>
```script
token.setSubject(user.getUsername());
```
User Federation :
Add provider >>> ldap :
- Import Users: {ON}
- Sync Registration: {ON}
- Username LDAP attribute : {cn}
- RDN LDAP attribute : {cn}
- UUID LDAP attribute : {entryUUID}
- User Object Classes : {user}
- Connection URL : {ldap://openldap:389}
- Users DN : {dc=test,dc=com}
- Bind Type : {simple}
- Bind DN : {cn=admin,dc=test,dc=com}
- Bind Credential : {PASSWORD}
Add Mapper:
- Name: {groups_mapper} >>> Type:{group-ldap-mapper}
- LDAP Groups DN : {dc=test,dc=com}
- Group Name LDAP Attribute : {cn}
- Group Object Classes : {group}
- Membership LDAP Attribute : {member}
- Membership Attribute Type : {DN}
- Membership User LDAP Attribute : {cn}
- Mode: {READ_ONLY}
- User Groups Retrieve Strategy :{LOAD...}
- Member-Of LDAP Attribute : {memberOff}
- Groups Path : {/}
- If need verified email automaticly:
- Name: {Email_verified} >>> Mapper Type :{hardcoded-attribute-mapper} >>> User Model Attribute Name : {emailVerified} >>> Attribute Value : {true}
CHANGE IDENTITY PROVIDER on Single Sing On Configuration
After that Reboot the Vcenter in order to be applied the Configurations