Documentation
¶
Overview ¶
Copyright Jetstack Ltd. See LICENSE for details.
Copyright Jetstack Ltd. See LICENSE for details.
Copyright Jetstack Ltd. See LICENSE for details.
Index ¶
- func BuildConfiguration() (*rest.Config, error)
- func FakeJWT(issuerURL string) (string, error)
- func FreePort() (string, error)
- func LoadRBACConfig(path string) (map[string]RBAC, error)
- func NewAuthorizer(r *rbacvalidation.StaticRoles) *rbac.RBACAuthorizer
- func ParseTokenFromRequest(req *http.Request) (string, bool)
- func SignalHandler() chan struct{}
- type ClusterRole
- type ClusterRoleBinding
- type RBAC
- type Role
- type RoleBinding
- type Rules
- type Subject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildConfiguration ¶
func FakeJWT ¶
fakeJWT generates a valid JWT using the passed input parameters which is signed by a generated key. This is useful for checking the status of a signer.
func NewAuthorizer ¶
func NewAuthorizer(r *rbacvalidation.StaticRoles) *rbac.RBACAuthorizer
func ParseTokenFromRequest ¶
Return just the token from the header of the request, without 'bearer'.
func SignalHandler ¶
func SignalHandler() chan struct{}
Types ¶
type ClusterRole ¶
type ClusterRoleBinding ¶
type ClusterRoleBinding struct {
APIVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
Metadata struct {
Name string `yaml:"name"`
ClusterName string `yaml:"clusterName,omitempty"`
} `yaml:"metadata"`
RoleRef struct {
APIGroup string `yaml:"apiGroup"`
Kind string `yaml:"kind"`
Name string `yaml:"name"`
} `yaml:"roleRef"`
Subjects []Subject `yaml:"subjects"`
}
type RBAC ¶
type RBAC struct {
Roles []*v1.Role
RoleBindings []*v1.RoleBinding
ClusterRoles []*v1.ClusterRole
ClusterRoleBindings []*v1.ClusterRoleBinding
}
type RoleBinding ¶
type RoleBinding struct {
APIVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
Metadata struct {
Name string `yaml:"name"`
Namespace string `yaml:"namespace,omitempty"`
ClusterName string `yaml:"clusterName,omitempty"`
} `yaml:"metadata"`
RoleRef struct {
APIGroup string `yaml:"apiGroup"`
Kind string `yaml:"kind"`
Name string `yaml:"name"`
} `yaml:"roleRef"`
Subjects []Subject `yaml:"subjects"`
}
Click to show internal directories.
Click to hide internal directories.