> ## Documentation Index
> Fetch the complete documentation index at: https://help.allthenticate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Domain Controller Bridge configuration reference

> Every field of the Domain Controller Bridge's dc-bridge-config.json and .env files: bridge, ces, wcce and ldap blocks, authentication types, secrets and command-line options.

Fields are listed for version 1.5.0, which reads both files at startup. For setup steps and complete examples, see [Install the bridge](https://help.allthenticate.com/windows/active-directory/bridge.md).

## Files and command-line options

| Option | Default | Purpose |
| - | - | - |
| `--config`, `-c` | `dc-bridge-config.json` in the working directory | Configuration file |
| `--env-file`, `-e` | `.env` in the working directory | Secrets file |
| `--test-error-reporting` | | Sends one test report and exits: 0 accepted, 1 unreachable or reporting off, 2 reached but rejected |
| `--version` | | Prints the release |
| `service install --account <account>` | | Windows only. Installs the bridge as a service; also takes `--config` and `--env-file`, stored as absolute paths, with `.env` defaulting to the file beside the configuration. |
| `service uninstall` | | Windows only. Stops and removes the service, leaving the files. |

### Secrets

A field whose name ends in `_env` holds the **name** of an environment variable, never the secret itself. The value goes in `.env`, or in the bridge's environment. At startup the bridge resolves every name and, if any is missing, exits listing all of them: `Missing required environment variable(s): …`. A variable that is present but empty passes that check and fails only when used.

`.env` holds one `NAME=value` per line, with no spaces around `=`. Put a value containing `$`, `#`, a backslash, a double quote or spaces in single quotes, for example `CES_PASSWORD='value'`; write a single quote inside it as `'\''`. Windows line endings and a UTF-8 byte order mark are accepted in `.env`. Save `dc-bridge-config.json` as UTF-8 without a byte order mark.

> [!WARNING]
>
> If a `.env` line can't be parsed, the bridge stops with `failed to parse <path>: Error parsing line: '…'`, which repeats the line, including any password on it. If that output was shared or logged, change the password.

`.env` can also hold `RUST_LOG` (log level, default `info`), `NO_COLOR=1` (no color codes in a redirected log) and `HTTPS_PROXY`. The proxy carries the bridge's HTTPS connections to Allthenticate, to CES and to error reporting, but not LDAPS or WCCE's DCOM connection to the CA.

### First-run placeholder

If `dc-bridge-config.json` doesn't exist, the bridge writes a placeholder, plus a `.env` listing its variables if no `.env` exists, and exits with code 0. An existing `.env` is left alone; add the variables yourself. The placeholder:

* Uses `period` and `poll_period` of `5`. Change them to `3600` and `300`.
* Has a `ces` block and a `"wcce": null` line, with `CES_AGENT_PFX_PASSWORD` and `CES_PASSWORD` in `.env`. For WCCE, set `"ces": null` (or delete it), **replace** the `"wcce": null` line with a `wcce` block, and add `WCCE_AGENT_PFX_PASSWORD` to `.env`. Adding a block while that line remains fails with `duplicate field wcce`.
* Uses Kerberos (`Gssapi`) for LDAP, which only the Windows build supports. In Docker it fails with `ldap: GSSAPI authentication is only supported on Windows!` until you switch to `Ntlm` and add `LDAP_PASSWORD` to `.env`.
* Has `id` `9999999`. Set your bridge ID.

## Top-level blocks

| Block | Required | Purpose |
| - | - | - |
| `bridge` | Yes | Identity and connection to Allthenticate |
| `ces` | At most one of `ces` and `wcce` | Web enrollment through CES |
| `wcce` | At most one of `ces` and `wcce` | Native enrollment to the CA over DCOM. Windows build only. |
| `ldap` | Yes for certificate logon | User sync over LDAPS |

With neither `ces` nor `wcce`, the bridge only syncs users. With both, startup fails: `enrollment: set only one of ces or wcce, not both`. Startup errors found while preparing the blocks are listed together under `dc-bridge failed to start due to the following configuration error(s):`, each prefixed with its block, such as `wcce:`.

## bridge

| Field | Type | Description |
| - | - | - |
| `id` | number | The number after `#` on the bridge card. A JSON number, not a string: `"id": 29`. Run only one bridge with a given ID and secret at a time. |
| `secret_env` | variable name | The bridge secret, sent to Allthenticate with the ID. |
| `backend_url` | string, optional | Defaults to `https://api.allthenticate.com/`. Must be `https://`. Leave it out unless Allthenticate tells you otherwise. |
| `error_reporting` | boolean, optional | Reports the bridge's own crashes and defects to Allthenticate. Defaults to `true`. See [Data handling](https://help.allthenticate.com/windows/data-handling.md#domain-controller-bridge). |

## ces

The certificate template must issue automatically, with **CA certificate manager approval** cleared, on either enrollment path.

| Field | Type | Description |
| - | - | - |
| `url` | string | The CES endpoint, for example `https://<host>/<CA-name>_CES_UsernamePassword/service.svc/CES`. Must be `https://`; plain `http://` is accepted only for `localhost`, `127.0.0.1` or `[::1]`. The port comes from the URL, or 443. |
| `auth` | object | `UsernamePassword` or `Certificate`, below. |
| `agent_pfx_path` | string | Path to the enrollment agent PFX, not a user's logon certificate. Or use `agent_cert_stores`. |
| `agent_pfx_password_env` | variable name | The PFX password. |
| `period` | number | Seconds between checks for waiting certificate requests. Recommended `3600`; at least 1. |
| `ca_cert_path` | string, optional | A PEM or DER CA certificate to trust for `url`, when an internal CA issued the CES site certificate. Can be the same file as `ldap.ca_cert_path`. |

**User name and password** (Microsoft: *User Name and Password Authentication*), sent as a WS-Security token inside the request. This isn't NTLM.

```json theme={null}
{ "type": "UsernamePassword", "username": "svc-allth-enroll@internal.example.com", "password_env": "CES_PASSWORD" }
```

**Client certificate** (mutual TLS). The PFX must hold exactly one private key.

```json theme={null}
{ "type": "Certificate", "pfx_path": "/app/certs/ces-client.pfx", "password_env": "CES_CLIENT_PFX_PASSWORD" }
```

Kerberos authentication to CES isn't supported. To have the CA authenticate the bridge's Windows account, use `wcce`.

## wcce

Submits the same on-behalf-of request as `ces` straight to the CA's MS-WCCE interface (`ICertRequest2` over DCOM), with no CES, CEP or IIS. It needs the Windows build on a domain-joined host; the Docker image and Linux builds exit with `wcce: native WCCE (ICertRequest2 over DCOM) enrollment is only supported on Windows; …`. There's no `auth` block: the CA authenticates the account the bridge runs as.

| Field | Type | Description |
| - | - | - |
| `ca_config` | string | The CA's `HOST\CA name`, as `certutil` with no arguments prints on each CA's `Config:` line, without the quotes. The host can be a short name or a fully qualified name. **In JSON, write the backslash twice.** |
| `agent_pfx_path` | string | Path to the enrollment agent PFX. Or use `agent_cert_stores`. |
| `agent_pfx_password_env` | variable name | The PFX password. |
| `period` | number | Seconds between checks for waiting certificate requests. Recommended `3600`; 0 is rejected. |

```json theme={null}
"wcce": {
  "ca_config": "ca01.internal.example.com\\Example Issuing CA",
  "agent_pfx_path": "C:\\ProgramData\\dc-bridge\\enrollment-agent.pfx",
  "agent_pfx_password_env": "WCCE_AGENT_PFX_PASSWORD",
  "period": 3600
}
```

A single backslash, as `certutil` prints it, fails with `failed to parse <path>: invalid escape at line N column M`, or before `b`, `f`, `n`, `r` or `t` with `wcce: ca_config contains a control character`. Startup also rejects a URL, a value without a backslash, an empty host or CA name, two backslashes inside the value (four in JSON), and spaces around either part.

### Enrollment agent certificate

In `ces` or `wcce`, give either `agent_pfx_path` with `agent_pfx_password_env`, or, on the Windows build, the certificate stores to search:

| Field | Type | Description |
| - | - | - |
| `agent_cert_stores` | array of strings | Windows certificate stores to search before every batch, for example `["LocalMachine\\My"]`. A renewed certificate is used without a restart. The key can be non-exportable or TPM-backed. |
| `agent_cert_thumbprint` | string, optional | SHA-1 thumbprint of the one certificate to use. Needs `agent_cert_stores`. A renewal changes the thumbprint, so update the pin each time. |

The run-as account (or the service identity `NT SERVICE\dc-bridge`) needs **Read** on the key.

## ldap

| Field | Type | Description |
| - | - | - |
| `url` | string | Domain controller hostname, with optional `:port` and **no scheme**. Always LDAPS, port 636 by default. Must match a name in the LDAPS certificate; never an IP address. |
| `base_dn` | string | Full DN to search under, for example `OU=Members,DC=internal,DC=example,DC=com`. |
| `group_dns` | array of strings, optional | DNs of Active Directory groups. Only their members under `base_dn` are synced, nested groups included; any listed group is enough. Empty, `null` or absent syncs everyone under `base_dn`. An entry without `=` fails startup. |
| `auth` | object | `Ntlm` or `Gssapi`, below. |
| `requested_fields` | array of strings | Attributes fetched and sent to Allthenticate for each user. Must include `mail`, or the bridge won't start. Include `sAMAccountName`, which the bridge needs to request each user's certificate. Allthenticate stores every attribute listed, so keep it to these two unless your engineer asks for more. |
| `poll_period` | number | Seconds between rereads of the search base. Recommended `300`, at most `600` to stay inside Active Directory's 900-second idle connection limit. Go lower if a firewall drops idle connections sooner. |
| `ca_cert_path` | string, optional | PEM or DER CA certificate to trust for `url`. Needed in Docker when an internal CA issued the LDAPS certificate. The Windows build also trusts the Windows certificate store, so there it only adds trust. |

**NTLM:** a user name and password bind.

```json theme={null}
{ "type": "Ntlm", "username": "svc-allth-ldap@internal.example.com", "password_env": "LDAP_PASSWORD" }
```

Use `user@domain` or `DOMAIN\\user` in JSON, never a DN.

**Kerberos (`Gssapi`):** through Windows SSPI, as the account the bridge runs as, with no keytab or password. `fqdn` is the domain controller's fully qualified name. Windows build only.

```json theme={null}
{ "type": "Gssapi", "fqdn": "dc01.internal.example.com" }
```

### Multi-domain forests

Members from other domains are found only through a Global Catalog: set `url` to `<gc host>:3269` and `base_dn` to the forest root domain's DN, or to `""` if the forest has more than one tree. Every group between a listed group and a user in another domain must be universal, and a Global Catalog returns only the partial attribute set (`mail`, `userPrincipalName` and `sAMAccountName` are in it). Without a Global Catalog, listing a group from another domain fails every sync with `failed to look up group_dns: …`.

To preview what a `group_dns` list matches before a production bridge uses it, run the bridge's filter on a domain-joined host, adjusting the search base and group DN. Starting the bridge is not a dry run: its first sync applies immediately.

```powershell theme={null}
Get-ADUser -SearchBase 'DC=internal,DC=example,DC=com' -LDAPFilter '(&(objectClass=user)(objectCategory=person)(!(isCriticalSystemObject=TRUE))(!(CN=krbtgt*))(!(CN=MSOL*))(memberOf:1.2.840.113556.1.4.1941:=CN=Allthenticate Users,OU=Groups,DC=internal,DC=example,DC=com))' | Measure-Object
```

With `RUST_LOG=debug`, the bridge prints the exact filter it uses at startup (`LDAP filter: …`).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.