Files
grafana/pkg/registry/apis/secret/decrypt/noop_authorizer.go
Matheus Macabu a1e71fc85f SecretsManager: Update decrypt authorization with service identity (#105668)
(cherry picked from commit 9aea342be1764c33033aa1717242829970d5f5be)
2025-05-20 16:24:51 +02:00

17 lines
514 B
Go

package decrypt
import (
"context"
"github.com/grafana/grafana/pkg/registry/apis/secret/contracts"
)
// NoopAlwaysAllowedAuthorizer is a no-op implementation of the DecryptAuthorizer which always returns `allowed=true`.
type NoopAlwaysAllowedAuthorizer struct{}
var _ contracts.DecryptAuthorizer = &NoopAlwaysAllowedAuthorizer{}
func (a *NoopAlwaysAllowedAuthorizer) Authorize(ctx context.Context, secureValueName string, secureValueDecrypters []string) (identity string, allowed bool) {
return "", true
}