Certificate profiles¶
A certificate profile decides what goes into a certificate. It sets how long the certificate is valid, what the certificate may be used for, which names it may contain, which kinds of keys are accepted, and any extra extensions.
BastionXP has a built-in profile for each kind of certificate. You can write your own profiles, and choose which verifiers use them. You manage them in the portal, on the Certificate Profiles page.
The built-in profiles¶
Kind (base_type) |
Used for | How long it is valid: by default, and at most | What it may be used for |
|---|---|---|---|
server |
Servers: bxp-cli tls --name, and ACME |
90 days by default, at most 365 days | TLS server and TLS client authentication |
client |
Users: bxp-cli tls |
8 hours by default, at most 24 hours | TLS client authentication |
device |
Devices: SCEP, and ACME device attestation | 1 year by default, at most 2 years | TLS client authentication |
user |
Users | 8 hours by default, at most 24 hours | TLS client authentication |
email |
Email signing and encryption (S/MIME) | 1 year | Email protection |
code-signing |
Signing code | 1 year | Code signing |
Which kind of certificate a request gets depends on the verifier that accepts it:
| Verifier | Kind of certificate |
|---|---|
One-time tokens, with a HOST-CERTIFICATE token |
server |
One-time tokens, with a USER-CERTIFICATE token |
client |
| Single sign-on | client |
| ACME | server. With device attestation, device. |
| SCEP | device |
A certificate never lasts longer than the intermediate CA that signs it, whatever its profile says. See CA lifetimes.
Your own profiles¶
Open Certificate Profiles in the menu. The page lists your profiles, with their kind, their default validity, and the verifiers that use them. Before you add any, the list is empty, and the verifiers use the built-in profiles.
Add a profile¶
- Choose Add profile.
-
Write the profile as JSON in the box. The profile needs a
nameand abase_type. Here is a profile for web servers that are valid for 30 days:{ "name": "web-servers", "description": "TLS certificates for our web servers", "base_type": "server", "default_validity": "30d", "max_validity": "90d", "subject": { "enforce_org": true }, "key_usage": { "digital_signature": true }, "ext_key_usage": { "server_auth": true }, "san_policy": { "allow_dns": true, "allow_wildcard_dns": false }, "key_constraints": { "allowed_algorithms": ["ECDSA"], "allowed_ec_curves": ["P-256", "P-384"] } } -
Choose Add profile.
BastionXP checks the whole profile before it saves it. If there is a mistake, it tells you what it is, and saves nothing. An example of a mistake is a max_validity that is shorter than the default_validity.
Use a profile¶
A profile does nothing until a verifier uses it. Open the authority in Authority Manager, and edit the verifier. In Certificate profiles, choose the profiles that the verifier should use. See Verifiers.
A verifier uses one profile for each kind of certificate it issues. For a kind that you gave it no profile, it uses the built-in profile. The same profile can be used by verifiers in different authorities.
Change a profile¶
Choose the pencil at the end of the row, change the JSON, and choose Save. You cannot change the name of a profile.
A change applies at once to every verifier that uses the profile. The dialog lists them. It applies to the certificates that are issued from then on. It does not change a certificate that was already issued.
Delete a profile¶
Choose the bin at the end of the row, and confirm. BastionXP does not delete a profile that a verifier still uses. Remove it from those verifiers first.
Profile fields¶
| Field | What it means |
|---|---|
name, display_name, description |
Names and a description, for people. The name is required. |
base_type |
The kind of certificate this profile is for: server, client, device, user, email or code-signing. It is required. |
default_validity |
How long the certificates are valid. Write a number followed by a unit: y (years), mo (months), d (days), h (hours), m (minutes) or s (seconds). For example: 1y, 6mo, 90d, 8h. |
max_validity |
The longest time a certificate may be valid. |
subject.enforce_org, subject.enforce_org_unit |
When true, the organization (O) or organizational unit (OU) in the certificate comes from the CA, whatever the request asks for. |
subject.allow_custom_cn |
When true, the certificate's common name (CN) is taken from the request. |
key_usage |
The key usages to set: digital_signature, key_encipherment, content_commitment, data_encipherment and key_agreement. |
ext_key_usage |
What the certificate may be used for: server_auth, client_auth, email_protection, code_signing, ocsp_signing and time_stamping. |
san_policy |
Which kinds of names the certificate may contain: allow_dns, allow_wildcard_dns, allow_ip, allow_email and allow_uri. uri_prefixes lists the URIs that are allowed. |
key_constraints |
Which keys are accepted. allowed_algorithms lists the key types: RSA, ECDSA and Ed25519. min_rsa_bits is the smallest RSA key size, 2048 or more. allowed_ec_curves lists the curves: P-256, P-384 and P-521. |
cert_policies |
Certificate policies, each with an oid and an optional cps_url. |
custom_extensions |
Extra extensions, each with an oid, critical, and its DER-encoded value in hex as value_hex. |
Some keys are always refused, whatever the profile says: DSA keys, and RSA keys smaller than 2048 bits.
