mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 14:31:56 +00:00
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/frontend` and 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_accounts` table 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](https://sourcegraph.com/docs/admin/code_hosts/gitlab#administrator-sudo-level-access-token) that is shared across Sourcegraph and GitLab. This integration stopped working a long time ago, and it has been removed in this release.
66 lines
2.4 KiB
Python
66 lines
2.4 KiB
Python
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
|
|
|
go_library(
|
|
name = "shared",
|
|
srcs = [
|
|
"config.go",
|
|
"main.go",
|
|
"service.go",
|
|
],
|
|
importpath = "github.com/sourcegraph/sourcegraph/cmd/worker/shared",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//cmd/worker/internal/adminanalytics",
|
|
"//cmd/worker/internal/auth",
|
|
"//cmd/worker/internal/authz",
|
|
"//cmd/worker/internal/batches",
|
|
"//cmd/worker/internal/codeintel",
|
|
"//cmd/worker/internal/codemonitors",
|
|
"//cmd/worker/internal/codygateway",
|
|
"//cmd/worker/internal/completions",
|
|
"//cmd/worker/internal/embeddings/repo",
|
|
"//cmd/worker/internal/encryption",
|
|
"//cmd/worker/internal/eventlogs",
|
|
"//cmd/worker/internal/executormultiqueue",
|
|
"//cmd/worker/internal/executors",
|
|
"//cmd/worker/internal/githubapps",
|
|
"//cmd/worker/internal/gitserver",
|
|
"//cmd/worker/internal/insights",
|
|
"//cmd/worker/internal/licensecheck",
|
|
"//cmd/worker/internal/migrations",
|
|
"//cmd/worker/internal/outboundwebhooks",
|
|
"//cmd/worker/internal/own",
|
|
"//cmd/worker/internal/perforce",
|
|
"//cmd/worker/internal/permissions",
|
|
"//cmd/worker/internal/ratelimit",
|
|
"//cmd/worker/internal/repostatistics",
|
|
"//cmd/worker/internal/search",
|
|
"//cmd/worker/internal/sourcegraphaccounts",
|
|
"//cmd/worker/internal/telemetry",
|
|
"//cmd/worker/internal/telemetrygatewayexporter",
|
|
"//cmd/worker/internal/users",
|
|
"//cmd/worker/internal/webhooks",
|
|
"//cmd/worker/internal/zoektrepos",
|
|
"//cmd/worker/job",
|
|
"//cmd/worker/shared/init/db",
|
|
"//internal/authz",
|
|
"//internal/authz/subrepoperms",
|
|
"//internal/codeintel/syntactic_indexing",
|
|
"//internal/database",
|
|
"//internal/debugserver",
|
|
"//internal/encryption/keyring",
|
|
"//internal/env",
|
|
"//internal/extsvc/versions",
|
|
"//internal/goroutine",
|
|
"//internal/goroutine/recorder",
|
|
"//internal/httpserver",
|
|
"//internal/observation",
|
|
"//internal/oobmigration",
|
|
"//internal/oobmigration/migrations/register",
|
|
"//internal/service",
|
|
"//internal/symbols",
|
|
"//lib/errors",
|
|
"@com_github_prometheus_client_golang//prometheus",
|
|
],
|
|
)
|