Documentation ¶
Index ¶
- Constants
- Variables
- func BuildJsonWebKeySet(publicKeyPath string) ([]byte, error)
- func CountNonDirectoryFiles(files []os.FileInfo) int
- func CreateClusterAuthentication(issuerURL, targetDir string) error
- func CreateKeyPairCmd(cmd *cobra.Command, args []string)
- func CreateKeys(prefixDir string) error
- func CreateShellScript(commands []string) string
- func EnsureDir(path string) error
- func GetListOfCredentialsRequests(dir string, enableTechPreview bool) ([]*credreqv1.CredentialsRequest, error)
- func KeyIDFromPublicKey(publicKey interface{}) (string, error)
- func NewCreateKeyPairCmd() *cobra.Command
- func ShortenName(name string, maxLength int) string
- type JSONWebKeySet
Constants ¶
View Source
const ( // PrivateKeyFile is the name of the private key file created by "ccoctl create key-pair" command PrivateKeyFile = "serviceaccount-signer.private" // PublicKeyFile is the name of the public key file created by "ccoctl create key-pair" command PublicKeyFile = "serviceaccount-signer.public" // DiscoveryDocumentURI is a URI for the OpenID configuration discovery document DiscoveryDocumentURI = ".well-known/openid-configuration" // KeysURI is a URI for public key that enables client to validate a JSON Web Token issued by the Identity Provider KeysURI = "keys.json" // ManifestsDirName is the name of the directory to save installer manifests created by ccoctl ManifestsDirName = "manifests" // TLSDirName is the name of the directory to save bound service account signing key created by ccoctl TLSDirName = "tls" // OidcTokenPath is the path where oidc token is stored in the pod OidcTokenPath = "/var/run/secrets/openshift/serviceaccount/token" // DiscoveryDocumentTemplate is a template of the discovery document that needs to be populated with appropriate values DiscoveryDocumentTemplate = `` /* 350-byte string literal not displayed */ )
Variables ¶
View Source
var ( // CreateKeyPairOpts captures the options that affect creation // of the key pair. CreateKeyPairOpts = options{ TargetDir: "", } )
Functions ¶
func BuildJsonWebKeySet ¶
BuildJsonWebKeySet builds JSON web key set from the public key
func CountNonDirectoryFiles ¶
CountNonDirectoryFiles counts files which are not a directory
func CreateClusterAuthentication ¶
CreateClusterAuthentication creates the authentication manifest file for the installer
func CreateKeyPairCmd ¶
func CreateKeys ¶
func CreateShellScript ¶
CreateShellScript creates a shell script given commands to execute
func GetListOfCredentialsRequests ¶
func GetListOfCredentialsRequests(dir string, enableTechPreview bool) ([]*credreqv1.CredentialsRequest, error)
GetListOfCredentialsRequests decodes manifests in a given directory and returns a list of CredentialsRequests
func KeyIDFromPublicKey ¶
KeyIDFromPublicKey derives a key ID non-reversibly from a public key reference: https://github.com/kubernetes/kubernetes/blob/0f140bf1eeaf63c155f5eba1db8db9b5d52d5467/pkg/serviceaccount/jwt.go#L89-L111
func NewCreateKeyPairCmd ¶
NewCreateKeyPairCmd provides the "create-key-pair" subcommand
func ShortenName ¶
Types ¶
type JSONWebKeySet ¶
type JSONWebKeySet struct {
Keys []jose.JSONWebKey `json:"keys"`
}
Click to show internal directories.
Click to hide internal directories.