-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add option to automatically move users to a new authenticator #601
Add option to automatically move users to a new authenticator #601
Conversation
70af940
to
5697f2b
Compare
Right now you can auto migrate users to any authenticator. I'm considering adding a field on the authenticator plugin where plugin authors can declare which authenticators are supported for auto migration. For example, we can declare that the generic Ultimately all of the authenticators that can be configured to use active directory as a backend (LDAP, OIDC, SAML, Keycloak) are potentially compatible with one another as long as they have the same user database as a backend. |
@elyezer I can't add you as a reviewer, but I'd like it if you could take a look at this |
ansible_base/authentication/migrations/0014_authenticator_auto_migrate_users_to.py
Outdated
Show resolved
Hide resolved
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.
Can we squash the 2 migration files in the authentication app?
fbd8e8b
to
18b8a3f
Compare
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.
I'm understanding high-level what this is doing and tests look fairly thorough.
6c52ba4
to
50bf6b3
Compare
50bf6b3
to
a487d39
Compare
Quality Gate passedIssues Measures |
This adds a new field on the authenticator model called
auto_migrate_users_to
which accepts a foreign key to another authenticator. When this field is configured we will do the following:move_authenticator_user_to
method on the authenticator plugin. This lets the authenticator plugin know that the user is being moved and gives it a chance to perform any cleanup before that happens.