-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Simple authorization via LDAP #310
Conversation
Thanks for doing this 👍 |
All done, code available for review. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! We have been waiting for LDAP/AD support. Some comments below.
api/login.go
Outdated
util.Config.LdapSearchDN, | ||
ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, | ||
fmt.Sprintf(util.Config.LdapSearchFilter, auth), | ||
[]string{"dn", "mail", "uid", "cn"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to get these searched parameters configurable. For example our AD doesn't have "uid" parameter at all for the user object and the "cn" doesn't contain user's name but some identification string.
util/config.go
Outdated
@@ -231,4 +240,59 @@ func (conf *configType) Scan() { | |||
conf.EmailAlert = false | |||
} | |||
|
|||
var LdapAnswer string | |||
fmt.Print(" > Enable LDAP authentificaton (y/n, default n): ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
authentication
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, thank you.
@ruriky All done! Sorry for the delay, I caught the flu. :( |
Thank you strangeman for taking the time to implementing the changes I suggested. I'm happy with the current state of this change. |
hey, is there any eta on when it will get merge to the tree? |
Thanks guys! |
Algorithm: #118 (comment)
I have some doubts about my code:
println
, because I can't see any logs except Gin logging2.3.0.sql
because 2.3.0 isn't released. Is it ok?