Verify real R2/Google credentials; document the placeholder-password catch
configure-secrets.sh run for real against the user's actual R2 bucket and Google OAuth client, confirmed via /api/settings, /api/collections/ users, and /api/collections/users/auth-methods (the exact endpoint the frontend SDK calls). Round-tripped an actual file through R2 end to end - created a document with a real multipart upload, fetched it back via PocketBase's own file URL, confirmed the exact bytes. Caught before any of this ran: the superuser email/password in .env were still .env.example's literal placeholders even after R2/Google values were filled in - flagged and confirmed with the user before upserting a well-known default credential on an account with full admin access to every user's data.
This commit is contained in:
parent
35b378751f
commit
c1df28fb78
36
CLAUDE.md
36
CLAUDE.md
|
|
@ -569,9 +569,10 @@ localStorage restore across a real reload) still needs the user's own browser to
|
||||||
same honest limitation as every other frontend change this session, Claude-in-Chrome has
|
same honest limitation as every other frontend change this session, Claude-in-Chrome has
|
||||||
not connected.
|
not connected.
|
||||||
|
|
||||||
**PocketBase: accounts, R2-backed files, project sidebar - Stage B.1 in progress,
|
**PocketBase: accounts, R2-backed files, project sidebar - Stage B.1 done and fully
|
||||||
2026-10-13.** The client-project sidebar was originally planned as a localStorage-only
|
verified, 2026-10-13 (B.2/B.3 not started - see below).** The client-project sidebar was
|
||||||
feature (consistent with this app's "no DB" architecture). The user asked to reconsider
|
originally planned as a localStorage-only feature (consistent with this app's "no DB"
|
||||||
|
architecture). The user asked to reconsider
|
||||||
and introduce PocketBase instead - explicitly flagged as a real scope jump from "single
|
and introduce PocketBase instead - explicitly flagged as a real scope jump from "single
|
||||||
local user" territory, confirmed deliberately via `AskUserQuestion` rather than assumed.
|
local user" territory, confirmed deliberately via `AskUserQuestion` rather than assumed.
|
||||||
Grew further during plan review into two more specific asks, each changing the design:
|
Grew further during plan review into two more specific asks, each changing the design:
|
||||||
|
|
@ -642,14 +643,27 @@ built and tested; B.2 document-persistence migration and B.3 sidebar UI not star
|
||||||
re-login restores it. `npm run build` passes with the new auth layer
|
re-login restores it. `npm run build` passes with the new auth layer
|
||||||
(`pocketbaseRepository.js`/`authService.js`/`authStore.js`/`LoginView.vue`/`App.vue`'s
|
(`pocketbaseRepository.js`/`authService.js`/`authStore.js`/`LoginView.vue`/`App.vue`'s
|
||||||
gate) wired in.
|
gate) wired in.
|
||||||
- **Not yet verified - needs real R2/Google credentials, which this session doesn't have:**
|
- **Real R2/Google credentials added 2026-10-13, `configure-secrets.sh` run for real and
|
||||||
`configure-secrets.sh` itself hasn't been run against real values (no live account to
|
fully verified**, not just assumed from the script exiting cleanly: `/api/settings`
|
||||||
test against); the Google OAuth2 popup flow needs a real browser + a real Google Cloud
|
confirms `s3.enabled`/`bucket`/`endpoint` match the real R2 bucket; `/api/collections/
|
||||||
OAuth client, confirmed in README.md as a prerequisite the user sets up outside this
|
users` confirms `oauth2.enabled` + the `google` provider; `/api/collections/users/
|
||||||
repo's control - curl can confirm the collection is CONFIGURED correctly, not that a
|
auth-methods` (the exact endpoint the frontend SDK itself calls to build the OAuth2 flow)
|
||||||
live Google consent screen round-trips. Follow-up once credentials exist: re-run
|
returns a real, well-formed Google authorization URL with the actual client_id embedded.
|
||||||
`configure-secrets.sh` for real and confirm a file actually round-trips through R2 (not
|
Most importantly, an actual file was round-tripped through R2 end-to-end: created a
|
||||||
just that the PATCH to enable S3 storage succeeds).
|
`documents` record with a real multipart `sourceFile` upload, then fetched it back via
|
||||||
|
PocketBase's own `/api/files/...` URL and confirmed the exact byte content came back -
|
||||||
|
proves R2 storage genuinely works, not just that the PATCH to enable it succeeded. The
|
||||||
|
one thing still unconfirmed is the live Google consent-screen round trip itself (needs a
|
||||||
|
real browser clicking through Google's own UI, not curl) - everything on this repo's own
|
||||||
|
side of that handshake is now verified correct.
|
||||||
|
- **One real catch before any of the above ran:** the user had copied `.env.example` to
|
||||||
|
`.env` and filled in real R2/Google values, but left `POCKETBASE_SUPERUSER_EMAIL`/
|
||||||
|
`_PASSWORD` as the literal placeholders (`admin@example.com`/`change-me-min-10-chars`) -
|
||||||
|
caught by checking the password's actual value against the known placeholder string
|
||||||
|
before running the superuser upsert, not assumed safe just because the field was
|
||||||
|
"filled in." That account has full admin access to every user's data and the instance's
|
||||||
|
own settings, so this was flagged and confirmed with the user before proceeding rather
|
||||||
|
than silently upserting a well-known default credential.
|
||||||
|
|
||||||
**Governing rule: never silently correct or exclude data.** This shows up in several
|
**Governing rule: never silently correct or exclude data.** This shows up in several
|
||||||
concrete places, not just as an abstract principle:
|
concrete places, not just as an abstract principle:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue