Last active
June 11, 2020 13:18
-
-
Save ikurni/b0a4a2ff95c3762d3219212babc0dc80 to your computer and use it in GitHub Desktop.
Openshift LDAP User login filtered by Group
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Filter Syntax Example: | |
https://social.technet.microsoft.com/wiki/contents/articles/5392.active-directory-ldap-syntax-filters.aspx | |
------------------------------------------------------------------------------------------------------------- | |
https://access.redhat.com/solutions/3510401 | |
Can be done in 4.X version by editing OAuth resource definition, like in the following example: | |
apiVersion: config.openshift.io/v1 | |
kind: OAuth | |
metadata: | |
name: cluster | |
spec: | |
identityProviders: | |
- ldap: | |
apiVersion: v1 | |
attributes: | |
email: | |
id: | |
- dn | |
name: | |
- cn | |
preferredUsername: | |
- sAMAccountName | |
bindDN: cn=UserSearch,ou=users,dc=example,dc=co,dc=id | |
bindPassword: | |
name: ldap-secret | |
insecure: false | |
url: ldap://ADserver.example.co.id/DC=example,DC=co,DC=id?sAMAccountName?sub?(memberOf=cn=allow_access_ocp4,dc=example,dc=co,dc=id) | |
login: true | |
mappingMethod: claim | |
name: ldap_provider | |
type: LDAP | |
-------------------------------------------------------- | |
To check whether the Query is correct or not, try to curl the URL : | |
# curl --user [email protected] ldap://ADserver.example.co.id/DC=example,DC=co,DC=id?sAMAccountName?sub?(memberOf=cn=allow_access_ocp4,dc=example,dc=co,dc=id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment