ICS-MU / pam_oauth2_device

PAM module OAuth2 Device flow
Apache License 2.0
31 stars 14 forks source link

Cannot use Static username on LDAP scenario #12

Open sasilen opened 5 years ago

sasilen commented 5 years ago

When using "users" array, I can configure user_identifiers which are allowed to login to specific username eg:

"users": { "guest-user": [ "student@university.fi", "student2@polytechnic.fi" ],

When I am using LDAP, it assumes that login-username is returned from LDAP via attribute "attr", that's fine on most of cases but on some environments I would like to use static username (eg: "guest-user" ).

FYI: Took little time for me to understand meaning of "username_attribute" in oauth section, "attr" and "%s" in ldap section. username_attribute was actually an user identifier which was used in ldap search "as %s" to find username in attribute "attr". Which was then used as a username_attribute to perform login as.