Add env EXTERNAL_AUTH and replace checks for OPENID_CONNECT with checks for EXTERNAL_AUTH where applicable #5480
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since OIDC is currently the only implemented external authentication provider, in all the places where you would normally check for external auth usage there is instead a check for OIDC usage. This PR introduces a new env EXTERNAL_AUTH and replaces these checks with a check for EXTERNAL_AUTH. Also a few comments are left at places where additional providers would have to be "added".
This paves the way for addition of other external auth providers and, even if there are no plans to develop these from upstream side, makes it easier to develop and maintain extensions such as #5476 . Also, it will not require any additional effort to maintain the changes made in this PR and it does not change the current behavior of GL3.
If any changes have to be made to make this mergeable, I'm happy to work on them. Please let me know!