Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cli.Command{ Name: "bootstrap", Usage: "Register this client to the kmgm HTTPS/gRPC server", Flags: []cli.Flag{}, Action: func(c *cli.Context) error { env := action.GlobalEnvironment slog := env.Logger.Sugar() if env.ProfileName != storage.DefaultProfileName && env.ProfileName != authprofile.ProfileName { slog.Warnf("Specified --profile %q setting is ignored in bootstrap cmd.", env.ProfileName) } env.ProfileName = authprofile.ProfileName if err := env.EnsureClientConn(c.Context); err != nil { return err } if err := IssueCertPair(c.Context, env); err != nil { return err } env.ConnectionInfo.AccessToken = "" env.ConnectionInfo.ClientCertificateFile = env.Storage.ClientCertPath() env.ConnectionInfo.ClientPrivateKeyFile = env.Storage.ClientPrivateKeyPath() if err := env.SaveConnectionInfo(); err != nil { return err } return nil }, }
Functions ¶
func EnsureKey ¶
func EnsureKey(env *action.Environment) (crypto.PrivateKey, error)
func IssueCertPair ¶
func IssueCertPair(ctx context.Context, env *action.Environment) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.