kubernetesauth

package
v1.1.117 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type API

type API interface {
	UpdateKubernetesAuthMethod(method MethodEntity) error
	UpdateKubernetesAuthRole(method core.MountPathEntity, role RoleEntity) error
	DeleteKubernetesAuthRole(method core.MountPathEntity, role core.RoleNameEntity) error
	ReadKubernetesAuthRole(method core.MountPathEntity, role core.RoleNameEntity) (*Role, error)
	LoginWithKubernetesAuth(method core.MountPathEntity, role core.RoleNameEntity, jwt string) (*core.AuthResponse, error)
}

func NewAPI

func NewAPI(coreAPI core.API, authAPI auth.API) API

type Config

type Config struct {
	KubernetesHost       string   `json:"kubernetes_host,omitempty"`
	Issuer               string   `json:"issuer,omitempty"`
	PemKeys              []string `json:"pem_keys,omitempty"`
	KubernetesCACert     string   `json:"kubernetes_ca_cert,omitempty"`
	TokenReviewerJWT     string   `json:"token_reviewer_jwt,omitempty"`
	DisableISSValidation bool     `json:"disable_iss_validation,omitempty"`
	DisableLocalCAJWT    bool     `json:"disable_local_ca_jwt,omitempty"`
}

type Method

type Method struct {
	Path   string
	Config *Config
}

func (*Method) GetMethodConfig

func (k *Method) GetMethodConfig() (*Config, error)

func (*Method) GetMountPath

func (k *Method) GetMountPath() (string, error)

type MethodEntity

type MethodEntity interface {
	core.MountPathEntity
	GetMethodConfig() (*Config, error)
}

type Role

type Role struct {
	Name                 string
	Policies             []core.PolicyName
	BoundNamespaces      []string
	BoundServiceAccounts []string
}

func (*Role) GetBoundNamespaces

func (k *Role) GetBoundNamespaces() ([]string, error)

func (*Role) GetBoundServiceAccounts

func (k *Role) GetBoundServiceAccounts() ([]string, error)

func (*Role) GetRoleName

func (k *Role) GetRoleName() (string, error)

func (*Role) GetRolePolicies

func (k *Role) GetRolePolicies() ([]core.PolicyName, error)

type RoleEntity

type RoleEntity interface {
	core.RoleNameEntity
	core.RolePoliciesEntity
	GetBoundNamespaces() ([]string, error)
	GetBoundServiceAccounts() ([]string, error)
}

Jump to

Keyboard shortcuts

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