Skip to content

Admins and API tokens

This page explains who is an administrator of BastionXP, and how administrators create tokens. A token is a short-lived credential that a script, a device or your identity provider uses instead of a password.

For how administrators sign in to the portal, see Sign in and set up your account.

Who is an admin

These people are administrators:

  • The first administrator. This is the person whose email address is the email setting of the configuration file. In the cloud service, it is the person who created the organization. This person is always an administrator, and is an owner of the organization.
  • Every member of the group pki-admins in your identity provider. BastionXP learns about this group through SCIM.

Nobody else is an administrator.

Only administrators sign in to the portal. Other people never use the portal. They get their certificates with the bxp-cli client, as described in The BastionXP client.

Make somebody an administrator

  1. In your identity provider, create the group pki-admins, if you do not have it yet. The name must be exactly pki-admins.
  2. Make sure that SCIM sends the group and its members to BastionXP. See SCIM integration.
  3. Add the person to the group.
  4. Make sure that the portal is set up for single sign-on, so that the person can sign in with their company account.

Check that the person and the group arrived in BastionXP. Open Users and Groups in the portal. A change in your identity provider can take a few minutes to arrive.

Remove an administrator

Remove the person from the group pki-admins, or make their account inactive, in your identity provider. When the change reaches BastionXP, the person can no longer sign in. The API tokens that they created also stop working, as described below.

Tokens

A token is a credential for one purpose, and it is valid for a limited time. An administrator creates tokens in the portal.

Where you create a token depends on its purpose:

  • Tokens for certificates are created on the page of the authority that should issue the certificates. Open the authority in Authority Manager, and choose Create token under One-time tokens.
  • Tokens for the BastionXP API and for SCIM are created in Settings, under API tokens.

Each token has a purpose:

Purpose Where to create it What it is for How long it is valid
HOST-CERTIFICATE The authority's page A server's TLS or SSH certificate, with bxp-cli tls --name or bxp-cli ssh --principal. 10 minutes
USER-CERTIFICATE The authority's page A TLS or SSH certificate for a person. The certificate is in the name of the administrator who created the token. 10 minutes
SCEP-DYNAMIC-CHALLENGE The authority's page The SCEP challenge password for one device. It is for a SCEP verifier whose challenge mode is dynamic. 1 year
API Settings → API tokens Calls to the BastionXP API. 24 hours
SCIM-PROVISIONING Settings → API tokens Your identity provider's SCIM connection to BastionXP. 1 year

A token works only for its own purpose. For example, a USER-CERTIFICATE token cannot get a server certificate.

Create a token

  1. Open the page where the token belongs, as described above.
  2. Choose Create token.
  3. Choose the Purpose.

    Choose the purpose of the token

  4. Choose Create token.

  5. Copy the token with the copy button. The portal shows the token only once. If you lose it, create a new one.

The API tokens page

Keep tokens secret, like passwords. Anybody who has a token can use it until it expires. Creating a token is written to the audit log, with its purpose, but never the token itself.

API tokens

A script that calls the BastionXP API sends its API token in the Authorization header of each request, as a bearer token: Authorization: Bearer <token>.

An API token is tied to the administrator who created it. It stops working when that person is no longer an administrator, for example when they leave the group pki-admins. Create the token for a script as a person who stays.

An API token is valid for 24 hours. Create a new one when you need one. Do not keep API tokens in files or in version control.

The SCIM token

The SCIM-PROVISIONING token is different. It belongs to the connection between your identity provider and BastionXP, not to the administrator who created it. It keeps working when that administrator leaves. Only its expiry ends it.

Paste the token into the SCIM settings of your identity provider. Before the token expires, create a new one in the portal, and replace it in your identity provider. See SCIM integration.

Certificate tokens

A HOST-CERTIFICATE or USER-CERTIFICATE token is for one certificate, within 10 minutes. You give the token to the person or the server that should get the certificate, and they use it with bxp-cli. See The BastionXP client.

A SCEP-DYNAMIC-CHALLENGE token is the one-time password of a device that enrolls with SCEP. See SCEP.