Versions in this module Expand all Collapse all v2 v2.1.6 Apr 7, 2023 Changes in this version + const CharsetUTF8 + const ContentType + const TextPlain + var ErrContextClosed = errors.New("context Closed") + var ErrTokenNotFound = errors.New("Error:\ttoken not found") + func NewTLSConfig(cfg config.TLS) (*tls.Config, error) + func NewX509CertPool(path string) (*x509.CertPool, error) + type AKSResolve struct + func (r *AKSResolve) BuildDomainsFromNamespace(namespace string) []string + func (r *AKSResolve) BuildServiceAccountPrefixFromNamespace(namespace string) []string + func (r *AKSResolve) GetAdminDomain(namespace string) string + func (r *AKSResolve) GetEmptyNamespace() string + func (r *AKSResolve) GetNonResourceGroup() string + func (r *AKSResolve) GetNonResourceNamespace() string + func (r *AKSResolve) IsAdminAccess(verb, namespace, apiGroup, resource, name string) bool + func (r *AKSResolve) IsAllowed(verb, namespace, apiGroup, resource, name string) bool + func (r *AKSResolve) MapAPIGroup(group string) string + func (r *AKSResolve) MapK8sResourceAthenzResource(k8sRes string) string + func (r *AKSResolve) MapResourceName(name string) string + func (r *AKSResolve) MapVerbAction(verb string) string + func (r *AKSResolve) PrincipalFromUser(user string, groups []string) string + func (r *AKSResolve) TrimResource(res string) string + type Athenz interface + AthenzAuthenticator func(http.ResponseWriter, *http.Request) error + AthenzAuthorizer func(http.ResponseWriter, *http.Request) error + func NewAthenz(cfg config.Athenz, log Logger) (Athenz, error) + type EKSResolve struct + func (r *EKSResolve) BuildDomainsFromNamespace(namespace string) []string + func (r *EKSResolve) BuildServiceAccountPrefixFromNamespace(namespace string) []string + func (r *EKSResolve) GetAdminDomain(namespace string) string + func (r *EKSResolve) GetEmptyNamespace() string + func (r *EKSResolve) GetNonResourceGroup() string + func (r *EKSResolve) GetNonResourceNamespace() string + func (r *EKSResolve) IsAdminAccess(verb, namespace, apiGroup, resource, name string) bool + func (r *EKSResolve) IsAllowed(verb, namespace, apiGroup, resource, name string) bool + func (r *EKSResolve) MapAPIGroup(group string) string + func (r *EKSResolve) MapK8sResourceAthenzResource(k8sRes string) string + func (r *EKSResolve) MapResourceName(name string) string + func (r *EKSResolve) MapVerbAction(verb string) string + func (r *EKSResolve) PrincipalFromUser(user string, groups []string) string + func (r *EKSResolve) TrimResource(res string) string + type K8SResolve struct + func (r *K8SResolve) BuildDomainsFromNamespace(namespace string) []string + func (r *K8SResolve) BuildServiceAccountPrefixFromNamespace(namespace string) []string + func (r *K8SResolve) GetAdminDomain(namespace string) string + func (r *K8SResolve) GetEmptyNamespace() string + func (r *K8SResolve) GetNonResourceGroup() string + func (r *K8SResolve) GetNonResourceNamespace() string + func (r *K8SResolve) IsAdminAccess(verb, namespace, apiGroup, resource, name string) bool + func (r *K8SResolve) IsAllowed(verb, namespace, apiGroup, resource, name string) bool + func (r *K8SResolve) MapAPIGroup(group string) string + func (r *K8SResolve) MapK8sResourceAthenzResource(k8sRes string) string + func (r *K8SResolve) MapResourceName(name string) string + func (r *K8SResolve) MapVerbAction(verb string) string + func (r *K8SResolve) PrincipalFromUser(user string, groups []string) string + func (r *K8SResolve) TrimResource(res string) string + type Logger interface + Close func() error + GetLogFlags func() webhook.LogFlags + GetProvider func() webhook.LogProvider + func NewLogger(cfg config.Logger) Logger + type Resolver interface + BuildDomainsFromNamespace func(string) []string + BuildServiceAccountPrefixFromNamespace func(string) []string + GetAdminDomain func(string) string + GetEmptyNamespace func() string + GetNonResourceGroup func() string + GetNonResourceNamespace func() string + IsAdminAccess func(verb, namespace, apiGroup, resource, name string) bool + IsAllowed func(verb, namespace, apiGroup, resource, name string) bool + MapAPIGroup func(group string) string + MapK8sResourceAthenzResource func(string) string + MapResourceName func(name string) string + MapVerbAction func(string) string + PrincipalFromUser func(user string, groups []string) string + TrimResource func(string) string + func NewResolver(cfg config.Mapping) Resolver + type ResourceMapper interface + func NewResourceMapper(resolver Resolver) ResourceMapper + type Server interface + ListenAndServe func(context.Context) chan []error + func NewServer(cfg config.Server, h http.Handler) Server + type TokenService interface + GetToken func() (string, error) + StartTokenUpdater func(context.Context) TokenService + func NewTokenService(cfg config.Token) (TokenService, error) + type UserMapper interface + func NewUserMapper(resolver Resolver) UserMapper Other modules containing this package github.com/AthenZ/garm/v3