Skip to content

bxp token

Create a one-time token for requesting a certificate.

Usage

Create a token that allows its holder to request one certificate
with the given names, and hand it to the person or script that needs
the certificate. The token works once and only until it expires.

It works in two places:

  On the CA machine, where the configuration file is, it makes the
  token itself.

  Anywhere else, or with --ca-url, it asks the CA server for one. Your
  browser opens for a login with your identity provider (or, with
  --ldap, you give your directory password), and you
  must be an admin in the CA's configuration. The CA's log records that you
  created the token.

Usage:
  bxp token [flags]

Examples:
  # on the CA machine
  bxp token --profile tls-server --name web.example.com --name 10.0.0.5
  bxp token --profile tls-client --name [email protected] --valid-for 1h
  bxp token --profile ssh-user --name deploy --subject [email protected]

  # from an admin's own machine
  bxp token --ca-url https://ca.example.com:8443 --root root.crt \
      --profile ssh-host --name web1.example.com

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")
  -h, --help                 help for token
      --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 the certificate may contain (repeat for more).
                             TLS: DNS name, IP address or email address.
                             SSH: login name (ssh-user) or host name (ssh-host)
      --password-stdin       with --ldap, read the password from the standard input instead of asking
      --profile string       certificate profile: tls-server, tls-client, tls-device, ssh-user, ssh-host, or one of your profiles (default "tls-server")
      --root string          path of the CA's root certificate, root.crt
                             (or BXP_ROOT; default: the one saved by "bxp trust")
      --subject string       who the token is for, e.g. [email protected]. It is written to the CA's log
                             and, for SSH, to the SSH server's log at each login (default: the first name)
      --valid-for duration   how long the token can be used (maximum 24h0m0s) (default 10m0s)

Global Flags:
      --config string   path to the configuration file (default "bastionxp-ca.yaml")