-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
only restrict OAuth2 tokens for external accounts *at creation time* #5499
only restrict OAuth2 tokens for external accounts *at creation time* #5499
Conversation
@@ -146,5 +141,6 @@ def validate_external_users(self): | |||
).format(external_account)) | |||
|
|||
def save(self, *args, **kwargs): | |||
self.validate_external_users() |
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.
Only prevent OAuth2 tokens for external accounts at creation time. Changing this means people can:
settings.ALLOW_OAUTH2_FOR_EXTERNAL_USERS = True
- Create an OAuth2 token for a certain LDAP-backed user.
settings.ALLOW_OAUTH2_FOR_EXTERNAL_USERS = False
- At this point, LDAP users can no longer make new OAuth2 tokens
- The token from step 2 will continue to function (until it's revoked).
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 lines up with how we explain its use in the docs and honestly makes tokens more useful for auditing in larger orgs.
Build failed.
|
50b84ba
to
a7a3609
Compare
Build succeeded.
|
Build succeeded (gate pipeline).
|
[4.1 Backport] Avoid duplicated entries when calling create_preload_data
related: #5477
cc @gamuniz