-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Remove deprecated auth sources #35272
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
base: main
Are you sure you want to change the base?
Remove deprecated auth sources #35272
Conversation
Entra ID users should use the OIDC oauth2 provider
@@ -83,13 +89,43 @@ func RegisterGothProvider(provider GothProvider) { | |||
gothProviders[provider.Name()] = provider | |||
} | |||
|
|||
// hasExistingAzureADAuthSources checks if there are any existing Azure AD auth sources configured | |||
func hasExistingAzureADAuthSources(ctx context.Context) bool { |
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.
Maybe we should return the existed types as []string
but not only the bool
and then just list the exists providers but all the 3 types.
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 chose the structure I did because then we don’t need to loop over slice for each provider instead we can have o(1) of checking if the value from map is true.
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.
No. If you have over 1M items, maps is better than slices. But if you have only 3 items, you should not consider that. The current implementation will list all the 3 types even if only 1 type auth source does exist which is unncessary.
Entra ID users should use the OIDC oauth2 provider.
They will still be shown if the instance has a previous Azure AD source configured.