-
Notifications
You must be signed in to change notification settings - Fork 0
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
DBC22-2535 IDIR login for admin/cms #784
Conversation
dec203e
to
1beba00
Compare
1beba00
to
f39cab4
Compare
"django.contrib.auth.backends.ModelBackend", | ||
|
||
# `allauth` specific authentication methods, such as login by email | ||
'allauth.account.auth_backends.AuthenticationBackend', | ||
] | ||
|
||
LOGIN_REDIRECT_URL = FRONTEND_BASE_URL | ||
LOGIN_URL = 'http://localhost:8000/accounts/oidc/idir/login/?process=login&next=%2Fdrivebc-admin%2F&auth_params=kc_idp_hint=azureidir' | ||
|
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.
This login URL shouldn't be static?
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.
Good catch. I'll fix.
f'{name} requests access to Wagtail admin', | ||
text, | ||
'do_not_reply@gov.bc.ca', | ||
settings.ACCESS_REQUEST_RECEIVERS, |
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.
Please replace instances of these FROM emails to env("DRIVEBC_FEEDBACK_EMAIL_DEFAULT")
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.
Oops, yes.
f'{name} requests access to DriveBC admin', | ||
text, | ||
'do_not_reply@gov.bc.ca', | ||
settings.ACCESS_REQUEST_RECEIVERS, |
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.
Please replace this instance too
Changes Django admin and Wagtail admin to use Keycloak IDIR auth. Adds functionality to email an access request after authenticating, if further actions are required.
This is disabled by default; enabling it requires adding the following environment variable:
FORCE_IDIR_AUTHENTICATION=True
DRIVEBC_ACCESS_REQUEST_RECEIVERS=<semicolon separated list of email addresses>
Which has been added to all OpenShift environments. To continue using local accounts in local dev, simply don't enable this.