Commit graph

12 commits

Author SHA1 Message Date
5c506b6ed1 Revoke default PUBLIC execute on staging function
Some checks are pending
CI / lint-and-test (push) Waiting to run
PostgreSQL grants EXECUTE to PUBLIC on every new function by default.
The verification block correctly rejects this, so revoke it before
granting the runtime role.
2026-07-24 12:15:50 -07:00
7e1d57ef6f Drop staging function before create instead of replace
Some checks are pending
CI / lint-and-test (push) Waiting to run
Cloud SQL's postgres (cloudsqlsuperuser) cannot CREATE OR REPLACE a
function owned by another role. Drop both overloads first so a plain
CREATE works regardless of prior ownership state.

Also removes the dynamic ACL normalization block — a freshly created
function has no stale ACLs to scan and revoke.
2026-07-24 10:25:48 -07:00
eece69cd70 Fix Cloud SQL staging-function provisioning order
Cloud SQL's postgres role is cloudsqlsuperuser, not a true superuser.
After ALTER FUNCTION ... OWNER TO leoclean_kb_stage_owner, it can no
longer revoke ACLs on the transferred function:

  ERROR: permission denied for function stage_leoclean_proposal

Reorder so ACL normalization and the runtime GRANT happen while postgres
still owns the function, then transfer ownership. Identical end state.

Observed on teleo-pgvector-standby during M2 Step 4 provisioning
(BOOTSTRAP_EXIT=3 at SQL line 800).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-07-23 22:41:24 -07:00
963ab34584 Harden leoclean runtime authority checks 2026-07-22 20:15:53 -07:00
e03488ba0b Preserve scoped runtime ACLs across prerequisite reruns 2026-07-22 12:52:52 -07:00
508e1bdb28 Handle Cloud SQL provider database residuals 2026-07-21 19:01:34 -07:00
e850f0e6bd Harden Cloud SQL staging runtime boundary 2026-07-21 13:44:43 -07:00
832f0c3f47 Support Cloud SQL scoped role provisioning
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-21 12:58:07 -07:00
Fawaz
77e1336c0f
Restrict leoclean runtime reads to queried columns (#179)
Some checks are pending
CI / lint-and-test (push) Waiting to run
* Restrict leoclean runtime reads to queried columns

* Repair leoclean runtime authority review findings

* Harden leoclean query and CI permission contracts
2026-07-17 06:31:37 -04:00
twentyOne2x
7b16c6d3cc fix: prove least-privilege GCP Leo runtime context 2026-07-15 07:16:40 +02:00
twentyOne2x
b7bdcea46a fix: enforce scoped GCP Leo runtime credentials 2026-07-15 04:40:26 +02:00
ce90a79aac fix: scope GCP Leo database runtime 2026-07-14 12:57:31 -07:00