open-vault/command/transform.go
Larroyo c32032c1f8
Make transit import command work for the transform backend (#20668)
* Add import and import-version commands for the transform backend
2023-05-25 15:33:27 -05:00

42 lines
988 B
Go

package command
import (
"strings"
"github.com/mitchellh/cli"
)
var _ cli.Command = (*TransformCommand)(nil)
type TransformCommand struct {
*BaseCommand
}
func (c *TransformCommand) Synopsis() string {
return "Interact with Vault's Transform Secrets Engine"
}
func (c *TransformCommand) Help() string {
helpText := `
Usage: vault transform <subcommand> [options] [args]
This command has subcommands for interacting with Vault's Transform Secrets
Engine. Here are some simple examples, and more detailed examples are
available in the subcommands or the documentation.
To import a key into a new FPE transformation:
$ vault transform import transform/transformations/fpe/new-transformation @path/to/key \
template=identifier \
allowed_roles=physical-access
Please see the individual subcommand help for detailed usage information.
`
return strings.TrimSpace(helpText)
}
func (c *TransformCommand) Run(args []string) int {
return cli.RunResultHelp
}