Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed dynamic group ldap access #23450

Merged
merged 4 commits into from
May 17, 2016
Merged

Fixed dynamic group ldap access #23450

merged 4 commits into from
May 17, 2016

Conversation

blizzz
Copy link
Contributor

@blizzz blizzz commented Mar 21, 2016

Jenkins PR for #23344

Code-style changes added.

alexweirig and others added 4 commits March 21, 2016 16:56
getUserGroups:
Using $userDN instead of $uid to query LDAP
Converting groupDN to group name using API instead of substring
Removing cache processing at the end of the method
added back the cache processing and fixed
spaces -> tab conversion
@blizzz blizzz added the jenkins label Mar 21, 2016
@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @alexweirig, @leo-b and @GreenArchon to be potential reviewers

@MorrisJobke MorrisJobke deleted the 23344-jenkins branch May 12, 2016 07:47
@MorrisJobke MorrisJobke restored the 23344-jenkins branch May 12, 2016 07:48
@MorrisJobke MorrisJobke reopened this May 12, 2016
@MorrisJobke MorrisJobke added this to the 9.1-current milestone May 12, 2016
@MorrisJobke
Copy link
Contributor

@SergioBertolinSG @davitol @blizzz Could you check this out?

@MorrisJobke MorrisJobke changed the title [jenkins] 23344 jenkins Fixed dynamic group ldap access May 12, 2016
@SergioBertolinSG
Copy link
Contributor

We don't have a ldap server with dynamic groups. Last time I tried to set it up with @blizzz many problems arose, There is an ldap server with dynamic groups in an already prepared docker which we can use?

Also mentioning @davicente here.

@MorrisJobke
Copy link
Contributor

There is an ldap server with dynamic groups in an already prepared docker which we can use?

I have no idea, but maybe @alexweirig has an idea how to test this (or how to fire up a useful LDAP server) :)

@blizzz
Copy link
Contributor Author

blizzz commented May 12, 2016

@SergioBertolinSG it took me 5 minutes with a fresh docker instance…

@MorrisJobke
Copy link
Contributor

@SergioBertolinSG it took me 5 minutes with a fresh docker instance…

Please share your knowledge and drop it in the wiki :)

@blizzz
Copy link
Contributor Author

blizzz commented May 13, 2016

@SergioBertolinSG it took me 5 minutes with a fresh docker instance…

Please share your knowledge and drop it in the wiki :)

Based on a docker-image from private repo. Thus I provided a pastebin to @SergioBertolinSG on IRC in middle of April, but know it's run out of course. Need to do it again.

@MorrisJobke
Copy link
Contributor

Based on a docker-image from private repo. Thus I provided a pastebin to @SergioBertolinSG on IRC in middle of April, but know it's run out of course. Need to do it again.

THen maybe build it in open source 🙈

@blizzz
Copy link
Contributor Author

blizzz commented May 13, 2016

Not my decision :p

@blizzz
Copy link
Contributor Author

blizzz commented May 13, 2016

# service slapd start

# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/dyngroup.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
adding new entry "cn=dyngroup,cn=schema,cn=config"

# ldapmodify -D "$BINDDN" -w $PASSWORD 
version: 1
dn: cn=DynamicGroup,$GROUPBASEDN
changetype: add
objectClass: groupOfURLs
cn: DynamicGroup
memberUrl: ldap:///$USERBASEDN??sub?(objectClass=inetOrgPerson)

With that docker containter, the LDAP server must be startet first (1. command), then the schema needs to be added (2. command) and finally a dynamic group needs to be created, in this example it will have all users underneath a certain base as members (3. command)

@SergioBertolinSG
Copy link
Contributor

When I use second command inside the container I get:

ldap_sasl_interactive_bind_s: Can't contact LDAP server (-1)

@blizzz how are you running this commands? (this is using a fresh new container)

@blizzz
Copy link
Contributor Author

blizzz commented May 17, 2016

@SergioBertolinSG

All I did outside of docker was

sudo docker build .
sudo docker run -t -i -d -p 389:389 e7f205338b56
sudo docker attach d2ca37d81ecfe3f06593f6bc26c96ee80905c53dfc3e505c2070c560bb1078c1

Everything else inside docker describe in #23450 (comment)

Nothing else. That's all.

@SergioBertolinSG
Copy link
Contributor

Works fine 👍

@blizzz
Copy link
Contributor Author

blizzz commented May 17, 2016

My vote was on the original PR: #23344 (comment)

@blizzz
Copy link
Contributor Author

blizzz commented May 17, 2016

And Contributor signed the CLA meanwhile.

@DeepDiver1975 DeepDiver1975 merged commit 8ce8a05 into master May 17, 2016
@DeepDiver1975 DeepDiver1975 deleted the 23344-jenkins branch May 17, 2016 21:09
@blizzz
Copy link
Contributor Author

blizzz commented May 17, 2016

Needs backport to 9.0, because it fixes #23081

@PVince81
Copy link
Contributor

PVince81 commented Jun 1, 2016

stable9: #24950

@lock
Copy link

lock bot commented Aug 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants