> ## 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.

# Operate the Domain Controller Bridge day to day

> Monitor, upgrade, back up, move and decommission the Domain Controller Bridge after the implementation call, on Windows or Docker, for CES and WCCE.

This page is for the team that runs the bridge, including changes to its run-as account.

## Monitor the bridge

The admin portal can't tell you whether the bridge is running: a stopped bridge looks like a healthy one, with no error on its card and synced data that stops changing. Monitor it on the bridge host.

* **Windows service:** Windows restarts the service 60 seconds after a crash or failed start. Alert when the `dc-bridge` service isn't running. `sc.exe query dc-bridge` and the System event log (source **Service Control Manager**) say why it didn't start.
* **Docker:** keep `restart: unless-stopped` in `compose.yaml`, and alert with your container monitoring when the container is down.
* **Log silence:** if you forward the log to a log platform, set `RUST_LOG=debug` (a line in `.env` on Windows, or the `environment` block in Docker) and alert when no line has arrived for twice your `poll_period`. At the default `info` level, a healthy idle bridge writes nothing, so silence means nothing.
* **Portal errors:** errors appear on the bridge card, on Certificate Generation Policy cards and on individual requests (select the policy to see them). An error on a policy stops issuance for everyone under it until a Super Admin dismisses it with its **×**. Make the **DC Bridging** page, including every policy card, part of your routine checks.
* **WCCE:** after every start, check that the log has the `WCCE enrollment runs as this Windows account` line with the `ca_config` and `account` you expect.

Error reporting sends Allthenticate details of crashes and defects inside the bridge, such as a CA error code it doesn't recognize. It isn't a liveness signal: a stopped bridge reports nothing, and failed calls to the CA such as `0x800706ba` aren't reported.

## Upgrade

Read the release notes your engineer sends, and upgrade when Allthenticate asks you to: the bridge and the Allthenticate backend are released together and don't negotiate compatibility. The bridge keeps no local state, so nothing is migrated. The admin portal doesn't show the bridge's version; your record is the image tag in `compose.yaml`, or `.\dc-bridge.exe --version` (also under the file's **Properties** > **Details**).

> [tab] Windows service
>
> 1. Download `dc-bridge-<version>-windows-x86_64.exe` and its `.sha256` from `https://software.allthenticate.com/dc-bridge/` (for example `https://software.allthenticate.com/dc-bridge/dc-bridge-1.5.0-windows-x86_64.exe`; the folder itself has no index page), and verify the signature and hash as in [Install the bridge](https://help.allthenticate.com/windows/active-directory/bridge.md#install-on-windows).
> 2. In an elevated PowerShell, run `Stop-Service dc-bridge`. Keep the old `dc-bridge.exe` to roll back to.
> 3. Replace `dc-bridge.exe` in the bridge folder with the new file, under the same name.
> 4. Run `Start-Service dc-bridge`, and check `.\dc-bridge.exe --version` and the log.

> [tab] Docker
>
> Change the image tag in `compose.yaml` to the version your engineer names, for example `allthenticate/allthenticate-dc-bridge:1.5.0`, then:
>
> ```bash theme={null}
> docker compose pull
> docker compose up -d
> docker compose logs -f dc-bridge
> ```

When you upgrade from an older bridge, make these changes first:

| Upgrading from | Change first | Otherwise |
| - | - | - |
| 0.3.x or earlier | Error reporting is on by default. Add `"error_reporting": false` to `bridge` if your policy requires it. | The bridge sends crash and defect reports. |
| 0.5.0 or earlier, CES | Make `ces.url` an `https://` address. | Startup stops with an error starting `ces: ces.url`. |
| 0.6.x or earlier | Make sure `ldap.requested_fields` includes `mail`. | The bridge exits: `ldap: requested_fields must include mail`. |
| 0.7.x or earlier, on Windows | Version 0.8.0 added the built-in Windows service. Stop and remove your NSSM service or scheduled task, check that `Get-Process dc-bridge* -ErrorAction SilentlyContinue` returns nothing, then run `service install`. | Two bridges with the same ID and secret must never run at once. |
| A service installed by an earlier build | Run `sc.exe preshutdown dc-bridge 35000`, or uninstall and install again. | A host restart gives the stopping bridge Windows' default 10 seconds instead of 35. |

After upgrading a Windows bridge, check:

| Check | Expected result |
| - | - |
| `.\dc-bridge.exe --version` in an elevated PowerShell | The version your engineer named. |
| Log right after start | No `failed to parse`, `Missing required environment variable(s)` or `dc-bridge failed to start`; the service stays running. |
| WCCE only: startup line | `WCCE enrollment runs as this Windows account` with the expected `ca_config` and `account`. |
| Certificates still issue | The next request under the policy reaches **Certificate Created** with no new error on the bridge or policy card. |

## Change the run-as account or its rights

* **Change the account:** run `.\dc-bridge.exe service uninstall`, then `service install --account` again. The folder grant is on the service identity, so it needs no change.
* **Domain account password:** if you set an account with a password in `services.msc`, enter the new password on the service's **Log On** tab when it changes, then restart the service. A gMSA rotates its own password.
* **Secrets in `.env`** (the PFX password, CES or LDAP passwords) take effect when you edit `.env` and restart the bridge.
* **After changing the account's rights on the CA or template**, or its group memberships, run `Restart-Service certsvc` on the CA, then give the bridge a fresh logon: restart the service for a gMSA; for NetworkService or LocalSystem, restart the host or run `klist -li 0x3e4 purge` (NetworkService) or `klist -li 0x3e7 purge` (SYSTEM) as an administrator.

## Move a CES bridge to WCCE

Use this after CES and CEP have been disabled on the CA. The bridge ID, its secret and the policies stay the same.

**1. Grant the CA rights**

A CA administrator grants the run-as account its rights and restarts Certificate Services. See [Configure AD CS](https://help.allthenticate.com/windows/active-directory/certificate-services.md).

**2. Set up the Windows bridge**

On a domain-joined Windows host, create the bridge folder and copy over `dc-bridge-config.json`, `.env` and the enrollment agent PFX. Don't start it yet.

**3. Swap ces for wcce**

In `dc-bridge-config.json`, delete the `ces` block (or set `"ces": null`), add a `wcce` block, and change the other paths to Windows paths. If the file has a `"wcce": null` line, replace that line: a second `wcce` key fails startup with `duplicate field wcce`. In `.env`, add `WCCE_AGENT_PFX_PASSWORD` and delete the CES password lines.

**4. Stop the old bridge, then start the new one**

Two bridges must never run with the same ID and secret. Stop the old one, then run `service install` and `Start-Service dc-bridge` on the new host, and run the checks above.

## Back up and recover

The bridge is stateless. Back up `dc-bridge-config.json`, `.env` and the enrollment agent PFX (wherever `agent_pfx_path` points), and protect the bridge secret and PFX passwords like any credential. To recover, restore the files on a host of the same kind with the [network access](https://help.allthenticate.com/windows/network-access.md#domain-controller-bridge) the bridge needs, and start it. Allthenticate holds pending certificate requests, and the bridge picks them up on its next poll.

A WCCE bridge also depends on state in Active Directory and AD CS: its run-as account, that account's rights on the CA and template, and its membership in **Certificate Service DCOM Access** if you tightened that group.

* Run the recovered bridge as the **same gMSA** so it keeps its rights. First allow the new host to retrieve the gMSA's password and confirm `Test-ADServiceAccount` returns `True` there.
* Under NetworkService or LocalSystem, the CA sees the new host's computer account, `DOMAIN\NEWHOST$`, which has none of the rights. Grant them, run `Restart-Service certsvc` on the CA, and restart the new host before you start the bridge. Until then, requests fail, usually with the template-denied error on the policy.

## Poll intervals and retries

Outside implementation calls, keep `period` at `3600` and `poll_period` at `600` or less (`300` is fine). Both are fixed intervals: the bridge retries at the same rate whether or not the last attempt worked. It sets no timeout of its own on connections to Allthenticate, the CA or the LDAP server, but an LDAP search that takes longer than 180 seconds fails and is retried at the next `poll_period`. Never leave the bridge unattended with the short test `period` or the placeholder's `5`.

Once running, the bridge doesn't exit on network or directory errors; it logs them and retries. For exit codes, see [Troubleshooting](https://help.allthenticate.com/windows/active-directory/troubleshooting.md#bridge-exit-codes).

## Change the sync scope

Changing `base_dn` or `group_dns` deletes every synced user outside the new scope on the next poll. Do it in a maintenance window and check **Active Directory Information** right after. See [Change the scope safely](https://help.allthenticate.com/windows/active-directory/prepare-active-directory.md#change-the-scope-safely).

## Decommission the bridge

**1. Delete the policies**

On **DC Bridging** > **Certificate Generation Policies**, delete each policy that uses the bridge. This deletes their certificate records, and you confirm on your phone.

**2. Delete the bridge**

On the **Bridges** tab, delete the bridge. It can't be deleted while a policy references it.

**3. Remove it from the host**

Run `.\dc-bridge.exe service uninstall`, or remove the container. Then delete `.env`, the certificate files and the enrollment agent PFX.

**4. Remove its rights**

For WCCE, remove **Request Certificates** on the CA and **Read** and **Enroll** on the template from the run-as account (or `DOMAIN\HOST$`), remove it from **Certificate Service DCOM Access** if you added it, and from the enrollment agent restriction. Disable the account if it existed only for the bridge.

**5. Revoke its certificates**

In the CA's **Issued Certificates**, revoke the enrollment agent certificate (**All Tasks** > **Revoke Certificate**) and any CES client certificate, and delete every copy of their PFX files. Disable the LDAP bind account and CES authentication account if they existed only for the bridge.

Synced users stay in your organization; remove them from **Users** if they shouldn't keep Allthenticate access. Certificates already on phones stay valid until they expire. If access must end sooner, disable the accounts in Active Directory and revoke the certificates on your CA.


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