-
Notifications
You must be signed in to change notification settings - Fork 34
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 periodic LDAP group / users sync #119
Comments
@matthewelwell Yes, I think k8s cronjobs are probably the right way. But some thoughts on some of the tradeoffs and general thoughts:
|
I don't think we'd need to adjust it really and I guess, if needed, it can be adjusted by updating and redeploying the chart?
This shouldn't be an issue. Yes, that's a good point about the error handling / success reporting, etc. at the moment, any failures (network, configuration, etc.) would result in a non-zero exit code and no status would be reported. @gagantrivedi I wonder if therefore, we should add a field to the organisation (or a separate I don't know that we'd necessarily be able to differentiate between network blips or credential failures, however. The code looks something like the following, so it looks like we just get auth_kwargs = {
"username": settings.LDAP_SYNC_USER_USERNAME,
"password": settings.LDAP_SYNC_USER_PASSWORD,
}
with ldap.connection(**auth_kwargs) as connection:
if connection is None:
raise CommandError("Could not connect to LDAP server") |
In the flagsmith application we have written a django management command that synchronises LDAP groups / users with Flagsmith groups / users. This can be run via
python manage.py sync_ldap_users_and_groups
. We'd like a process for enterprise users to run this on a specific schedule.My immediate suggestion is to use k8s cron jobs, something like the following.
However, there are perhaps some additional complications here (I think we might need to add it to the
run-docker.sh
bash script for example? There might also be a simpler / better way to achieve this.gz#262
The text was updated successfully, but these errors were encountered: