Edge Agent mTLS
Add mutual TLS authentication between the Arcane Manager and its edge agents.
Edge mTLS (mutual TLS) makes each Edge agent prove its identity with a client certificate, on top of its token. Use it when agents reach the Manager over networks you don’t control, so a leaked token alone can’t connect. Arcane can create the certificate authority (CA) and agent certificates, and renews agent certificates automatically.
What it does
Section titled “What it does”- The agent token is used once, to enroll and get a client certificate.
- If Arcane terminates TLS, the certificate authenticates every later request. Its environment must match the agent token’s.
- If a reverse proxy terminates TLS, the proxy checks the certificate before forwarding edge tunnel traffic. Arcane uses the token to find the environment.
- Whichever layer terminates TLS rejects a missing, invalid, or wrong-environment certificate.
Quick start
Section titled “Quick start”-
Serve the Manager over HTTPS. Any valid certificate works, including self-signed or Let’s Encrypt.
-
On the Manager, set:
Terminal window ARCANE_EDGE_MTLS_MODE=requiredTerminal window ARCANE_EDGE_MTLS_ASSETS_DIR=/app/data/edge-mtls -
On the agent, set:
Terminal window ARCANE_EDGE_AGENT=trueTerminal window ARCANE_MANAGER_API_URL=https://manager.example.comTerminal window ARCANE_AGENT_TOKEN=arc_xxxxxxxxxxxxxxxxTerminal window ARCANE_EDGE_MTLS_MODE=requiredTerminal window ARCANE_EDGE_MTLS_ASSETS_DIR=/app/data/edge-mtls-agentTerminal window ARCANE_EDGE_MTLS_CA_FILE=/etc/ssl/manager-ca.crt -
Mount the agent’s
ARCANE_EDGE_MTLS_ASSETS_DIRon a persistent volume. Otherwise the agent enrolls again on every restart.
ARCANE_MANAGER_API_URL must use https://. On the agent, ARCANE_EDGE_MTLS_CA_FILE is the certificate it trusts for the Manager’s HTTPS: point it at a self-signed Manager certificate, or leave it unset to use the system trust store (e.g. Let’s Encrypt). If a trusted reverse proxy terminates HTTPS and sends Arcane plain HTTP, the proxy must require client certificates on the edge tunnel routes. On the Manager, ARCANE_EDGE_MTLS_ASSETS_DIR holds the CA and issued certificates. Without ARCANE_EDGE_MTLS_CA_FILE on the Manager, Arcane creates the edge CA there as ca.crt and ca.key, encrypting the key with your ARCANE_ENCRYPTION_KEY.
How enrollment works
Section titled “How enrollment works”- The agent calls
POST /api/tunnel/mtls/enrollover HTTPS, presenting only itsARCANE_AGENT_TOKEN. - The Manager issues a client certificate valid for about a year and returns it with the edge CA.
- The agent saves them in
ARCANE_EDGE_MTLS_ASSETS_DIRasagent.crt,agent.key, andca.crt, and reconnects using them. Later starts reuse the saved files, and the agent enrolls again if the certificate has expired or is close to expiry.
Key types
Section titled “Key types”Edge CAs that Arcane creates use ML-DSA-87, a post-quantum signature algorithm. An existing ECDSA P-384 CA keeps working and keeps issuing P-384 client certificates; enrolled agents don’t re-enroll. ML-DSA client certificates need TLS 1.3 on every hop, so a TLS 1.2-only proxy breaks them.
ARCANE_EDGE_MTLS_MODE |
Behaviour |
|---|---|
disabled |
No mTLS; agents authenticate with their token only. This is the default. |
optional |
The Manager accepts both mTLS and token-only connections. |
required |
When Arcane terminates TLS, it requires a valid client certificate. When a proxy terminates TLS, the proxy must require client certificates before forwarding edge tunnel traffic. |
Use your own certificates
Section titled “Use your own certificates”Set the paths explicitly to use your own CA instead of generated certificates. Manager:
ARCANE_EDGE_MTLS_MODE=requiredARCANE_EDGE_MTLS_CA_FILE=/etc/arcane/edge-ca.crtArcane still signs new agent certificates with its own internal key unless you issue them yourself. Agent:
ARCANE_EDGE_MTLS_MODE=requiredARCANE_EDGE_MTLS_CERT_FILE=/etc/arcane/agent.crtARCANE_EDGE_MTLS_KEY_FILE=/etc/arcane/agent.keyARCANE_EDGE_MTLS_CA_FILE=/etc/arcane/manager-ca.crtWhen both ARCANE_EDGE_MTLS_CERT_FILE and ARCANE_EDGE_MTLS_KEY_FILE are set, the agent skips enrollment.
Download certificates from the UI
Section titled “Download certificates from the UI”After creating an Edge environment, download its certificate files from the New environment sheet or its detail page:
| File | Access |
|---|---|
ca.crt |
Public. Shown in the deployment snippet and downloadable by any signed-in user. |
agent.crt |
Public. Same as ca.crt. |
agent.key |
Private. Never shown inline; download it with the admin-only Download certificate link, so the key stays out of browser history and logs. |
The .zip of all three is also admin-only. Each download logs an environment.mtls.download audit event with the admin’s username, file name, and whether the file is sensitive.
Rotate and revoke certificates
Section titled “Rotate and revoke certificates”Agent certificates last about a year and renew automatically before expiry. To renew now, delete agent.crt and agent.key on the agent and restart it. Arcane has no revocation list: to cut off an agent, delete or regenerate its environment’s API key in the UI.
Troubleshooting
Section titled “Troubleshooting”| Error or symptom | Fix |
|---|---|
ARCANE_EDGE_MTLS_MODE requires ARCANE_MANAGER_API_URL to use https |
The agent won’t enroll or connect over plain HTTP. Serve the Manager over HTTPS and use an https:// URL. |
x509: certificate signed by unknown authority |
The agent doesn’t trust the Manager’s certificate. For a self-signed certificate, set ARCANE_EDGE_MTLS_CA_FILE on the agent to that certificate. |
| Enrollment fails | Check that ARCANE_EDGE_MTLS_CERT_FILE and ARCANE_EDGE_MTLS_KEY_FILE are unset on the agent, the agent token is valid, and mTLS is on for the Manager. |
| Agent enrolls again after every restart | ARCANE_EDGE_MTLS_ASSETS_DIR on the agent isn’t on a persistent volume. |
Manager logs tunnel request failed: unsupported edge command ... |
That UI action has no handler on the edge tunnel. File a bug with the HTTP method and path from the error. |