Skip to content

ACME External Account Binding (EAB)

Without External Account Binding (EAB), an ACME server could be accessed by any acme client, potentially opening the gate for any hackers and rogue agents.

By combining standard ACME server with EAB, IT admins using BastionXP Private CA can now enforce strict control over who can access the Private CA and create an account for certificate generation.

This section explains what EAB is and how it works. It also shows how to turn it on in BastionXP, and how to use it.

What is ACME External Account Binding (EAB)?

External Account Binding (EAB) is a feature defined in the ACME protocol standard (RFC 8555).

In a standard, open ACME setup (like Let’s Encrypt), anyone who can reach the server can register an account. In a private enterprise environment, "open" is often a security risk.

How EAB Solves the Anonymous Account Registration Security Problem:

EAB acts as a gatekeeper for account registration. It requires the ACME client to present two specific credentials to the BastionXP server before it allows an account to be created:

  • Key ID (KID): The identifier for the account.

  • HMAC Key: A symmetric key used to cryptographically sign the registration payload.

Why is it Useful?

  • Authentication: It prevents anonymous or unauthorized clients from registering with your ACME server. If a client doesn't have the HMAC key, they cannot even begin the process of requesting a certificate.

  • Binding: It cryptographically binds an ACME account to an external identity known by the CA.

  • Auditability: Every certificate request is tied to a verified account, making it easier to track which team or service owns a certificate.

BastionXP implements EAB strictly according to the RFC standard, ensuring compatibility with all major ACME clients (Certbot, acme.sh, Lego, cert-manager, etc.).

Secure by Design: Single-Use & Time-Bound Credentials

EAB credentials (the Key ID and HMAC) are designed to be temporary "bootstrapping" keys, not permanent passwords. It doesn't replace the role of the Account private key.

Single-Use:

EAB credentials are typically used only once—during the initial registration handshake and are bound to a client account internally. Once the ACME account is successfully created using the EAB credentials, the credentials will be marked as used. After the ACME account is successfully created with the ACME server, the client relies on its own locally generated private key for all future communications with the server. The EAB keys are no longer needed and can be safely discarded, effectively closing the door behind the user.

Basically, ACME EAB credentials are a single-use ticket provided to an ACME client to register an account with the ACME server.

Time-Bound:

When generating an EAB key in BastionXP, admins can set a strict expiration window (e.g., "valid for 1 hour"). If the credentials are not used to register a client within that timeframe, they automatically become invalid. This prevents unused keys from lingering as "ghost" credentials that could be exploited days or months later. The default expiration time is 24 hours.

How EAB Works: The Workflow

External Account Binding changes the very first step of the ACME conversation—the Account Registration. It transforms an anonymous "hello" into a verified "secure handshake."

The Secure Handshake (EAB Authentication)

Before any certificate can be requested, the ACME client must register an account with the BastionXP server.

  1. Client Preparation: The ACME client (e.g., Certbot) is configured with a Key ID (KID) and an HMAC Key issued by BastionXP to each validated client.
  2. Signing the Request: The client generates a standard ACME registration payload. However, instead of just sending it, it uses the HMAC Key to compute a cryptographic signature (MAC) over the registration data and its own public key.
  3. Transmission: The client sends the registration request to the BastionXP ACME server, including:
    • The Key ID (so BastionXP knows which key to look up).
    • The MAC signature.
    • The client's ACME account public key.
  4. Server Verification: BastionXP looks up the secret key associated with that Key ID. It re-computes the signature.
    • Match: The client possesses the correct secret. The server creates an ACME account and binds it to that external identity.
    • No Match: The server rejects the request with an unauthorized error.

Key Takeaway: If the handshake fails, the client cannot proceed. No account is created, and no further communication is allowed.

Standard ACME Workflow Kicks-in After EAB Validation

It is important to understand that in the standard ACME protocol (RFC 8555), EAB is strictly an account registration step. Once the EAB handshake is successful, the server treats the client like any other registered account.

The "special" EAB credentials (KID, HMAC key) are typically NOT used again; the client uses the Account private key, it just created, for all future signing.

The standard ACME workflow starts as soon as the EAB check passes. From then on, the client signs all its requests to the ACME server with the ACME account's private key. The EAB credential plays no part in the rest of the workflow, such as creating orders and validating domains.

BastionXP Configuration

EAB is off by default, for each ACME verifier. To turn it on for a verifier:

  1. In the web portal, open Authority Manager, and then the authority.
  2. In Verifiers, on the ACME card, choose Set up (or Edit).
  3. Switch External account binding on, and save the verifier.

How to Fetch the EAB credentials from BastionXP

In the web portal, open Authority Manager, and then the authority. In the ACME account credentials section, choose Create credential.

BastionXP then creates a credential that can be used only once. It has two parts: a Key ID and an HMAC Key. The HMAC key is a base64url-encoded string.

This credential will be shown only once.

The credential is valid for 24 hours by default. Copy it, and use it soon. If you want to use it later, for example in an automation workflow, store it in a safe place.

After its first use, the credential is marked as used. It cannot be used to create another ACME account.

ACME Client Example: bxp-cli using EAB Credentials

Give the EAB credential to the first bxp-cli acme issue. This first run creates the ACME account:

sudo bxp-cli acme issue --acme-id acme --name db-001.internal.example.com \
    --eab-kid "ab525543..." --eab-hmac-key "WnSjjLFi49..."

bxp-cli saves the new account's key. Later runs, renewals and revocations use this account key, and need no EAB credential. See ACME with bxp-cli.

ACME Client Example: Lego using EAB Credentials

In the example below, we use the Lego ACME client to use the EAB credentials generated by BastionXP to register an account with the BastionXP ACME server:

lego --email "[email protected]" \
--server "https://ca.internal.example.com/authorities/my-ca/acme/acme/directory" \
--eab --kid "ab525543..." --hmac "WnSjjLFi49..." \
--domains "db-001.internal.example.com" run

You can use any ACME standards compliant client (Certbot, cert-manager, Caddy server etc.,) that supports ACME EAB implementation(RFC 8555), and use the EAB credentials to register an account with the BastionXP ACME server.