Don't configure empty dummy authz providers in OSS apps (#56483)

Since OSS apps don't exist anymore, and we now use this entrypoint for the previous enterprise services, we should get rid of this, it might cause weird behavior with authz providers being empty briefly after startup. Instead, we should rely on the services to properly fetch the providers.
This commit is contained in:
Erik Seliger 2023-09-11 07:16:22 -05:00 committed by GitHub
parent 6834a501ee
commit dbf3ceedaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View File

@ -6,7 +6,6 @@ go_library(
importpath = "github.com/sourcegraph/sourcegraph/cmd/sourcegraph/osscmd",
visibility = ["//visibility:public"],
deps = [
"//internal/authz",
"//internal/service",
"//internal/service/svcmain",
],

View File

@ -3,18 +3,11 @@
package osscmd
import (
"github.com/sourcegraph/sourcegraph/internal/authz"
"github.com/sourcegraph/sourcegraph/internal/service"
"github.com/sourcegraph/sourcegraph/internal/service/svcmain"
)
var config = svcmain.Config{
AfterConfigure: func() {
// Set dummy authz provider to unblock channel for checking permissions in GraphQL APIs.
// See https://github.com/sourcegraph/sourcegraph/issues/3847 for details.
authz.SetProviders(true, []authz.Provider{})
},
}
var config = svcmain.Config{}
// MainOSS is called from the `main` function of the `cmd/sourcegraph` command.
func MainOSS(services []service.Service, args []string) {