Documentation ¶
Overview ¶
kubetoken provides time limited access tokens to Kubernetes clusters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BotOU string = "OU=bots,OU=people"
BotOU
View Source
var GroupOU string = "OU=access,OU=groups"
GroupOU
View Source
var NamespaceRegex string = `^kube-(?P<customer>\w+)-(?P<ns>[a-z0-9](?:[-a-z0-9]*[a-z0-9])?)-(?P<env>\w+)-dl-`
NamespaceRegex is used to extract customer, namespace, and env from ldap queries
View Source
var SearchBase string = "DC=example,DC=com"
SearchBase is the LDAP search base.
View Source
var SearchGroups string = "kube"
Group prefix to use in ldap search
View Source
var UserOU string = "OU=people"
UserOU
View Source
var Version string = "unknown"
Version is populated by the release process.
Functions ¶
This section is empty.
Types ¶
type ADRoleProvider ¶
type ADRoleProvider struct {
LDAPCreds
}
ADRoleProvider speaks Active Directory flavoured LDAP to retrieve the roles available to a specific user.
func (*ADRoleProvider) FetchRolesForUser ¶
func (r *ADRoleProvider) FetchRolesForUser(user string) ([]string, error)
type ADRoleValidater ¶
ADRoleValidater validates a user is permitted to assume a role as specified in Active Directory flavoured LDAP.
func (*ADRoleValidater) ValidateRoleForUser ¶
func (r *ADRoleValidater) ValidateRoleForUser(user, role string) error
type CertificateResponse ¶
type CertificateResponse struct { Username string `json:"username"` Role string `json:"role"` Files map[string][]byte `json:"files"` Addresses []string `json:"addresses"` Customer string `json:"customer"` Environment string `json:"environment"` Namespace string `json:"namespace"` Contexts []Context `json:"contexts"` }
type LDAPConn ¶
type LDAPConn interface { // Search performs a given search request. Search(searchRequest *ldap.SearchRequest) (*ldap.SearchResult, error) // Close closes the connection and frees any associated requets. Close() // yes, ldap.v2 gets this wrong }
LDAPConn represents a LDAP connection that can handle search requests.
type Signer ¶
type Signer struct { Cert *x509.Certificate PrivKey *rsa.PrivateKey }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
kubetokend
kubetokend handles requests for kubeconfig cert/key pairs.
|
kubetokend handles requests for kubeconfig cert/key pairs. |
internal
|
|
cert
Cert automates the generation of certificate and certificate authorities.
|
Cert automates the generation of certificate and certificate authorities. |
Click to show internal directories.
Click to hide internal directories.