diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e623f30f870..b405e168fe3 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -224,6 +224,7 @@ lerna.json @grafana/frontend-ops /pkg/services/teamguardian @grafana/grafana-authnz-team /pkg/services/serviceaccounts @grafana/grafana-authnz-team /pkg/services/loginattempt @grafana/grafana-authnz-team +/pkg/services/authn @grafana/grafana-authnz-team # Grafana Partnerships Team /pkg/infra/httpclient/httpclientprovider/sigv4_middleware.go @grafana/grafana-partnerships-team diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index c80c834dff4..f0f688c5b0e 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -82,4 +82,5 @@ export interface FeatureToggles { nestedFolders?: boolean; accessTokenExpirationCheck?: boolean; elasticsearchBackendMigration?: boolean; + authnService?: boolean; } diff --git a/pkg/services/authn/authn.go b/pkg/services/authn/authn.go new file mode 100644 index 00000000000..ac9b9b64a63 --- /dev/null +++ b/pkg/services/authn/authn.go @@ -0,0 +1,4 @@ +package authn + +type Service interface { +} diff --git a/pkg/services/authn/authnimpl/service.go b/pkg/services/authn/authnimpl/service.go new file mode 100644 index 00000000000..cb6e846aad8 --- /dev/null +++ b/pkg/services/authn/authnimpl/service.go @@ -0,0 +1,8 @@ +package authnimpl + +import "github.com/grafana/grafana/pkg/services/authn" + +var _ authn.Service = new(Service) + +type Service struct { +} diff --git a/pkg/services/authn/authntest/fake.go b/pkg/services/authn/authntest/fake.go new file mode 100644 index 00000000000..c1e306ac15d --- /dev/null +++ b/pkg/services/authn/authntest/fake.go @@ -0,0 +1,7 @@ +package authntest + +import "github.com/grafana/grafana/pkg/services/authn" + +type FakeService struct { + authn.Service +} diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index f015cf5afd5..7176751ccd5 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -367,5 +367,10 @@ var ( Description: "Use Elasticsearch as backend data source", State: FeatureStateAlpha, }, + { + Name: "authnService", + Description: "Use new auth service to perform authentication", + State: FeatureStateAlpha, + }, } ) diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 1e8aaa72ce4..3d95cf8a59e 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -270,4 +270,8 @@ const ( // FlagElasticsearchBackendMigration // Use Elasticsearch as backend data source FlagElasticsearchBackendMigration = "elasticsearchBackendMigration" + + // FlagAuthnService + // Use new auth service to perform authentication + FlagAuthnService = "authnService" )