Documentation ¶
Index ¶
- Constants
- func HasServiceAccountPrefix(idName string) bool
- func NewAuthRetryingClient(c client.WithWatch, backoff wait.Backoff) client.WithWatch
- func NewContext(ctx context.Context, info *Info) context.Context
- func NewDefaultBackoff() wait.Backoff
- func SameSubject(subject rbacv1.Subject, identity Identity) (bool, error)
- func ServiceAccountNSAndName(serviceAccountSubjectName string) (string, string)
- type AuthRetryingClient
- func (a AuthRetryingClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (a AuthRetryingClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (a AuthRetryingClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (a AuthRetryingClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object, ...) error
- func (a AuthRetryingClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (a AuthRetryingClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (a AuthRetryingClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type CachingIdentityProvider
- type CertIdentityInspector
- type CertInspector
- type CertTokenIdentityProvider
- type Identity
- type IdentityProvider
- type Info
- type InfoParser
- type NamespacePermissions
- func (o *NamespacePermissions) AuthorizedIn(ctx context.Context, identity Identity, namespace string) (bool, error)
- func (o *NamespacePermissions) GetAuthorizedOrgNamespaces(ctx context.Context, info Info) (map[string]bool, error)
- func (o *NamespacePermissions) GetAuthorizedSpaceNamespaces(ctx context.Context, info Info) (map[string]bool, error)
- type TokenIdentityInspector
- type TokenReviewer
- type UnprivilegedClientFactory
- type UserK8sClientFactory
Constants ¶
View Source
const ( BearerScheme string = "bearer" CertScheme string = "clientcert" UnknownScheme string = "unknown" )
Variables ¶
This section is empty.
Functions ¶
func HasServiceAccountPrefix ¶ added in v0.7.0
func NewAuthRetryingClient ¶
func NewDefaultBackoff ¶
func SameSubject ¶ added in v0.7.0
func ServiceAccountNSAndName ¶ added in v0.7.0
Types ¶
type AuthRetryingClient ¶
func (AuthRetryingClient) Create ¶
func (a AuthRetryingClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
func (AuthRetryingClient) Delete ¶
func (a AuthRetryingClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
func (AuthRetryingClient) DeleteAllOf ¶
func (a AuthRetryingClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
func (AuthRetryingClient) List ¶
func (a AuthRetryingClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
func (AuthRetryingClient) Patch ¶
func (a AuthRetryingClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
func (AuthRetryingClient) Update ¶
func (a AuthRetryingClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type CachingIdentityProvider ¶
type CachingIdentityProvider struct {
// contains filtered or unexported fields
}
func NewCachingIdentityProvider ¶
func NewCachingIdentityProvider(identityProvider IdentityProvider, identityCache *cache.Expiring) *CachingIdentityProvider
func (*CachingIdentityProvider) GetIdentity ¶
type CertIdentityInspector ¶
type CertInspector ¶
type CertInspector struct {
// contains filtered or unexported fields
}
func NewCertInspector ¶
func NewCertInspector(restConfig *rest.Config) *CertInspector
type CertTokenIdentityProvider ¶
type CertTokenIdentityProvider struct {
// contains filtered or unexported fields
}
func NewCertTokenIdentityProvider ¶
func NewCertTokenIdentityProvider(tokenInspector TokenIdentityInspector, certInspector CertIdentityInspector) *CertTokenIdentityProvider
func (*CertTokenIdentityProvider) GetIdentity ¶
type IdentityProvider ¶
type NamespacePermissions ¶
type NamespacePermissions struct {
// contains filtered or unexported fields
}
func NewNamespacePermissions ¶
func NewNamespacePermissions(privilegedClient client.Client, identityProvider IdentityProvider) *NamespacePermissions
func (*NamespacePermissions) AuthorizedIn ¶
func (*NamespacePermissions) GetAuthorizedOrgNamespaces ¶
func (*NamespacePermissions) GetAuthorizedSpaceNamespaces ¶
type TokenIdentityInspector ¶
type TokenReviewer ¶
type TokenReviewer struct {
// contains filtered or unexported fields
}
func NewTokenReviewer ¶
func NewTokenReviewer(privilegedClient client.Client) *TokenReviewer
type UnprivilegedClientFactory ¶
type UnprivilegedClientFactory struct {
// contains filtered or unexported fields
}
func NewUnprivilegedClientFactory ¶
func NewUnprivilegedClientFactory(config *rest.Config, mapper meta.RESTMapper, backoff wait.Backoff) UnprivilegedClientFactory
func (UnprivilegedClientFactory) BuildClient ¶
func (f UnprivilegedClientFactory) BuildClient(authInfo Info) (client.WithWatch, error)
func (UnprivilegedClientFactory) BuildK8sClient ¶
func (f UnprivilegedClientFactory) BuildK8sClient(authInfo Info) (k8sclient.Interface, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.