Skip to content

Commit 13de252

Browse files
Ignacio Van Droogenbroeckclaude
andcommitted
docs: add ARC_AUTH_BOOTSTRAP_TOKEN and ARC_AUTH_FORCE_BOOTSTRAP (v26.04.1)
- Add bootstrap_token and force_bootstrap to Arc and Arc Enterprise auth config reference and docker env var tables - Add Bootstrap & Recovery section to authentication guide with usage examples and "Available since v26.04.1" admonition Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 128339d commit 13de252

4 files changed

Lines changed: 59 additions & 0 deletions

File tree

docs-arc-enterprise/configuration/overview.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,16 @@ enabled = true # Enable/disable auth
392392
db_path = "./data/arc_auth.db" # Token database
393393
cache_ttl = 30 # Token cache TTL (seconds)
394394
max_cache_size = 1000 # Max cached tokens
395+
bootstrap_token = "" # Pre-set admin token value (v26.04.1+)
396+
force_bootstrap = false # Add a recovery token without removing existing ones (v26.04.1+)
395397
```
396398

399+
:::info Available since v26.04.1
400+
**`bootstrap_token`** — Set a known admin token at deploy time via `ARC_AUTH_BOOTSTRAP_TOKEN` instead of catching a randomly generated one from startup logs. On first run, Arc uses this value as the initial admin token. On subsequent restarts, it is a no-op.
401+
402+
**`force_bootstrap`** — Recovery path when the admin token is lost. Set `ARC_AUTH_FORCE_BOOTSTRAP=true` alongside `ARC_AUTH_BOOTSTRAP_TOKEN` to add a new `arc-recovery` admin token **without removing existing tokens**. Remove this flag after recovery. See the [Authentication configuration guide](/docs/configuration/authentication#bootstrap--recovery) for full details.
403+
:::
404+
397405
### Delete Operations
398406

399407
Safe deletion with confirmation:

docs-arc-enterprise/installation/docker.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ Common configuration options:
151151
| `ARC_STORAGE_BACKEND` | `local` | Storage: `local`, `s3`, `minio`, `azure` |
152152
| `ARC_LOG_LEVEL` | `info` | Logging: `debug`, `info`, `warn`, `error` |
153153
| `ARC_AUTH_ENABLED` | `true` | Enable authentication |
154+
| `ARC_AUTH_BOOTSTRAP_TOKEN` | _(unset)_ | Pre-set admin token value on first run (v26.04.1+) |
155+
| `ARC_AUTH_FORCE_BOOTSTRAP` | `false` | Add a recovery admin token without removing existing ones (v26.04.1+) |
154156
| `ARC_COMPACTION_ENABLED` | `true` | Enable auto-compaction |
155157
| `ARC_WAL_ENABLED` | `false` | Enable WAL for durability |
156158

docs/configuration/authentication.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ enabled = true # Enable/disable authentication
1818
db_path = "./data/arc_auth.db" # SQLite database for token storage
1919
cache_ttl = 30 # Token cache TTL in seconds
2020
max_cache_size = 1000 # Maximum cached tokens
21+
bootstrap_token = "" # Pre-set admin token value (v26.04.1+)
22+
force_bootstrap = false # Add a recovery token without removing existing ones (v26.04.1+)
2123
```
2224

2325
**Environment variables:**
@@ -26,6 +28,8 @@ export ARC_AUTH_ENABLED=true
2628
export ARC_AUTH_DB_PATH="./data/arc_auth.db"
2729
export ARC_AUTH_CACHE_TTL=30
2830
export ARC_AUTH_MAX_CACHE_SIZE=1000
31+
export ARC_AUTH_BOOTSTRAP_TOKEN="" # v26.04.1+
32+
export ARC_AUTH_FORCE_BOOTSTRAP=false # v26.04.1+
2933
```
3034

3135
## Authentication Methods
@@ -58,6 +62,49 @@ For InfluxDB 1.x client compatibility:
5862
curl "http://localhost:8000/write?db=mydb&p=$ARC_TOKEN" -d 'cpu,host=server01 usage=45.2'
5963
```
6064

65+
## Bootstrap & Recovery
66+
67+
:::info Available since v26.04.1
68+
`ARC_AUTH_BOOTSTRAP_TOKEN` and `ARC_AUTH_FORCE_BOOTSTRAP` are available in Arc and Arc Enterprise v26.04.1 and later.
69+
:::
70+
71+
### Pre-configured Bootstrap Token
72+
73+
By default, Arc generates a random admin token on first start and prints it once to stderr. If you miss it, recovery requires deleting the auth database and redeploying.
74+
75+
`ARC_AUTH_BOOTSTRAP_TOKEN` lets you set a known token value at deploy time. On first run, Arc uses this value as the initial admin token instead of generating a random one. On subsequent restarts, it is a no-op — the existing token is preserved.
76+
77+
```bash
78+
export ARC_AUTH_BOOTSTRAP_TOKEN="your-secret-token-value-at-least-32-chars"
79+
```
80+
81+
This is especially useful for:
82+
- **Automated deployments** — bake the token into your secrets manager (Vault, AWS Secrets Manager, Kubernetes Secrets) and have it ready without catching a log line
83+
- **Reproducible environments** — staging and production can use different known tokens set consistently at deploy time
84+
85+
:::caution Minimum length
86+
Token values must be at least 32 characters. Values are stored as bcrypt hashes — the plaintext never persists to disk.
87+
:::
88+
89+
### Recovery When the Admin Token is Lost
90+
91+
If you no longer have access to any admin token, set both `ARC_AUTH_BOOTSTRAP_TOKEN` and `ARC_AUTH_FORCE_BOOTSTRAP=true` before restarting Arc. Arc will add a new admin token named `arc-recovery` **without removing any existing tokens**.
92+
93+
```bash
94+
export ARC_AUTH_BOOTSTRAP_TOKEN="your-new-recovery-token-at-least-32-chars"
95+
export ARC_AUTH_FORCE_BOOTSTRAP=true
96+
```
97+
98+
Existing tokens are preserved so that if the recovery token was injected by a bad actor, any legitimate admin still has their token and can revoke it immediately via the API.
99+
100+
After recovering access:
101+
1. Use the API to review and revoke any tokens you no longer need
102+
2. Remove `ARC_AUTH_FORCE_BOOTSTRAP` from your deployment configuration
103+
104+
:::tip Idempotent on restart
105+
If Arc restarts with `ARC_AUTH_FORCE_BOOTSTRAP=true` and the `arc-recovery` token already exists, it is a no-op. You still hold the token value you provided.
106+
:::
107+
61108
## Token Management
62109

63110
All token management endpoints require **admin** authentication.

docs/installation/docker.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ Common configuration options:
152152
| `ARC_STORAGE_BACKEND` | `local` | Storage: `local`, `s3`, `minio`, `azure` |
153153
| `ARC_LOG_LEVEL` | `info` | Logging: `debug`, `info`, `warn`, `error` |
154154
| `ARC_AUTH_ENABLED` | `true` | Enable authentication |
155+
| `ARC_AUTH_BOOTSTRAP_TOKEN` | _(unset)_ | Pre-set admin token value on first run (v26.04.1+) |
156+
| `ARC_AUTH_FORCE_BOOTSTRAP` | `false` | Add a recovery admin token without removing existing ones (v26.04.1+) |
155157
| `ARC_COMPACTION_ENABLED` | `true` | Enable auto-compaction |
156158
| `ARC_WAL_ENABLED` | `false` | Enable WAL for durability |
157159

0 commit comments

Comments
 (0)