dfae5e5b4d
* Decrypt: Add namespace matches to authorizer * SecureValueClient: Add namespace matches when auth checking
18 lines
533 B
Go
18 lines
533 B
Go
package decrypt
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/grafana/grafana/pkg/registry/apis/secret/contracts"
|
|
"github.com/grafana/grafana/pkg/registry/apis/secret/xkube"
|
|
)
|
|
|
|
// 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(context.Context, xkube.Namespace, string, []string) (string, bool) {
|
|
return "", true
|
|
}
|