{"modulePath":"github.com/unitytech/client-go","version":"v9.0.0+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package api\n\nPackage api (k8s.io/client-go/tools/bootstrap/token/api) contains constants and types needed for bootstrap tokens as maintained by the BootstrapSigner and TokenCleaner controllers (in k8s.io/kubernetes/pkg/controller/bootstrap)\n\n## Constants\n\n```go\nconst (\n\t// BootstrapTokenSecretPrefix is the prefix for bootstrap token names.\n\t// Bootstrap tokens secrets must be named in the form\n\t// `bootstrap-token-\u003ctoken-id\u003e`.  This is the prefix to be used before the\n\t// token ID.\n\tBootstrapTokenSecretPrefix = \"bootstrap-token-\"\n\n\t// SecretTypeBootstrapToken is used during the automated bootstrap process (first\n\t// implemented by kubeadm). It stores tokens that are used to sign well known\n\t// ConfigMaps. They may also eventually be used for authentication.\n\tSecretTypeBootstrapToken v1.SecretType = \"bootstrap.kubernetes.io/token\"\n\n\t// BootstrapTokenIDKey is the id of this token. This can be transmitted in the\n\t// clear and encoded in the name of the secret. It must be a random 6 character\n\t// string that matches the regexp `^([a-z0-9]{6})$`. Required.\n\tBootstrapTokenIDKey = \"token-id\"\n\n\t// BootstrapTokenSecretKey is the actual secret. It must be a random 16 character\n\t// string that matches the regexp `^([a-z0-9]{16})$`. Required.\n\tBootstrapTokenSecretKey = \"token-secret\"\n\n\t// BootstrapTokenExpirationKey is when this token should be expired and no\n\t// longer used. A controller will delete this resource after this time. This\n\t// is an absolute UTC time using RFC3339. If this cannot be parsed, the token\n\t// should be considered invalid. Optional.\n\tBootstrapTokenExpirationKey = \"expiration\"\n\n\t// BootstrapTokenDescriptionKey is a description in human-readable format that\n\t// describes what the bootstrap token is used for. Optional.\n\tBootstrapTokenDescriptionKey = \"description\"\n\n\t// BootstrapTokenExtraGroupsKey is a comma-separated list of group names.\n\t// The  bootstrap token will authenticate as these groups in addition to the\n\t// \"system:bootstrappers\" group.\n\tBootstrapTokenExtraGroupsKey = \"auth-extra-groups\"\n\n\t// BootstrapTokenUsagePrefix is the prefix for the other usage constants that specifies different\n\t// functions of a bootstrap token\n\tBootstrapTokenUsagePrefix = \"usage-bootstrap-\"\n\n\t// BootstrapTokenUsageSigningKey signals that this token should be used to\n\t// sign configs as part of the bootstrap process. Value must be \"true\". Any\n\t// other value is assumed to be false. Optional.\n\tBootstrapTokenUsageSigningKey = \"usage-bootstrap-signing\"\n\n\t// BootstrapTokenUsageAuthentication signals that this token should be used\n\t// as a bearer token to authenticate against the Kubernetes API. The bearer\n\t// token takes the form \"\u003ctoken-id\u003e.\u003ctoken-secret\u003e\" and authenticates as the\n\t// user \"system:bootstrap:\u003ctoken-id\u003e\" in the \"system:bootstrappers\" group\n\t// as well as any groups specified using BootstrapTokenExtraGroupsKey.\n\t// Value must be \"true\". Any other value is assumed to be false. Optional.\n\tBootstrapTokenUsageAuthentication = \"usage-bootstrap-authentication\"\n\n\t// ConfigMapClusterInfo defines the name for the ConfigMap where the information how to connect and trust the cluster exist\n\tConfigMapClusterInfo = \"cluster-info\"\n\n\t// KubeConfigKey defines at which key in the Data object of the ConfigMap the KubeConfig object is stored\n\tKubeConfigKey = \"kubeconfig\"\n\n\t// JWSSignatureKeyPrefix defines what key prefix the JWS-signed tokens have\n\tJWSSignatureKeyPrefix = \"jws-kubeconfig-\"\n\n\t// BootstrapUserPrefix is the username prefix bootstrapping bearer tokens\n\t// authenticate as. The full username given is \"system:bootstrap:\u003ctoken-id\u003e\".\n\tBootstrapUserPrefix = \"system:bootstrap:\"\n\n\t// BootstrapDefaultGroup is the default group for bootstrapping bearer\n\t// tokens (in addition to any groups from BootstrapTokenExtraGroupsKey).\n\tBootstrapDefaultGroup = \"system:bootstrappers\"\n\n\t// BootstrapGroupPattern is the valid regex pattern that all groups\n\t// assigned to a bootstrap token by BootstrapTokenExtraGroupsKey must match.\n\t// See also util.ValidateBootstrapGroupName()\n\tBootstrapGroupPattern = `\\Asystem:bootstrappers:[a-z0-9:-]{0,255}[a-z0-9]\\z`\n\n\t// BootstrapTokenPattern defines the {id}.{secret} regular expression pattern\n\tBootstrapTokenPattern = `\\A([a-z0-9]{6})\\.([a-z0-9]{16})\\z`\n\n\t// BootstrapTokenIDPattern defines token's id regular expression pattern\n\tBootstrapTokenIDPattern = `\\A([a-z0-9]{6})\\z`\n\n\t// BootstrapTokenIDBytes defines the number of bytes used for the Bootstrap Token's ID field\n\tBootstrapTokenIDBytes = 6\n\n\t// BootstrapTokenSecretBytes defines the number of bytes used the Bootstrap Token's Secret field\n\tBootstrapTokenSecretBytes = 16\n)\n```\n\n## Variables\n\n```go\nvar KnownTokenUsages = []string{\"signing\", \"authentication\"}\n```\nKnownTokenUsages specifies the known functions a token will get.\n\n","path":"github.com/unitytech/client-go/tools/bootstrap/token/api","name":"api","synopsis":"Package api (k8s.io/client-go/tools/bootstrap/token/api) contains constants and types needed for bootstrap tokens as maintained by the BootstrapSigner and TokenCleaner controllers (in k8s.io/kubernetes/pkg/controller/bootstrap)","isRedistributable":true}
