authz

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const HelmAgentCtxKey string = "helm-agent"
View Source
const KubernetesAgentCtxKey string = "k8s-agent"
View Source
const KubernetesDynamicClientCtxKey string = "k8s-dyn-client"

Variables

This section is empty.

Functions

func NewClusterContext

func NewClusterContext(ctx context.Context, cluster *models.Cluster) context.Context

func NewHelmRepoContext

func NewHelmRepoContext(ctx context.Context, helmRepo *models.HelmRepo) context.Context

func NewInfraContext

func NewInfraContext(ctx context.Context, infra *models.Infra) context.Context

func NewInviteContext

func NewInviteContext(ctx context.Context, invite *models.Invite) context.Context

func NewNamespaceContext

func NewNamespaceContext(ctx context.Context, namespace string) context.Context

func NewProjectContext

func NewProjectContext(ctx context.Context, project *models.Project) context.Context

func NewRegistryContext

func NewRegistryContext(ctx context.Context, registry *models.Registry) context.Context

func NewReleaseContext

func NewReleaseContext(ctx context.Context, helmRelease *release.Release) context.Context

func NewRequestScopeCtx

func NewRequestScopeCtx(ctx context.Context, reqScopes map[types.PermissionScope]*types.RequestAction) context.Context

Types

type ClusterScopedFactory

type ClusterScopedFactory struct {
	// contains filtered or unexported fields
}

func NewClusterScopedFactory

func NewClusterScopedFactory(
	config *config.Config,
) *ClusterScopedFactory

func (*ClusterScopedFactory) Middleware

func (p *ClusterScopedFactory) Middleware(next http.Handler) http.Handler

type ClusterScopedMiddleware

type ClusterScopedMiddleware struct {
	// contains filtered or unexported fields
}

func (*ClusterScopedMiddleware) ServeHTTP

type GitInstallationScopedFactory

type GitInstallationScopedFactory struct {
	// contains filtered or unexported fields
}

func NewGitInstallationScopedFactory

func NewGitInstallationScopedFactory(
	config *config.Config,
) *GitInstallationScopedFactory

func (*GitInstallationScopedFactory) Middleware

type GitInstallationScopedMiddleware

type GitInstallationScopedMiddleware struct {
	// contains filtered or unexported fields
}

func (*GitInstallationScopedMiddleware) ServeHTTP

type HelmRepoScopedFactory

type HelmRepoScopedFactory struct {
	// contains filtered or unexported fields
}

func NewHelmRepoScopedFactory

func NewHelmRepoScopedFactory(
	config *config.Config,
) *HelmRepoScopedFactory

func (*HelmRepoScopedFactory) Middleware

func (p *HelmRepoScopedFactory) Middleware(next http.Handler) http.Handler

type HelmRepoScopedMiddleware

type HelmRepoScopedMiddleware struct {
	// contains filtered or unexported fields
}

func (*HelmRepoScopedMiddleware) ServeHTTP

type InfraScopedFactory

type InfraScopedFactory struct {
	// contains filtered or unexported fields
}

func NewInfraScopedFactory

func NewInfraScopedFactory(
	config *config.Config,
) *InfraScopedFactory

func (*InfraScopedFactory) Middleware

func (p *InfraScopedFactory) Middleware(next http.Handler) http.Handler

type InfraScopedMiddleware

type InfraScopedMiddleware struct {
	// contains filtered or unexported fields
}

func (*InfraScopedMiddleware) ServeHTTP

type InviteScopedFactory

type InviteScopedFactory struct {
	// contains filtered or unexported fields
}

func NewInviteScopedFactory

func NewInviteScopedFactory(
	config *config.Config,
) *InviteScopedFactory

func (*InviteScopedFactory) Middleware

func (p *InviteScopedFactory) Middleware(next http.Handler) http.Handler

type InviteScopedMiddleware

type InviteScopedMiddleware struct {
	// contains filtered or unexported fields
}

func (*InviteScopedMiddleware) ServeHTTP

type KubernetesAgentGetter

type KubernetesAgentGetter interface {
	GetOutOfClusterConfig(cluster *models.Cluster) *kubernetes.OutOfClusterConfig
	GetDynamicClient(r *http.Request, cluster *models.Cluster) (dynamic.Interface, error)
	GetAgent(r *http.Request, cluster *models.Cluster) (*kubernetes.Agent, error)
	GetHelmAgent(r *http.Request, cluster *models.Cluster) (*helm.Agent, error)
}

func NewOutOfClusterAgentGetter

func NewOutOfClusterAgentGetter(config *config.Config) KubernetesAgentGetter

type NamespaceScopedFactory

type NamespaceScopedFactory struct {
	// contains filtered or unexported fields
}

func NewNamespaceScopedFactory

func NewNamespaceScopedFactory(
	config *config.Config,
) *NamespaceScopedFactory

func (*NamespaceScopedFactory) Middleware

func (p *NamespaceScopedFactory) Middleware(next http.Handler) http.Handler

type NamespaceScopedMiddleware

type NamespaceScopedMiddleware struct {
	// contains filtered or unexported fields
}

func (*NamespaceScopedMiddleware) ServeHTTP

type OutOfClusterAgentGetter

type OutOfClusterAgentGetter struct {
	// contains filtered or unexported fields
}

func (*OutOfClusterAgentGetter) GetAgent

func (d *OutOfClusterAgentGetter) GetAgent(r *http.Request, cluster *models.Cluster) (*kubernetes.Agent, error)

func (*OutOfClusterAgentGetter) GetDynamicClient

func (d *OutOfClusterAgentGetter) GetDynamicClient(r *http.Request, cluster *models.Cluster) (dynamic.Interface, error)

func (*OutOfClusterAgentGetter) GetHelmAgent

func (d *OutOfClusterAgentGetter) GetHelmAgent(r *http.Request, cluster *models.Cluster) (*helm.Agent, error)

func (*OutOfClusterAgentGetter) GetOutOfClusterConfig

func (d *OutOfClusterAgentGetter) GetOutOfClusterConfig(cluster *models.Cluster) *kubernetes.OutOfClusterConfig

type PolicyHandler

type PolicyHandler struct {
	// contains filtered or unexported fields
}

func (*PolicyHandler) ServeHTTP

func (h *PolicyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type PolicyMiddleware

type PolicyMiddleware struct {
	// contains filtered or unexported fields
}

func NewPolicyMiddleware

func NewPolicyMiddleware(
	config *config.Config,
	endpointMeta types.APIRequestMetadata,
	loader policy.PolicyDocumentLoader,
) *PolicyMiddleware

func (*PolicyMiddleware) Middleware

func (p *PolicyMiddleware) Middleware(next http.Handler) http.Handler

type ProjectScopedFactory

type ProjectScopedFactory struct {
	// contains filtered or unexported fields
}

func NewProjectScopedFactory

func NewProjectScopedFactory(
	config *config.Config,
) *ProjectScopedFactory

func (*ProjectScopedFactory) Middleware

func (p *ProjectScopedFactory) Middleware(next http.Handler) http.Handler

type ProjectScopedMiddleware

type ProjectScopedMiddleware struct {
	// contains filtered or unexported fields
}

func (*ProjectScopedMiddleware) ServeHTTP

type RegistryScopedFactory

type RegistryScopedFactory struct {
	// contains filtered or unexported fields
}

func NewRegistryScopedFactory

func NewRegistryScopedFactory(
	config *config.Config,
) *RegistryScopedFactory

func (*RegistryScopedFactory) Middleware

func (p *RegistryScopedFactory) Middleware(next http.Handler) http.Handler

type RegistryScopedMiddleware

type RegistryScopedMiddleware struct {
	// contains filtered or unexported fields
}

func (*RegistryScopedMiddleware) ServeHTTP

type ReleaseScopedFactory

type ReleaseScopedFactory struct {
	// contains filtered or unexported fields
}

func NewReleaseScopedFactory

func NewReleaseScopedFactory(
	config *config.Config,
) *ReleaseScopedFactory

func (*ReleaseScopedFactory) Middleware

func (p *ReleaseScopedFactory) Middleware(next http.Handler) http.Handler

type ReleaseScopedMiddleware

type ReleaseScopedMiddleware struct {
	// contains filtered or unexported fields
}

func (*ReleaseScopedMiddleware) ServeHTTP

Directories

Path Synopsis
Package policy provides methods for parsing RBAC policies to determine if a user has access to a given resource.
Package policy provides methods for parsing RBAC policies to determine if a user has access to a given resource.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL