@lifeaitools/clauth 1.31.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.clauth-skill/SKILL.md +31 -0
- package/.clauth-skill/references/keys-guide.md +270 -270
- package/.clauth-skill/references/operator-guide.md +27 -0
- package/README.md +48 -0
- package/cli/api.js +238 -238
- package/cli/commands/install.js +396 -396
- package/cli/commands/ops-install.js +211 -0
- package/cli/commands/ops.js +69 -0
- package/cli/commands/serve.js +1381 -1644
- package/cli/commands/uninstall.js +164 -164
- package/cli/commands/watchdog.js +1 -1
- package/cli/index.js +165 -1
- package/cli/ops/coolify-adapter.js +80 -0
- package/cli/ops/deployment-adapter.js +63 -0
- package/cli/ops/job-store.js +116 -0
- package/cli/ops/operation-policy.js +51 -0
- package/cli/ops/pm2-adapter.js +128 -0
- package/cli/ops/serialized-executor.js +9 -0
- package/cli/supervisor-registry.js +403 -6
- package/cli/supervisor-registry.test.js +496 -4
- package/cli/supervisor-ui.test.js +436 -0
- package/cli/watchdog-registry.js +30 -2
- package/cli/watchdog-registry.test.js +28 -5
- package/install.ps1 +102 -102
- package/install.sh +49 -49
- package/package.json +4 -3
- package/scripts/bin/bootstrap-linux +0 -0
- package/scripts/bin/bootstrap-macos +0 -0
- package/scripts/bin/bootstrap-win.exe +0 -0
- package/scripts/bootstrap.cjs +121 -121
- package/supabase/functions/auth-vault/index.ts +350 -350
- package/supabase/migrations/001_clauth_schema.sql +94 -94
- package/supabase/migrations/002_vault_helpers.sql +90 -90
- package/supabase/migrations/20260317_lockout.sql +26 -26
package/.clauth-skill/SKILL.md
CHANGED
|
@@ -216,6 +216,37 @@ raw secrets and no Vault secret names. Fetch `GET /v/<service>` only for the one
|
|
|
216
216
|
exact credential needed by the next command. Never walk every service and never
|
|
217
217
|
bulk-fetch all secrets.
|
|
218
218
|
|
|
219
|
+
## Managed PM2 Operations Control Plane
|
|
220
|
+
|
|
221
|
+
For LIFEAI development hosts, manage an approved PM2 application through the
|
|
222
|
+
bearer-authenticated clauth operations control plane. Do **not** invoke PM2
|
|
223
|
+
directly from an agent, dashboard, or deployment script. The policy file is the
|
|
224
|
+
allowlist: it names permitted applications, operations, deployment definitions,
|
|
225
|
+
and whether host-wide actions are available.
|
|
226
|
+
|
|
227
|
+
Install or validate the local controller with its explicit policy file:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
# Linux
|
|
231
|
+
clauth ops install --config /etc/clauth/ops-control-plane.json --dry-run
|
|
232
|
+
clauth ops install --config /etc/clauth/ops-control-plane.json
|
|
233
|
+
|
|
234
|
+
# Windows PowerShell
|
|
235
|
+
clauth ops install --config C:\ProgramData\clauth\ops-control-plane.json --dry-run
|
|
236
|
+
clauth ops install --config C:\ProgramData\clauth\ops-control-plane.json
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
The live install replaces only the installer-owned `clauth-deployment` PM2
|
|
240
|
+
process, verifies its loopback `/health` response, and checks that an unauthenticated
|
|
241
|
+
catalog request is rejected. It retrieves its bearer only from the local clauth
|
|
242
|
+
service; never paste, print, or place that bearer in a policy file.
|
|
243
|
+
|
|
244
|
+
Use `clauth ops catalog` or the corresponding scoped MCP operations tools for
|
|
245
|
+
approved process inspection and lifecycle actions. Before a production promotion,
|
|
246
|
+
retain the job receipt and verify the selected application's health route. A
|
|
247
|
+
passing install proves controller setup; it does not by itself prove an arbitrary
|
|
248
|
+
application deployment.
|
|
249
|
+
|
|
219
250
|
## MCP Server (v1.16.9+)
|
|
220
251
|
|
|
221
252
|
clauth runs as an MCP server with five namespaced paths and safe
|
|
@@ -1,270 +1,270 @@
|
|
|
1
|
-
# clauth Keys Guide
|
|
2
|
-
|
|
3
|
-
Plain-English explanations of every credential clauth manages. Read this before setup.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## The Most Important Key for Install: Supabase Personal Access Token (PAT)
|
|
8
|
-
|
|
9
|
-
This is the first thing the installer asks for and the most commonly confused item.
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
sbp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
This is your **account-level** token — not tied to any one project. It gives the installer permission to create tables, deploy the edge function, and store secrets in your project.
|
|
16
|
-
|
|
17
|
-
**Where to get it:**
|
|
18
|
-
> https://supabase.com/dashboard/account/tokens → "Generate new token"
|
|
19
|
-
> Name it anything, e.g. "clauth-install"
|
|
20
|
-
|
|
21
|
-
**This is NOT:**
|
|
22
|
-
- Your anon key (that starts with `eyJ...`)
|
|
23
|
-
- Your service_role key (also starts with `eyJ...`)
|
|
24
|
-
- Your project URL
|
|
25
|
-
|
|
26
|
-
The PAT is only needed once during install. After that, clauth uses the anon key + HMAC for everything.
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## The Most Confusing Part: Supabase Has 4 Different Keys
|
|
31
|
-
|
|
32
|
-
This is where most people get stuck. Supabase gives you multiple keys and they look similar. Here's what each one is:
|
|
33
|
-
|
|
34
|
-
### 1. `NEXT_PUBLIC_SUPABASE_URL` — The Project URL
|
|
35
|
-
```
|
|
36
|
-
https://uvojezuorjgqzmhhgluu.supabase.co
|
|
37
|
-
```
|
|
38
|
-
This is just a URL. Not a secret. It's the address of your Supabase project. You can find it in:
|
|
39
|
-
> Supabase Dashboard → Project Settings → API → Project URL
|
|
40
|
-
|
|
41
|
-
**clauth uses this as:** `Supabase project URL` during `clauth setup`
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
### 2. Anon Key (Public JWT) — `supabase-anon` in clauth
|
|
46
|
-
```
|
|
47
|
-
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... (very long)
|
|
48
|
-
```
|
|
49
|
-
This is a **public key** — it's safe to put in frontend code. It only has the permissions that your Row Level Security (RLS) policies allow. Think of it as a "guest pass" to your database.
|
|
50
|
-
|
|
51
|
-
**Where to find it:**
|
|
52
|
-
> Supabase Dashboard → Project Settings → API → Project API Keys → `anon` `public`
|
|
53
|
-
|
|
54
|
-
**clauth uses this for:** Calling the Edge Function (every request). Used during `clauth setup` as `Supabase anon key`.
|
|
55
|
-
|
|
56
|
-
**Also called:** `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_DEFAULT_KEY` or `sb_publishable_...` in newer Supabase projects. Same thing, different name format.
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
### 3. Service Role Key — `supabase-service` in clauth
|
|
61
|
-
```
|
|
62
|
-
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...role":"service_role"... (very long)
|
|
63
|
-
```
|
|
64
|
-
This is an **admin key** — it bypasses all RLS policies and can read/write anything. Treat this like a root password. Never put it in frontend code.
|
|
65
|
-
|
|
66
|
-
**Where to find it:**
|
|
67
|
-
> Supabase Dashboard → Project Settings → API → Project API Keys → `service_role` `secret`
|
|
68
|
-
|
|
69
|
-
**clauth stores this as:** `supabase-service`
|
|
70
|
-
|
|
71
|
-
**Also called:** `sb_secret_...` in newer Supabase projects. Same thing.
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
### 4. Database Connection String — `supabase-db` in clauth
|
|
76
|
-
```
|
|
77
|
-
postgres://postgres.uvojezuorjgqzmhhgluu:[YOUR-PASSWORD]@aws-0-us-west-1.pooler.supabase.com:6543/postgres
|
|
78
|
-
```
|
|
79
|
-
This is for direct SQL access — tools like Drizzle, Prisma, or raw psql use this. Two versions exist:
|
|
80
|
-
- **Pooled** (port 6543) — for apps with many connections (use this)
|
|
81
|
-
- **Direct** (port 5432) — for migrations only
|
|
82
|
-
|
|
83
|
-
**Where to find it:**
|
|
84
|
-
> Supabase Dashboard → Project Settings → Database → Connection string → URI
|
|
85
|
-
|
|
86
|
-
**Note:** Replace `[YOUR-PASSWORD]` with the password you set when creating the project.
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## GitHub
|
|
91
|
-
|
|
92
|
-
### Personal Access Token (PAT) — `github` in clauth
|
|
93
|
-
```
|
|
94
|
-
ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
95
|
-
```
|
|
96
|
-
This is what lets programs act as you on GitHub — push code, manage repos, etc.
|
|
97
|
-
|
|
98
|
-
**Where to create one:**
|
|
99
|
-
> GitHub.com → Settings (your profile, top right) → Developer settings → Personal access tokens → Tokens (classic) → Generate new token
|
|
100
|
-
|
|
101
|
-
**Scopes you need for LIFEAI work:**
|
|
102
|
-
- `repo` — full repo access
|
|
103
|
-
- `workflow` — GitHub Actions
|
|
104
|
-
- `read:org` — read org membership
|
|
105
|
-
- `admin:org` — if you need to manage the org
|
|
106
|
-
|
|
107
|
-
**clauth stores this as:** `github`
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
## Vercel
|
|
112
|
-
|
|
113
|
-
### API Token + Team ID — `vercel` in clauth (keypair)
|
|
114
|
-
Two values stored together as JSON: `{"token":"...","team_id":"..."}`
|
|
115
|
-
|
|
116
|
-
**API Token:**
|
|
117
|
-
> Vercel Dashboard → Account Settings → Tokens → Create Token
|
|
118
|
-
> Name it something like "LIFEAI-clauth"
|
|
119
|
-
|
|
120
|
-
**Team ID:**
|
|
121
|
-
> Vercel Dashboard → Team Settings → General → Team ID
|
|
122
|
-
> Looks like: `team_xxxxxxxxxxxxxxxxxxxxxxxx`
|
|
123
|
-
|
|
124
|
-
**clauth stores this as:** `vercel` (keypair type)
|
|
125
|
-
```bash
|
|
126
|
-
clauth write key vercel '{"token":"vcp_xxx...","team_id":"team_xxx..."}'
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## Cloudflare R2
|
|
132
|
-
|
|
133
|
-
R2 has **two separate credentials** because it uses the S3 protocol for file operations but a separate admin API for bucket management.
|
|
134
|
-
|
|
135
|
-
### R2 Object Access Keys — `r2` in clauth (keypair)
|
|
136
|
-
Used for: uploading, downloading, deleting files in your bucket (S3-compatible)
|
|
137
|
-
```
|
|
138
|
-
Access Key ID: f3ff8996f212b638254cf5747abce445
|
|
139
|
-
Secret Access Key: 45a078775b1b62a7200024c30660e72d2997ab65bb4a6e72629fda8a87e222a9
|
|
140
|
-
```
|
|
141
|
-
**Where to find:**
|
|
142
|
-
> Cloudflare Dashboard → R2 → Manage R2 API Tokens → Create API Token → Object Read & Write
|
|
143
|
-
|
|
144
|
-
**clauth stores this as:** `r2`
|
|
145
|
-
```bash
|
|
146
|
-
clauth write key r2 '{"access_key_id":"f3ff...","secret_access_key":"45a0..."}'
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### R2 Bucket Config — `r2-bucket` in clauth (connstring)
|
|
150
|
-
Used for: knowing which bucket to use and where it lives
|
|
151
|
-
```
|
|
152
|
-
bucket_name: regen-media
|
|
153
|
-
endpoint: https://c879cf4758546d79164c2718c477be72.r2.cloudflarestorage.com
|
|
154
|
-
public_cdn: https://pub-ff9788cd4f1f494db0491a197025a94c.r2.dev
|
|
155
|
-
```
|
|
156
|
-
**clauth stores this as:** `r2-bucket`
|
|
157
|
-
```bash
|
|
158
|
-
clauth write key r2-bucket '{"bucket":"regen-media","endpoint":"https://c879...r2.cloudflarestorage.com","cdn":"https://pub-ff97...r2.dev"}'
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### Cloudflare Admin API Token — `cloudflare` in clauth (token)
|
|
162
|
-
Used for: DNS records, zone management, creating/deleting buckets
|
|
163
|
-
```
|
|
164
|
-
1e_f4y2t58ra7UpKAAj5TzCcBUYTdEC3H2LJ9Vtc
|
|
165
|
-
```
|
|
166
|
-
**Where to find:**
|
|
167
|
-
> Cloudflare Dashboard → R2 → Manage R2 API Tokens → (the Admin token, not the RW token)
|
|
168
|
-
|
|
169
|
-
**clauth stores this as:** `cloudflare`
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## Namecheap
|
|
174
|
-
|
|
175
|
-
### API Key + Username — `namecheap` in clauth (keypair)
|
|
176
|
-
Two values stored together:
|
|
177
|
-
```
|
|
178
|
-
username: ejlamyot
|
|
179
|
-
api_key: CJWM4dr&RMS$v.s (yours will look similar)
|
|
180
|
-
```
|
|
181
|
-
**Where to find:**
|
|
182
|
-
> Namecheap Dashboard → Profile (top right) → Tools → API Access → Enable API
|
|
183
|
-
|
|
184
|
-
**Important:** Namecheap API also requires your **IP address to be whitelisted**. Add your current IP in the same API Access page, or Namecheap will reject every call.
|
|
185
|
-
|
|
186
|
-
**clauth stores this as:** `namecheap`
|
|
187
|
-
```bash
|
|
188
|
-
clauth write key namecheap '{"username":"ejlamyot","api_key":"CJWM4dr..."}'
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
|
|
193
|
-
## Neo4j Aura
|
|
194
|
-
|
|
195
|
-
### Connection URI + Credentials — `neo4j` in clauth (connstring)
|
|
196
|
-
```
|
|
197
|
-
neo4j+s://xxxxxxxx.databases.neo4j.io
|
|
198
|
-
username: neo4j
|
|
199
|
-
password: (set when you created the instance)
|
|
200
|
-
```
|
|
201
|
-
**Where to find:**
|
|
202
|
-
> Neo4j Aura Console → Your database → Connect → Connection URI
|
|
203
|
-
|
|
204
|
-
**clauth stores this as:** `neo4j`
|
|
205
|
-
```bash
|
|
206
|
-
clauth write key neo4j 'neo4j+s://neo4j:yourpassword@xxxxxxxx.databases.neo4j.io'
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
---
|
|
210
|
-
|
|
211
|
-
## Anthropic
|
|
212
|
-
|
|
213
|
-
### API Key — `anthropic` in clauth (token)
|
|
214
|
-
```
|
|
215
|
-
sk-ant-api03-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
216
|
-
```
|
|
217
|
-
**Where to find:**
|
|
218
|
-
> console.anthropic.com → API Keys → Create Key
|
|
219
|
-
|
|
220
|
-
**clauth stores this as:** `anthropic`
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
224
|
-
## RocketReach
|
|
225
|
-
|
|
226
|
-
### API Key — `rocketreach` in clauth (token)
|
|
227
|
-
```
|
|
228
|
-
12b893dk776927c079ea18cb1a7bc8d95b43398a
|
|
229
|
-
```
|
|
230
|
-
**Where to find:**
|
|
231
|
-
> rocketreach.co → Account Settings → API
|
|
232
|
-
|
|
233
|
-
**clauth stores this as:** `rocketreach`
|
|
234
|
-
|
|
235
|
-
---
|
|
236
|
-
|
|
237
|
-
## The Bootstrap Token (Special — One Time Only)
|
|
238
|
-
|
|
239
|
-
```
|
|
240
|
-
ba6f25ec30e9316ead93152f0cfa5617
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
This is **not a service API key**. It's a one-time password that lets `clauth setup` register your machine with the vault for the first time.
|
|
244
|
-
|
|
245
|
-
- It's stored in your Supabase Vault (not hardcoded anywhere)
|
|
246
|
-
- After your machine is registered, you never need it again for daily use
|
|
247
|
-
- If you need to register a **new machine**, you need it again
|
|
248
|
-
- The vault operator (Dave) can retrieve it from: Supabase Dashboard → Vault → `CLAUTH_ADMIN_BOOTSTRAP_TOKEN`
|
|
249
|
-
|
|
250
|
-
---
|
|
251
|
-
|
|
252
|
-
## Summary Table
|
|
253
|
-
|
|
254
|
-
| clauth token | What it is | Where to get it | Type |
|
|
255
|
-
|---|---|---|---|
|
|
256
|
-
| *(setup prompt)* | Supabase project URL | Supabase → Settings → API | URL |
|
|
257
|
-
| *(setup prompt)* | Supabase anon key | Supabase → Settings → API → anon public | JWT |
|
|
258
|
-
| *(setup prompt)* | Bootstrap token | Ask vault operator / Supabase Vault | One-time |
|
|
259
|
-
| `github` | GitHub Personal Access Token | github.com → Settings → Developer → PATs | token |
|
|
260
|
-
| `supabase-anon` | Supabase anon key (stored for apps) | Same as above | token |
|
|
261
|
-
| `supabase-service` | Supabase service role key | Supabase → Settings → API → service_role | token |
|
|
262
|
-
| `supabase-db` | Postgres connection string | Supabase → Settings → Database → URI | connstring |
|
|
263
|
-
| `vercel` | Vercel API token + Team ID | Vercel → Account Settings → Tokens | keypair |
|
|
264
|
-
| `namecheap` | Namecheap API key + username | Namecheap → Profile → Tools → API | keypair |
|
|
265
|
-
| `neo4j` | Neo4j Aura URI + password | Aura Console → Connect | connstring |
|
|
266
|
-
| `anthropic` | Anthropic API key | console.anthropic.com → API Keys | token |
|
|
267
|
-
| `r2` | Cloudflare R2 S3 keypair | Cloudflare → R2 → Manage API Tokens | keypair |
|
|
268
|
-
| `r2-bucket` | R2 bucket name + endpoint | Cloudflare → R2 → bucket details | connstring |
|
|
269
|
-
| `cloudflare` | Cloudflare admin API token | Cloudflare → R2 → Manage API Tokens | token |
|
|
270
|
-
| `rocketreach` | RocketReach API key | rocketreach.co → Account → API | token |
|
|
1
|
+
# clauth Keys Guide
|
|
2
|
+
|
|
3
|
+
Plain-English explanations of every credential clauth manages. Read this before setup.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## The Most Important Key for Install: Supabase Personal Access Token (PAT)
|
|
8
|
+
|
|
9
|
+
This is the first thing the installer asks for and the most commonly confused item.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
sbp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This is your **account-level** token — not tied to any one project. It gives the installer permission to create tables, deploy the edge function, and store secrets in your project.
|
|
16
|
+
|
|
17
|
+
**Where to get it:**
|
|
18
|
+
> https://supabase.com/dashboard/account/tokens → "Generate new token"
|
|
19
|
+
> Name it anything, e.g. "clauth-install"
|
|
20
|
+
|
|
21
|
+
**This is NOT:**
|
|
22
|
+
- Your anon key (that starts with `eyJ...`)
|
|
23
|
+
- Your service_role key (also starts with `eyJ...`)
|
|
24
|
+
- Your project URL
|
|
25
|
+
|
|
26
|
+
The PAT is only needed once during install. After that, clauth uses the anon key + HMAC for everything.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## The Most Confusing Part: Supabase Has 4 Different Keys
|
|
31
|
+
|
|
32
|
+
This is where most people get stuck. Supabase gives you multiple keys and they look similar. Here's what each one is:
|
|
33
|
+
|
|
34
|
+
### 1. `NEXT_PUBLIC_SUPABASE_URL` — The Project URL
|
|
35
|
+
```
|
|
36
|
+
https://uvojezuorjgqzmhhgluu.supabase.co
|
|
37
|
+
```
|
|
38
|
+
This is just a URL. Not a secret. It's the address of your Supabase project. You can find it in:
|
|
39
|
+
> Supabase Dashboard → Project Settings → API → Project URL
|
|
40
|
+
|
|
41
|
+
**clauth uses this as:** `Supabase project URL` during `clauth setup`
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
### 2. Anon Key (Public JWT) — `supabase-anon` in clauth
|
|
46
|
+
```
|
|
47
|
+
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ... (very long)
|
|
48
|
+
```
|
|
49
|
+
This is a **public key** — it's safe to put in frontend code. It only has the permissions that your Row Level Security (RLS) policies allow. Think of it as a "guest pass" to your database.
|
|
50
|
+
|
|
51
|
+
**Where to find it:**
|
|
52
|
+
> Supabase Dashboard → Project Settings → API → Project API Keys → `anon` `public`
|
|
53
|
+
|
|
54
|
+
**clauth uses this for:** Calling the Edge Function (every request). Used during `clauth setup` as `Supabase anon key`.
|
|
55
|
+
|
|
56
|
+
**Also called:** `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_DEFAULT_KEY` or `sb_publishable_...` in newer Supabase projects. Same thing, different name format.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
### 3. Service Role Key — `supabase-service` in clauth
|
|
61
|
+
```
|
|
62
|
+
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...role":"service_role"... (very long)
|
|
63
|
+
```
|
|
64
|
+
This is an **admin key** — it bypasses all RLS policies and can read/write anything. Treat this like a root password. Never put it in frontend code.
|
|
65
|
+
|
|
66
|
+
**Where to find it:**
|
|
67
|
+
> Supabase Dashboard → Project Settings → API → Project API Keys → `service_role` `secret`
|
|
68
|
+
|
|
69
|
+
**clauth stores this as:** `supabase-service`
|
|
70
|
+
|
|
71
|
+
**Also called:** `sb_secret_...` in newer Supabase projects. Same thing.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### 4. Database Connection String — `supabase-db` in clauth
|
|
76
|
+
```
|
|
77
|
+
postgres://postgres.uvojezuorjgqzmhhgluu:[YOUR-PASSWORD]@aws-0-us-west-1.pooler.supabase.com:6543/postgres
|
|
78
|
+
```
|
|
79
|
+
This is for direct SQL access — tools like Drizzle, Prisma, or raw psql use this. Two versions exist:
|
|
80
|
+
- **Pooled** (port 6543) — for apps with many connections (use this)
|
|
81
|
+
- **Direct** (port 5432) — for migrations only
|
|
82
|
+
|
|
83
|
+
**Where to find it:**
|
|
84
|
+
> Supabase Dashboard → Project Settings → Database → Connection string → URI
|
|
85
|
+
|
|
86
|
+
**Note:** Replace `[YOUR-PASSWORD]` with the password you set when creating the project.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## GitHub
|
|
91
|
+
|
|
92
|
+
### Personal Access Token (PAT) — `github` in clauth
|
|
93
|
+
```
|
|
94
|
+
ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
95
|
+
```
|
|
96
|
+
This is what lets programs act as you on GitHub — push code, manage repos, etc.
|
|
97
|
+
|
|
98
|
+
**Where to create one:**
|
|
99
|
+
> GitHub.com → Settings (your profile, top right) → Developer settings → Personal access tokens → Tokens (classic) → Generate new token
|
|
100
|
+
|
|
101
|
+
**Scopes you need for LIFEAI work:**
|
|
102
|
+
- `repo` — full repo access
|
|
103
|
+
- `workflow` — GitHub Actions
|
|
104
|
+
- `read:org` — read org membership
|
|
105
|
+
- `admin:org` — if you need to manage the org
|
|
106
|
+
|
|
107
|
+
**clauth stores this as:** `github`
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Vercel
|
|
112
|
+
|
|
113
|
+
### API Token + Team ID — `vercel` in clauth (keypair)
|
|
114
|
+
Two values stored together as JSON: `{"token":"...","team_id":"..."}`
|
|
115
|
+
|
|
116
|
+
**API Token:**
|
|
117
|
+
> Vercel Dashboard → Account Settings → Tokens → Create Token
|
|
118
|
+
> Name it something like "LIFEAI-clauth"
|
|
119
|
+
|
|
120
|
+
**Team ID:**
|
|
121
|
+
> Vercel Dashboard → Team Settings → General → Team ID
|
|
122
|
+
> Looks like: `team_xxxxxxxxxxxxxxxxxxxxxxxx`
|
|
123
|
+
|
|
124
|
+
**clauth stores this as:** `vercel` (keypair type)
|
|
125
|
+
```bash
|
|
126
|
+
clauth write key vercel '{"token":"vcp_xxx...","team_id":"team_xxx..."}'
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Cloudflare R2
|
|
132
|
+
|
|
133
|
+
R2 has **two separate credentials** because it uses the S3 protocol for file operations but a separate admin API for bucket management.
|
|
134
|
+
|
|
135
|
+
### R2 Object Access Keys — `r2` in clauth (keypair)
|
|
136
|
+
Used for: uploading, downloading, deleting files in your bucket (S3-compatible)
|
|
137
|
+
```
|
|
138
|
+
Access Key ID: f3ff8996f212b638254cf5747abce445
|
|
139
|
+
Secret Access Key: 45a078775b1b62a7200024c30660e72d2997ab65bb4a6e72629fda8a87e222a9
|
|
140
|
+
```
|
|
141
|
+
**Where to find:**
|
|
142
|
+
> Cloudflare Dashboard → R2 → Manage R2 API Tokens → Create API Token → Object Read & Write
|
|
143
|
+
|
|
144
|
+
**clauth stores this as:** `r2`
|
|
145
|
+
```bash
|
|
146
|
+
clauth write key r2 '{"access_key_id":"f3ff...","secret_access_key":"45a0..."}'
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### R2 Bucket Config — `r2-bucket` in clauth (connstring)
|
|
150
|
+
Used for: knowing which bucket to use and where it lives
|
|
151
|
+
```
|
|
152
|
+
bucket_name: regen-media
|
|
153
|
+
endpoint: https://c879cf4758546d79164c2718c477be72.r2.cloudflarestorage.com
|
|
154
|
+
public_cdn: https://pub-ff9788cd4f1f494db0491a197025a94c.r2.dev
|
|
155
|
+
```
|
|
156
|
+
**clauth stores this as:** `r2-bucket`
|
|
157
|
+
```bash
|
|
158
|
+
clauth write key r2-bucket '{"bucket":"regen-media","endpoint":"https://c879...r2.cloudflarestorage.com","cdn":"https://pub-ff97...r2.dev"}'
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Cloudflare Admin API Token — `cloudflare` in clauth (token)
|
|
162
|
+
Used for: DNS records, zone management, creating/deleting buckets
|
|
163
|
+
```
|
|
164
|
+
1e_f4y2t58ra7UpKAAj5TzCcBUYTdEC3H2LJ9Vtc
|
|
165
|
+
```
|
|
166
|
+
**Where to find:**
|
|
167
|
+
> Cloudflare Dashboard → R2 → Manage R2 API Tokens → (the Admin token, not the RW token)
|
|
168
|
+
|
|
169
|
+
**clauth stores this as:** `cloudflare`
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Namecheap
|
|
174
|
+
|
|
175
|
+
### API Key + Username — `namecheap` in clauth (keypair)
|
|
176
|
+
Two values stored together:
|
|
177
|
+
```
|
|
178
|
+
username: ejlamyot
|
|
179
|
+
api_key: CJWM4dr&RMS$v.s (yours will look similar)
|
|
180
|
+
```
|
|
181
|
+
**Where to find:**
|
|
182
|
+
> Namecheap Dashboard → Profile (top right) → Tools → API Access → Enable API
|
|
183
|
+
|
|
184
|
+
**Important:** Namecheap API also requires your **IP address to be whitelisted**. Add your current IP in the same API Access page, or Namecheap will reject every call.
|
|
185
|
+
|
|
186
|
+
**clauth stores this as:** `namecheap`
|
|
187
|
+
```bash
|
|
188
|
+
clauth write key namecheap '{"username":"ejlamyot","api_key":"CJWM4dr..."}'
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Neo4j Aura
|
|
194
|
+
|
|
195
|
+
### Connection URI + Credentials — `neo4j` in clauth (connstring)
|
|
196
|
+
```
|
|
197
|
+
neo4j+s://xxxxxxxx.databases.neo4j.io
|
|
198
|
+
username: neo4j
|
|
199
|
+
password: (set when you created the instance)
|
|
200
|
+
```
|
|
201
|
+
**Where to find:**
|
|
202
|
+
> Neo4j Aura Console → Your database → Connect → Connection URI
|
|
203
|
+
|
|
204
|
+
**clauth stores this as:** `neo4j`
|
|
205
|
+
```bash
|
|
206
|
+
clauth write key neo4j 'neo4j+s://neo4j:yourpassword@xxxxxxxx.databases.neo4j.io'
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Anthropic
|
|
212
|
+
|
|
213
|
+
### API Key — `anthropic` in clauth (token)
|
|
214
|
+
```
|
|
215
|
+
sk-ant-api03-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
216
|
+
```
|
|
217
|
+
**Where to find:**
|
|
218
|
+
> console.anthropic.com → API Keys → Create Key
|
|
219
|
+
|
|
220
|
+
**clauth stores this as:** `anthropic`
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## RocketReach
|
|
225
|
+
|
|
226
|
+
### API Key — `rocketreach` in clauth (token)
|
|
227
|
+
```
|
|
228
|
+
12b893dk776927c079ea18cb1a7bc8d95b43398a
|
|
229
|
+
```
|
|
230
|
+
**Where to find:**
|
|
231
|
+
> rocketreach.co → Account Settings → API
|
|
232
|
+
|
|
233
|
+
**clauth stores this as:** `rocketreach`
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## The Bootstrap Token (Special — One Time Only)
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
ba6f25ec30e9316ead93152f0cfa5617
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
This is **not a service API key**. It's a one-time password that lets `clauth setup` register your machine with the vault for the first time.
|
|
244
|
+
|
|
245
|
+
- It's stored in your Supabase Vault (not hardcoded anywhere)
|
|
246
|
+
- After your machine is registered, you never need it again for daily use
|
|
247
|
+
- If you need to register a **new machine**, you need it again
|
|
248
|
+
- The vault operator (Dave) can retrieve it from: Supabase Dashboard → Vault → `CLAUTH_ADMIN_BOOTSTRAP_TOKEN`
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Summary Table
|
|
253
|
+
|
|
254
|
+
| clauth token | What it is | Where to get it | Type |
|
|
255
|
+
|---|---|---|---|
|
|
256
|
+
| *(setup prompt)* | Supabase project URL | Supabase → Settings → API | URL |
|
|
257
|
+
| *(setup prompt)* | Supabase anon key | Supabase → Settings → API → anon public | JWT |
|
|
258
|
+
| *(setup prompt)* | Bootstrap token | Ask vault operator / Supabase Vault | One-time |
|
|
259
|
+
| `github` | GitHub Personal Access Token | github.com → Settings → Developer → PATs | token |
|
|
260
|
+
| `supabase-anon` | Supabase anon key (stored for apps) | Same as above | token |
|
|
261
|
+
| `supabase-service` | Supabase service role key | Supabase → Settings → API → service_role | token |
|
|
262
|
+
| `supabase-db` | Postgres connection string | Supabase → Settings → Database → URI | connstring |
|
|
263
|
+
| `vercel` | Vercel API token + Team ID | Vercel → Account Settings → Tokens | keypair |
|
|
264
|
+
| `namecheap` | Namecheap API key + username | Namecheap → Profile → Tools → API | keypair |
|
|
265
|
+
| `neo4j` | Neo4j Aura URI + password | Aura Console → Connect | connstring |
|
|
266
|
+
| `anthropic` | Anthropic API key | console.anthropic.com → API Keys | token |
|
|
267
|
+
| `r2` | Cloudflare R2 S3 keypair | Cloudflare → R2 → Manage API Tokens | keypair |
|
|
268
|
+
| `r2-bucket` | R2 bucket name + endpoint | Cloudflare → R2 → bucket details | connstring |
|
|
269
|
+
| `cloudflare` | Cloudflare admin API token | Cloudflare → R2 → Manage API Tokens | token |
|
|
270
|
+
| `rocketreach` | RocketReach API key | rocketreach.co → Account → API | token |
|
|
@@ -100,6 +100,33 @@ select vault.create_secret('new-token-here', 'CLAUTH_ADMIN_BOOTSTRAP_TOKEN', 'ro
|
|
|
100
100
|
|
|
101
101
|
---
|
|
102
102
|
|
|
103
|
+
## Managed PM2 Operations (LIFEAI development hosts)
|
|
104
|
+
|
|
105
|
+
Use the clauth operations controller for approved PM2 lifecycle and deployment
|
|
106
|
+
actions. Its policy JSON is the server-side allowlist; it must define only the
|
|
107
|
+
applications and operations this host is permitted to expose. Do not grant
|
|
108
|
+
host-wide PM2 actions unless there is an explicit operational requirement.
|
|
109
|
+
|
|
110
|
+
Validate before changing the process manager, then install:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Linux
|
|
114
|
+
clauth ops install --config /etc/clauth/ops-control-plane.json --dry-run
|
|
115
|
+
clauth ops install --config /etc/clauth/ops-control-plane.json
|
|
116
|
+
|
|
117
|
+
# Windows PowerShell
|
|
118
|
+
clauth ops install --config C:\ProgramData\clauth\ops-control-plane.json --dry-run
|
|
119
|
+
clauth ops install --config C:\ProgramData\clauth\ops-control-plane.json
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The installer owns only the `clauth-deployment` process. It checks the local
|
|
123
|
+
health endpoint and verifies that the catalog remains bearer-gated. Keep the
|
|
124
|
+
controller bearer in clauth, not in a shell history, policy file, or PM2
|
|
125
|
+
environment dump. Use `clauth ops catalog` and scoped operations commands rather
|
|
126
|
+
than invoking PM2 directly.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
103
130
|
## Viewing the Audit Log
|
|
104
131
|
|
|
105
132
|
```sql
|
package/README.md
CHANGED
|
@@ -164,6 +164,54 @@ description, timestamps, and `has_key`. It never returns raw secrets or Vault
|
|
|
164
164
|
secret names. Use `GET /v/<service>` only for the one exact secret needed by the
|
|
165
165
|
next command. Do not bulk-fetch every service.
|
|
166
166
|
|
|
167
|
+
### PM2 deployment control-plane installer
|
|
168
|
+
|
|
169
|
+
On a managed host, store the allowed PM2 targets and deployment definitions in a
|
|
170
|
+
server-side JSON file, then install or update the supervised endpoint:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Linux
|
|
174
|
+
clauth ops install --config /etc/clauth/ops-control-plane.json
|
|
175
|
+
|
|
176
|
+
# Windows PowerShell
|
|
177
|
+
clauth ops install --config C:\ProgramData\clauth\ops-control-plane.json
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
The installer is idempotent on Linux and Windows: it creates or updates the
|
|
181
|
+
`clauth-deployment` PM2 process, probes its loopback health endpoint, and proves
|
|
182
|
+
that the operations catalog refuses requests without a bearer token. It does not
|
|
183
|
+
store or print a bearer token. Use `--dry-run` to validate the policy file before
|
|
184
|
+
changing PM2.
|
|
185
|
+
|
|
186
|
+
The policy is an explicit application allowlist; keep `allow_host_wide` false
|
|
187
|
+
unless a host-wide administrative operation has been deliberately approved. A
|
|
188
|
+
minimal local policy looks like:
|
|
189
|
+
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"port": 53141,
|
|
193
|
+
"pm2_name": "clauth-deployment",
|
|
194
|
+
"operations": {
|
|
195
|
+
"agent_enabled": ["restart", "reload"],
|
|
196
|
+
"agent_applications": {
|
|
197
|
+
"restart": ["codeflow-mcp"],
|
|
198
|
+
"reload": ["codeflow-mcp"]
|
|
199
|
+
},
|
|
200
|
+
"allow_host_wide": false
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Verify the policy before installation, then verify the loopback service without
|
|
206
|
+
ever placing a bearer in a shell command:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
clauth ops install --config <policy-path> --dry-run
|
|
210
|
+
clauth ops install --config <policy-path>
|
|
211
|
+
curl -i http://127.0.0.1:<port>/health
|
|
212
|
+
curl -i http://127.0.0.1:<port>/v1/ops/catalog # must return 401 without a bearer
|
|
213
|
+
```
|
|
214
|
+
|
|
167
215
|
---
|
|
168
216
|
|
|
169
217
|
## MCP Server — 5 Namespaces, 63 Tools
|