Skip to content

docs(lore-0063): decide DDL identity (Option 1) + author provisioning runbook#47

Merged
karczuRF merged 2 commits into
developfrom
docs/0063_option1-provisioning-plan
Jun 19, 2026
Merged

docs(lore-0063): decide DDL identity (Option 1) + author provisioning runbook#47
karczuRF merged 2 commits into
developfrom
docs/0063_option1-provisioning-plan

Conversation

@karczuRF

Copy link
Copy Markdown
Collaborator

What

Locks the DDL-apply identity for the prices tenant to Option 1 and authors the ready-to-execute provisioning runbook. Task-doc only — no Hetzner / AWS / BE-repo action taken.

Option 1 (decided)

DDL is the box default admin over loopback; the always-on runtime certs carry no DDL:

Identity Path Powers
default admin loopback (SSH) full DDL — installs/migrates schema (0051)
prices_writer (CN prices-ingestion-{env}) Caddy:443 mTLS SELECT, INSERT, OPTIMIZE ON prices.*
prices_reader (CN prices-api-{env}) Caddy:443 mTLS SELECT ON prices.*

Chosen over the G-note's scoped-DDL writer (Option 2) and the hybrid migrator cert (Option 3). A leaked ingestion cert can't DROP TABLE prices.* or touch default.*. Matches BE (they removed remote-DDL users in BE 0241) and keeps the 0051 loopback descope intact.

Changes

  • notes/G-provisioning-plan.md (new): runbook — drafted BE-PR XML (services.xml users + dedicated prices_write/prices_read quotas; no new profile), CN-map env append, CREATE DATABASE one-shot, schema apply (loopback, → 0051), cert issuance → single {cert,key,ca} bundle secret (aligned to 0052), verification, and a 7-row gated-action inventory.
  • README: Step 2 locked to Option 1; DDL caveat resolved; Step 4 → single-bundle secret; Step 5 isolation proof corrected (writer CREATE TABLE now denied); Design Decisions → Emerged added; two acceptance criteria ticked.

Flagged for follow-up (in the runbook)

  • CA-key access (else cert issuance is a BE ask)
  • CDK reconciliation: 0011/0038 two-secret → 0052 single-bundle
  • Backup scope: recommend treating prices.* as re-derivable (not in BE's snapshot)

Gated — needs your explicit approval before running

clickhouse-client on the box, the BE-repo PR, CREATE DATABASE, ansible-playbook, issue-client-cert.sh, aws secretsmanager put. None done here.

karczuRF added 2 commits June 18, 2026 14:50
… runbook

Option 1: loopback `default` admin applies all DDL; runtime certs
(prices_writer/prices_reader) carry no DDL (write_no_ddl/read_only,
grants on prices.* only). A leaked ingestion cert can't DROP TABLE
prices.* or touch default.*. Matches BE (removed remote-DDL users in
BE 0241) and keeps the 0051 loopback descope.

Author notes/G-provisioning-plan.md: ready-to-execute runbook with
drafted BE-PR XML (services + dedicated quotas), CN-map env append,
CREATE DATABASE one-shot, cert -> single {cert,key,ca} bundle secret
(aligned to 0052, reconciling the old two-secret assumption),
verification, and a gated-action inventory. Authoring only; no
Hetzner/AWS/BE-repo action.
…n item

Fold the salvageable findings from the (stale) feat/0063 branch into the
live Option-1 runbook:

- Clarify there is one Hetzner CH box (production `ch-prod-01`); the
  `{env}` placeholder is the AWS-side client stage, not a second box.
  Flag the implication that per-env certs would share one prices DB.
- Add open item to verify that inline user-XML `<grants>` blocks are
  applied by the running CH version (BE's live services.xml uses none);
  fall back to init.sql GRANTs under loopback admin if not.
@karczuRF karczuRF merged commit 29f603c into develop Jun 19, 2026
3 checks passed
@karczuRF karczuRF deleted the docs/0063_option1-provisioning-plan branch June 19, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant