bxp tls¶
Create a key and get a TLS certificate for it.
Usage¶
Create a new private key, ask the CA for a TLS certificate and write
both to files named after the first name. Run this on the machine that
needs the certificate; it needs no configuration file.
<name>.key the private key (it never leaves this machine)
<name>.crt the certificate, followed by the intermediate certificate
With --token, the token decides whether this is a server or a client
certificate and which names are allowed. Without one, your browser
opens for a login with your identity provider (or, with --ldap, you
give your directory password); you must be an admin
of the CA, and --profile chooses the kind.
Usage:
bxp tls [flags]
Examples:
bxp tls --ca-url https://ca.example.com:8443 --root root.crt \
--token $TOKEN --name web.example.com --name 10.0.0.5
Flags:
--ca-url string address of the CA server, e.g. https://ca.example.com:8443
(or BXP_CA_URL; default: the one saved by "bxp trust")
--force replace the key and certificate files if they exist
-h, --help help for tls
--ldap log in with your directory (Active Directory) username and password instead of the browser
--ldap-user string the username for --ldap (default: your name on this machine)
--name stringArray a name for the certificate: DNS name, IP address or email address (repeat for more).
Default with --token: all the names the token allows
--out-dir string directory to write the key and certificate to (default ".")
--password-stdin with --ldap, read the password from the standard input instead of asking
--profile string tls-server, tls-client or one of the CA's profiles. Only used without --token: a token already says which.
Default: tls-server with --name; without --name, the client certificate the CA gives you for yourself
--root string path of the CA's root certificate, root.crt
(or BXP_ROOT; default: the one saved by "bxp trust")
--token string a one-time token (or BXP_TOKEN). Without one, you log in in your browser
--validity duration how long the certificate should be valid, e.g. 24h (default: decided by the CA)
Global Flags:
--config string path to the configuration file (default "bastionxp-ca.yaml")