Commit Graph
8 Commits
Author SHA1 Message Date
marc 1cf23c37ce fix: is_allowed_nocache resolves roles once per org, not per rule
release / release (push) Canceled after 0s
Steps 1, 2, 4 and 5 called get_comprehensive_roles() for every row of
morbac.rules (and org_in_scope() per row), so a decision cost grew with
every tenant's rules: ~240 ms with 2376 rules across 27 orgs. Roles are now
resolved once per org where the user can hold one and that has a rule for
the request, rules are read through those (org, role) pairs, and
org_in_scope() runs once per (org, scope) pair. Decisions are unchanged.

Release 1.0.1 with the 1.0.0 -> 1.0.1 upgrade script. Test 17 compares
every decision with the 1.0.0 body on a seeded random fixture and checks
the cost no longer follows unrelated tenants' rules. bump_version.sh no
longer rewrites the PGXN meta-spec version.
2026-10-14 23:41:00 +02:00
marc 493c2ec429 refactor: the npm package moves to pgmorbac-node
This repository is the SQL extension only. @crudy/pgmorbac is published from
pgmorbac-node, which packs the SQL of each signed release.
2026-10-03 09:57:08 +02:00
marc 8385cea640 feat: npm package @crudy/pgmorbac ships the extension SQL
The package carries the install and upgrade scripts, built from src/ on prepack
(sql/ is not committed), with extensionSql(), upgradeScripts(), version and sqlDir.
2026-10-02 23:59:58 +02:00
marc 6dd1026c5a build: signed PGXN release tooling + Drone pipeline
Build the distribution from src/ (control, versioned SQL, META, MIT LICENSE,
PGXS Makefile, install README), checksum it, and sign an Ed25519 JWT manifest
(audience pgmorbac-release) with the verification public key attached to the
release. `npm run release` does it locally; the Drone pipeline does it on a
v* tag once the repo is Trusted with the pgmorbac_release_key + gitea_token
secrets.
2026-07-22 09:22:26 +02:00
marc 32a6a8dd17 refacto: pg_morbac -> pgmorbac 2026-02-22 22:29:52 +01:00
marc 2d5f4ca669 refacto: morbac_pg -> pg_morbac 2026-02-20 10:36:19 +01:00
marc d80b9f387b refacto: add build and cleanup file structure 2026-02-20 01:32:08 +01:00
marc 11e42f080e refacto: add a build to avoid lingering version numbers 2026-02-20 00:54:15 +01:00