This repository was archived by the owner on Sep 30, 2024. It is now read-only.
chore: Move authn into cmd/frontend#63648
Merged
eseliger merged 1 commit intoJul 31, 2024
Merged
Conversation
This was referenced Jul 4, 2024
Merged
Member
Author
This was referenced Jul 4, 2024
41f90b8 to
b582762
Compare
48139d4 to
32505c0
Compare
b582762 to
3f0f443
Compare
32505c0 to
0a62e2a
Compare
3f0f443 to
c7fe056
Compare
0a62e2a to
8827da3
Compare
c7fe056 to
3d8e03d
Compare
8827da3 to
4563099
Compare
3d8e03d to
d01bc3b
Compare
4563099 to
96515fd
Compare
Contributor
|
Caution License checking failed, please read: how to deal with third parties licensing. |
d01bc3b to
3fb5d88
Compare
96515fd to
49c2385
Compare
Contributor
|
Caution License checking failed, please read: how to deal with third parties licensing. |
3fb5d88 to
1cc6bcc
Compare
49c2385 to
4eafde8
Compare
Contributor
|
Caution License checking failed, please read: how to deal with third parties licensing. |
e8fbddf to
2f13f50
Compare
fcb7563 to
fe401db
Compare
2f13f50 to
bb95aa9
Compare
fe401db to
6b20598
Compare
bb95aa9 to
13b3a9c
Compare
6b20598 to
b947d99
Compare
This was referenced Jul 30, 2024
ggilmore
approved these changes
Jul 30, 2024
13b3a9c to
980aa69
Compare
b947d99 to
ab3a565
Compare
980aa69 to
2e603ee
Compare
ab3a565 to
80b67b9
Compare
They should not be used outside of cmd/frontend, so making it a frontend internal package. Test plan: Compiler doesn't complain, tests still pass
80b67b9 to
ce3a944
Compare
This was referenced Aug 4, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

They should not be used outside of cmd/frontend, so making it a frontend internal package.
While doing that, I realized that there is a coupling dependency between authz providers and auth (which is authN) providers: GitLab code host connections can do authz mapping via the usernames of another OIDC or SAML auth provider (https://sourcegraph.com/docs/admin/code_hosts/gitlab#administrator-sudo-level-access-token). It turns out this feature does not work anymore, since at least several releases, because we don't actually instantiate auth providers outside of
cmd/frontendand thus the mapping will never find anything (auth providers don't explode when queried before init, unlike authz).This only now became clear as I moved this code, and the dependency graph was broken, so that's a nice property of these cleanups I guess 😬
Since it doesn't seem to work for quite some time, I opted for removing it, and added a changelog entry about it. Not sure if that is sufficient, I raised a thread here: https://sourcegraph.slack.com/archives/C03K05FCRFH/p1721848436473209.
This would've prevented this change and needed more refactoring as unfortunately we cannot map an auth provider by the conf type to a record in the
user_external_accountstable and need to actually instantiate it.Test plan: Compiler doesn't complain, tests still pass.
Changelog
GitLab code host connections were able to sync permissions by mapping Sourcegraph users to GitLab users via the username property of an external OIDC or SAML provider that is shared across Sourcegraph and GitLab. This integration stopped working a long time ago, and it has been removed in this release.