Skip to content

Sign in and set up your account

This page explains how administrators sign in to the BastionXP web portal. It also explains how the first administrator sets up their account, and what to do when something goes wrong.

Every administrator signs in with two things: something they know and something they have. For most administrators, the two things are a password and a second factor. The second factor is an authenticator app on their phone, or a passkey. Administrators who sign in with single sign-on use their identity provider instead, which has its own second factor.

Set up the first administrator

When BastionXP starts for the first time, it creates one administrator account. The account belongs to the email address in the email setting of the configuration file. This account has no password yet. BastionXP has no default password, so nobody can sign in with a password that is known in advance.

Instead, BastionXP makes a one-time setup link. You open the link, and you set up the account yourself.

BastionXP writes the setup link to its log every time it starts, until the administrator has set a password. To find it, read the log:

sudo journalctl -u bastionxp --no-pager | grep "open this link"

The line looks like this:

level=WARN msg="the primary admin has no password yet: open this link to set it, and a second factor" [email protected] link="https://ca.example.com/#/setup?token=0xKz30j3DjUeEUyEYOgWPzIzaztkhpCPh-02HfC2V0A" expires=2026-11-29T06:14:27Z

The part after link= is the setup link. Copy it into your browser.

The setup link works once, and it is valid for 24 hours. If it has expired, or if you cannot find it, make a new one:

sudo bastionxp admin setup-link --config /etc/bastionxp/config.yaml

The command prints a new link, and the older links stop working.

Use the setup link soon, and keep it private

Anybody who has the setup link can set the administrator's password until the link is used or expires. The link is also in the server's log, so anybody who can read the log can see it. Open the link as soon as you start BastionXP for the first time. Once the password is set, the link stops working.

If the administrator already has a password, the command refuses to make a link. Sign in with the password instead.

Choose a password

Open the setup link. The portal asks for a new password.

The setup page, where the first administrator chooses a password

The password must follow these rules:

  • It has at least 12 characters, and at most 256.
  • It is not your email address or your user name.
  • It is not in a list of leaked passwords.

There is no rule that forces special characters or a regular change. A long passphrase of several words is easier to remember than a short password with symbols, and it is stronger. Use a password manager.

To check the leaked-password list, BastionXP asks the Have I Been Pwned service. BastionXP sends only the first five characters of a hash of the password, never the password itself. If the server cannot reach the internet, BastionXP uses a smaller list of common passwords that is built into the server.

If the password breaks a rule, the portal says which rule:

Message What to do
The password must have at least 12 characters. Choose a longer password.
The password must not be your email or your username. Choose a different password.
This password is in a list of leaked passwords. Choose another one. Choose a password that you have not used anywhere else.

Set up a second factor

After the password, the portal asks you to set up a second factor. Every administrator must have one. You cannot skip this step.

Choose an authenticator app or a passkey

You have two choices. You can add the other one later, in your account security.

Authenticator app. Use this if you have a phone with an authenticator app, such as Google Authenticator, Microsoft Authenticator or 1Password. Any app that supports time-based one-time passwords (TOTP) works. It shows a new six-digit code every 30 seconds.

  1. Choose Authenticator app.
  2. In your app, scan the QR code. If you cannot scan it, choose the copy button to copy the setup key, and type it into your app.
  3. Type the six-digit code that your app shows, and choose Turn on.

Scan the QR code with an authenticator app, and type the six-digit code

If the portal says that the code is not valid, check the time on your phone. The codes depend on the time, so the phone's clock must be correct. Turn on automatic time on your phone, and try again with the next code.

Passkey. Use this if your computer or your security key supports passkeys, such as Touch ID, Windows Hello or a YubiKey. A passkey is more secure than a six-digit code, because it cannot be typed into a fake website.

  1. Choose Passkey.
  2. Give the passkey a name, such as MacBook Touch ID, so that you can tell it apart later. The name has at most 64 characters.
  3. Choose Create passkey, and follow your browser's instructions.

To use passkeys, you must open the portal over HTTPS, with its real domain name. A passkey that you create for one domain name does not work for another.

Save your recovery codes

When you turn on your first second factor, the portal shows ten recovery codes.

The ten recovery codes, shown once

Recovery codes are for the day that you lose your phone or your security key. Each code lets you sign in once, without a second factor. A code looks like 7w2ds-ebb8v.

  • Save the codes now, in your password manager or in a safe place. Use Copy or Download.
  • The portal shows the codes only once. It cannot show them again.
  • Each code works once. After you use one, it is gone.
  • Do not keep the codes in the same place as your password, if that place is not a password manager.

Tick I saved my recovery codes in a safe place, and choose Continue. You are now signed in to the portal.

Sign in with a password

After the first setup, you sign in like this.

  1. Open the portal, and enter your email address and your password.

    The sign-in page

  2. Choose Sign in. The portal then asks for your second factor.

    The second step of the sign-in

  3. Give the second factor:

    • If you use an authenticator app, type the current six-digit code, and choose Verify.
    • If you use a passkey, choose Use a passkey, and follow your browser's instructions.
    • If you lost both, choose Use a recovery code instead, and type one of your recovery codes.

You have 10 minutes between the password and the second factor. After that, you start again with the password.

A session lasts 48 hours. After that, you sign in again.

Sign in with single sign-on

If your organization has set up single sign-on, the sign-in page offers it. The portal sends you to your company's identity provider, such as Microsoft Entra ID, Google, Okta or Keycloak. You sign in there, with your company account and the second factor that the identity provider asks for. The identity provider then sends you back to the portal.

BastionXP lets you in if both of these are true:

  • You are a member of the group pki-admins in your identity provider, or you are the first administrator.
  • BastionXP knows you. Your identity provider tells BastionXP about its users and groups with SCIM.

BastionXP does not ask for a second factor after single sign-on, because your identity provider has already asked for one.

To set up single sign-on, see Single sign-on for the portal.

The cloud service: choose your organization first

If you use the BastionXP cloud service, many organizations use the same sign-in address. So the sign-in page first asks for the short name of your organization. This is the name that is part of your organization's CA address, for example acme in acme.ca.bastionxp.com.

The cloud service asks for the organization first

Type the name, and choose Continue. The portal remembers it in your browser, so that you do not type it every time. To use a different organization, choose Change.

You can also open the address https://<sign-in address>/#/login/acme, with your organization's name at the end, to skip this step.

If your organization uses single sign-on, the next page offers Continue with your identity provider. Below it, a password form remains for the organization's owners and its break-glass admins, who can sign in with a password even when single sign-on is required.

Single sign-on, with a password form for owners and break-glass admins

Sensitive actions ask for your second factor again

A few actions have a large effect, for example adding a break-glass admin. For these, the portal asks for your second factor again, even though you are signed in. This protects your organization if somebody uses a computer that you left signed in.

When the portal asks, type the current code from your authenticator app, or use your passkey. A recovery code is not accepted here. After you confirm, you have five minutes to do the action. Each action needs its own confirmation.

Sign-in limits

BastionXP limits the sign-in attempts, to stop people from guessing passwords.

  • After 10 failed sign-ins in a row for one account, the account is locked for 15 minutes. The portal says: Too many failed logins. Try again later. A correct sign-in resets the count.
  • One network address may make at most 20 sign-in attempts at once, and then 20 per minute. After that, the portal says: Too many login attempts. Try again later.

The portal shows the same message, Invalid email or password, when the email address is wrong and when the password is wrong. This is on purpose. It does not tell an attacker which email addresses have accounts.

Every sign-in, successful or not, is written to the audit log, with the time and the network address.

Sign out

Open the user menu in the top bar, and choose Sign out. Sign out when you leave a shared computer.

Troubleshooting

What you see What it means What to do
Invalid email or password The email address or the password is wrong. Check both. The password is case-sensitive. If you have not set a password yet, use the setup link.
Too many failed logins. Try again later. The account is locked for 15 minutes after 10 failed sign-ins. Wait 15 minutes, and sign in again.
Invalid code The second-factor code is wrong or expired. Type the current code. Check the clock on your phone.
Log in with your password first. More than 10 minutes passed between the password and the second factor, or you opened the second step directly. Start again with your email and your password.
The passkey was not accepted. The browser did not give a valid passkey. Try again. Check that you use the same domain name that you used when you created the passkey. Or use a recovery code.
The link is not valid, or it expired. The setup link was used, replaced or expired. Make a new one with bastionxp admin setup-link.
Single sign-on failed. Try again, or sign in with your password. Your identity provider refused the sign-in or did not answer. Try again. If it keeps failing, ask your identity provider's administrator, or sign in with a password if you are an owner or a break-glass admin.
this user is not an admin here BastionXP does not know your email address. Check that your identity provider has synchronized your user to BastionXP with SCIM.
this user is not a member of pki-admins You are not in the pki-admins group. Ask your identity provider's administrator to add you to the group.
the login expired or was not started here: please log in again You opened the identity provider's answer without starting at the portal's sign-in page, or too much time passed. Open the portal's sign-in page, and start again.

If you lost your authenticator app and your passkeys, use a recovery code, and then set up a new second factor in your account security. If you have no recovery codes left, contact [email protected].

Where to go next