provisioning

package
v0.0.0-...-166901d Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 20 Imported by: 5

Documentation

Index

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

func BuildJsonWebKeySet(publicKeyPath string) ([]byte, error)

BuildJsonWebKeySet builds JSON web key set from the public key

func CountNonDirectoryFiles

func CountNonDirectoryFiles(files []os.FileInfo) int

CountNonDirectoryFiles counts files which are not a directory

func CreateClusterAuthentication

func CreateClusterAuthentication(issuerURL, targetDir string) error

CreateClusterAuthentication creates the authentication manifest file for the installer

func CreateKeyPairCmd

func CreateKeyPairCmd(cmd *cobra.Command, args []string)

func CreateKeys

func CreateKeys(prefixDir string) error

func CreateShellScript

func CreateShellScript(commands []string) string

CreateShellScript creates a shell script given commands to execute

func EnsureDir

func EnsureDir(path string) error

EnsureDir ensures that directory exists at a given path

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

func KeyIDFromPublicKey(publicKey interface{}) (string, error)

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

func NewCreateKeyPairCmd() *cobra.Command

NewCreateKeyPairCmd provides the "create-key-pair" subcommand

func ShortenName

func ShortenName(name string, maxLength int) string

Types

type JSONWebKeySet

type JSONWebKeySet struct {
	Keys []jose.JSONWebKey `json:"keys"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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