Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Admin = cli.Command{ Name: "admin", Usage: "KeyStar administrative tools.", Description: "KeyStar administrative tools.", Subcommands: []cli.Command{ { Name: "init", Usage: "Initializes system keys for authentication.", Description: "Initializes system keys for authentication.", Action: adminInitHandler, }, { Name: "show-key", Usage: "Displays the system authentication ID and its corresponding secret.", Description: "Displays the system authentication ID and its corresponding secret.", Action: adminShowHandler, }, }, }
View Source
var Client = cli.Command{ Name: "client", Usage: "Client tools and utilities.", Description: "Client tools and utilities.", Flags: []cli.Flag{ cli.StringFlag{ Name: "type, t", Usage: "Designates the server `TYPE` (one of either \"http\" or \"rpc\"--http is default)", Value: "http", }, cli.StringFlag{ Name: "config, c", Usage: "Defines the location of the configuration file `CONFIG`.", }, cli.StringFlag{ Name: "connect, C", Usage: "Specify the connection `STRING` to use for connecting to a KeyStar server.", }, }, Subcommands: []cli.Command{ { Name: "get", Usage: "Retrieves a key.", Description: "Retrieves a key.", Action: clientGetHandler, Flags: []cli.Flag{ cli.IntFlag{ Name: "version", Usage: "Retrieve only the specified key `VERSION`.", }, }, }, { Name: "remove", Usage: "Removes a key.", Description: "Removes a key.", Action: clientRemoveHandler, Flags: []cli.Flag{ cli.IntFlag{ Name: "version", Usage: "Removes only the specified key `VERSION`.", }, }, }, { Name: "rotate", Usage: "Rotates a key.", Description: "Rotates a key.", Action: clientRotateHandler, Flags: []cli.Flag{}, }, { Name: "authenticate", Usage: "Authenticates a challenge-response and returns a token for use with HTTP clients. Useful for testing with curl or similar applications.", Action: clientAuthenticateHandler, Flags: []cli.Flag{ cli.StringFlag{ Name: "id, i", Usage: "Optional client identifier. By default, the system account is used.", }, cli.BoolFlag{ Name: "local, l", Usage: "Authenticate locally with the on disk keyspace configured in keystar.yaml.", }, cli.StringFlag{ Name: "host, H", Usage: "Authenticate to the specified `HOST`. This option may be configured in keystar.yaml.", }, cli.IntFlag{ Name: "port, p", Usage: "`PORT` to use for authentication to a remote host. Default: 80.", Value: 80, }, }, }, }, }
View Source
var Keys = cli.Command{ Name: "keys", Usage: "Key tools and generators.", Subcommands: []cli.Command{ { Name: "generate", Usage: "Key generation options.", Subcommands: []cli.Command{ { Name: "composite", Action: generateCompositeKey, Aliases: []string{"composite-key"}, Usage: "Generates a composite key.", Flags: []cli.Flag{ cli.IntFlag{ Name: "cipher-length, C", Usage: "Cipher key length.", Value: 32, }, cli.IntFlag{ Name: "hmac-length, H", Usage: "HMAC key length.", Value: 128, }, }, }, }, }, }, }
View Source
var License = cli.Command{
Name: "license",
Usage: "Prints KeyStar's license.",
Action: license,
}
View Source
var Server = cli.Command{ Name: "server", Usage: "KeyStar API server related commands.", Description: "KeyStar API server related commands.", Subcommands: []cli.Command{ cli.Command{ Name: "generate", Usage: "Generates a self-signed certificate for TLS operation.", Description: "Generates a self-signed certificate for TLS operation.", Action: serverGenerate, Flags: []cli.Flag{ cli.StringFlag{ Name: "privkey, k", Value: "keystar.key", Usage: "Path to the server key file.", }, cli.StringFlag{ Name: "cert, C", Value: "keystar.pem", Usage: "Path to the server certificate.", }, cli.StringSliceFlag{ Name: "host, H", Usage: "Specifies hosts to use for subjectAltName when generating TLS certificates. May be specified more than once.", }, cli.BoolFlag{ Name: "no-config-host, N", Usage: `Do not use the configured host name in "keystar.yaml" as the subjectAltName when generating TLS certificates.`, }, cli.BoolFlag{ Name: "overwrite, o", Usage: "Overwrite self-signed key and certificate files.", }, cli.BoolFlag{ Name: "expired, e", Usage: "Overwrite only self-signed key and certificate files if they have expired.", }, }, }, cli.Command{ Name: "run", Usage: "Runs the KeyStar API service.", Description: "Runs the KeyStar API service.", Action: serverHandler, Flags: []cli.Flag{ cli.StringFlag{ Name: "env-prefix", Usage: "Specifies the environment variable `PREFIX`. Default \"KEYSTAR_\".", Value: "KEYSTAR_", }, cli.IntFlag{ Name: "http-port, P", Usage: "Listen on the specified `PORT` for HTTP traffic.", }, cli.StringFlag{ Name: "http-host, H", Usage: "Listen on the specified `HOST` for HTTP traffic.", }, cli.StringFlag{ Name: "http-unix-socket", Usage: "Open UNIX domain socket on the specified `PATH` for the HTTP service.", }, cli.BoolFlag{ Name: "http-unix-only", Usage: "Force HTTP service to listen on UNIX domain sockets only.", }, cli.StringFlag{ Name: "backend, b", Usage: "Key `URI`, path, and configuration options for backend storage.", }, cli.BoolFlag{ Name: "no-clearenv", Usage: "Don't clear KEYSTAR_* environment variables after start up.", }, cli.BoolFlag{ Name: "no-dotenv", Usage: "Ignore .env files if available.", }, cli.BoolFlag{ Name: "no-rpc", Usage: "Disable RPC support even if enabled via other configuration mechanisms.", }, cli.BoolFlag{ Name: "printenv", Usage: "Prints KeyStar's environment and exits.", }, cli.IntFlag{ Name: "rpc-port", Usage: "Listen on the specified `PORT` for RPC traffic.", }, cli.StringFlag{ Name: "rpc-host", Usage: "Listen on the specified `HOST` for RPC traffic.", }, cli.StringFlag{ Name: "rpc-unix-socket", Usage: "Open UNIX domain socket on the specified `PATH` for the RPC service.", }, cli.BoolFlag{ Name: "rpc-unix-only", Usage: "Force RPC service to listen on UNIX domain sockets only.", }, cli.BoolFlag{ Name: "tls, t", Usage: "Enable TLS.", }, cli.StringFlag{ Name: "privkey, k", Value: "keystar.key", Usage: "Path to the server private key file.", }, cli.StringFlag{ Name: "cert, C", Value: "keystar.pem", Usage: "Path to the server certificate.", }, }, }, }, }
Functions ¶
func PrefixPrintenv ¶
func PrefixPrintenv(prefix string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.