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

Modified code to properly propogate openldap errors, also added a reg… #2

Open
wants to merge 1 commit into
base: stable/kilo
Choose a base branch
from

Conversation

MaheshIBM
Copy link

Following changes are made.

  1. Give proper message and 400 error if account is locked in openldap
  2. Give proper message and 400 error id password syntax does not match openldap policy.
  3. Add ability to validate the keystone user's password using a regular expression.

@@ -106,8 +113,13 @@ def update_user(self, user_id, user):
# values are already equal.
user['enabled'] = not user['enabled']
old_obj['enabled'] = not old_obj['enabled']
try:
self.user.update(user_id, user, old_obj)
except ldap.CONSTRAINT_VIOLATION as e:

Choose a reason for hiding this comment

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

What happens when there is no ldap backend?

Copy link
Author

Choose a reason for hiding this comment

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

The code itself is in the driver for the ldap backend, if there is no ldap backend this code is never called.

@paulczar
Copy link

Why is this not being upstreamed first ?

@MaheshIBM
Copy link
Author

I had opened a request for a change like this, we were told that keystone should federate with an idp rather than implement this by itself.

@MaheshIBM
Copy link
Author

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

Successfully merging this pull request may close these issues.

3 participants