Open venkat-kayo opened 4 years ago
Hi, I was facing the same problem here with my AD. I applied #982 in my config and it worked! Basically, I gave up using the "userMatchers:" in my dex-config. Defining only "userAttr", "groupAttr" and "searchAttr" and now I could see all my groups.. Don't know the reason... btw. Hope it works for you.
@alexismaior Could you please paste full config for userSearch and groupSearch sections? I have tried #982 and a lot of other combinations, but still no luck.
Absolutely!
connectors:
- type: ldap
name: ActiveDirectory
id: ldap
config:
host: x.x.x.x:389
insecureNoSSL: true
insecureSkipVerify: true
bindDN: CN=aa,OU=bb,DC=ccc,DC=dd
bindPW: xxxx
userSearch:
baseDN: CN=Users,DC=xx,DC=xx
filter: "(objectClass=person)"
username: sAMAccountName
idAttr: DN
emailAttr: mail
nameAttr: cn
groupSearch:
baseDN: DC=xx,DC=xx
filter: "(objectClass=group)"
userAttr: DN
groupAttr: member
nameAttr: cn
Thanks, it turned out my dex config was ok, it was gangway that was not passing scope groups to dex.
I'm using Dex through ArgoCD. ArgoCD v1.5.3, Dex v2.22.0. userMatchers
doesn't work for me either. The configuration posted above by @alexismaior, where userAttr and groupAttr are set by themselves worked.
@voki , could you elaborate on the issue with gangway not passing scope groups? I'm having the same issue, Dex config looks the same as yours but I'm getting empty groups back.
@schizoid90 Sure, I had to add "groups" scope in gangway config in the following line: scopes: ["openid", "profile", "email", "groups", "offline_access"]
@voki , thanks I found that about 5 minutes after asking
it works..
The values you provide for userAttr
etc. are case sensitive. I learned that the hard way 😄
I have gone through issues #1483 and #856 but haven't been able to solve the issue am facing.
Am using the inbuilt dex provided by Argocd
Dex details: dex Version: v2.14.0 Go Version: go1.11.3 Go OS/ARCH: linux amd64
Having issues in retrieving the groups information from Microsoft Active Directory for a logged in User. There is no uid attribute in the AD results obtained from ldapsearch for user . The oidc client which consumes this data has got the groups scope mentioned but still the group information is not available as seen from dex logs.
Below is the ldap connector content:
I observe the user is able to login but the groups to which the user belongs to are not obtained as shown below is the log obtained from the argocd-dex-server-xxx pod :
time="2020-02-12T03:23:25Z" level=info msg="config issuer: $(ARGOFQDN)/api/dex" time="2020-02-12T03:23:25Z" level=info msg="config storage: memory" time="2020-02-12T03:23:25Z" level=info msg="config static client: argo-cd" time="2020-02-12T03:23:25Z" level=info msg="config static client: argo-cd-cli" time="2020-02-12T03:23:25Z" level=info msg="config connector: ldap" time="2020-02-12T03:23:25Z" level=info msg="config skipping approval screen" time="2020-02-12T03:23:25Z" level=info msg="keys expired, rotating" time="2020-02-12T03:23:25Z" level=info msg="keys rotated, next rotation: 2020-02-12 09:23:25.352002627 +0000 UTC" time="2020-02-12T03:23:25Z" level=info msg="listening (http) on 0.0.0.0:5556" time="2020-02-12T03:23:25Z" level=info msg="listening (grpc) on 0.0.0.0:5557" time="2020-02-12T03:23:36Z" level=info msg="performing ldap search DC=xxxxxxDC=com,DC=au sub (&(objectClass=person)(SamAccountName=SAMACCOUNT-USERNAME))" connector=MicrosoftAD time="2020-02-12T03:23:36Z" level=info msg="username "SAMACCOUNT-USERNAME" mapped to entry CN=MY-CN-USERNAME,OU=xxxxxx,OU=xxxxxx,DC=xxxxx,DC=com,DC=au" connector=MicrosoftAD
time="2020-02-12T03:23:36Z" level=info msg="login successful: connector "ldap", username="MY-CN-USERNAME", email="MY-EMAIL-ID", groups=[]"
Note : There is a "." only with the sAMAccountName attribute b/w the firstname and surname.
User details as seen from ldapsearch :
Group details as seen from ldapsearch:
Can somebody please point out the error in the configuration or any configuration steps that i have missed.