2023-03-15 16:00:52 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2022-12-21 15:01:57 +00:00
|
|
|
package command
|
|
|
|
|
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
"github.com/mitchellh/cli"
|
|
|
|
)
|
|
|
|
|
|
|
|
var _ cli.Command = (*PKICommand)(nil)
|
|
|
|
|
|
|
|
type PKICommand struct {
|
|
|
|
*BaseCommand
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *PKICommand) Synopsis() string {
|
2023-02-28 14:43:05 +00:00
|
|
|
return "Interact with Vault's PKI Secrets Engine"
|
2022-12-21 15:01:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *PKICommand) Help() string {
|
|
|
|
helpText := `
|
|
|
|
Usage: vault pki <subcommand> [options] [args]
|
|
|
|
|
|
|
|
This command has subcommands for interacting with Vault's PKI Secrets
|
|
|
|
Engine. Here are some simple examples, and more detailed examples are
|
|
|
|
available in the subcommands or the documentation.
|
|
|
|
|
|
|
|
Check the health of a PKI mount, to the best of this token's abilities:
|
|
|
|
|
|
|
|
$ vault pki health-check pki
|
|
|
|
|
|
|
|
Please see the individual subcommand help for detailed usage information.
|
|
|
|
`
|
|
|
|
|
|
|
|
return strings.TrimSpace(helpText)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *PKICommand) Run(args []string) int {
|
|
|
|
return cli.RunResultHelp
|
|
|
|
}
|