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

[JENKINS-31575] Adding SSO/Client certificate authentication against Active Directory #16

Closed
wants to merge 0 commits into from

Conversation

llecaroz
Copy link

@llecaroz llecaroz commented Nov 9, 2015

bind dn username/password are mandatory when working with sso except in
no_check mode. In the case of no_check mode:
-A suffix will be added on username not to check against LDAP & mix them with LDAP real users authentications.
-Users logged in SSO will be part of the default group defined in the configuration.
For all other modes, user groups will be those downloaded from LDAP. Because depending on companies, SSO DN username can differ from LDAP username (lower/upper case issues), a strategy can be applied.

For more information, see new options in the Jenkins Global security configuration

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@llecaroz
Copy link
Author

This pull request also contained some fixs on some findjobs warnings/errors coming from the master branch of this projects. This was really annoying of having red errors and no checks correctly passed in ci Jenkins build. So I decided to remove them for having my pull request fully green

@llecaroz llecaroz changed the title Adding SSO implementation against ldap for downloading userdetails JENKINS-31575 Adding SSO/Client certificate authentication against Active Directory Nov 16, 2015
@llecaroz llecaroz changed the title JENKINS-31575 Adding SSO/Client certificate authentication against Active Directory [JENKINS-31575] Adding SSO/Client certificate authentication against Active Directory Nov 16, 2015
@llecaroz
Copy link
Author

@batmat
Copy link
Member

batmat commented Nov 16, 2015

Interesting work. Thanks.

Some quick remarks (I'm not the maintainer, just saw your mail on the list and gave it a quick shot).

/me think you should rewrite commits so that they have an user.name. Would be better for future potential forensics. And potentially squash your multiple merge commits so that the PR is more logically separated.

And it's generally common practice to try and separate PRs between features and (apparently) unrelated change (here Findbugs). This makes a bigger chance for your PR to be accepted, since it makes it easier to review.

My 2 cents

this.realm.getSsoEnabled().getCheckMode()!=null &&
this.realm.getSsoEnabled().getCheckMode().equalsIgnoreCase("no_check")==true &&
this.realm.getSsoEnabled().getDefaultGroup()!=null &&
this.realm.getSsoEnabled().getDefaultGroup().equals(groupname)==true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a matter of preference maybe, but when conditions get complex, I generally extract it to a small dedicated boolean method. Something like isBlahMode() or hasSomethingSpecificBluhEnabled().

@llecaroz
Copy link
Author

Hi batmat, I took care of most of your feedbacks & integrated in my last changes. I really appreciated your feedbacks & fully agree with most of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants