Skip to content
Centriu
Centriu Axiom

Public Trust Center Admin-Authorization Automation: The Gate That Wasn't in the Screen — Or the Database

Centriu Axiom's Trust Center publishes an organization's privacy policy, terms, and subprocessor list to the public — the page a prospect or auditor reads to decide whether to trust the company. A dedicated admin screen lets someone create, edit, and delete those published documents. An internal audit found that the screen had no role check of any kind, and — more seriously — neither did the database: the underlying access rule for both the documents table and the subprocessor table only checked which organization a row belonged to, never which role the acting user held inside it. Any authenticated member of the organization — an account executive, a salesperson, a project manager — could open the admin screen and rewrite the exact privacy policy a customer had already been shown publicly, or add or remove a subprocessor from the disclosed list. The fix adds two layers deliberately: a UI gate that shows a restricted-access message to anyone who isn't an owner or admin, and — the half that actually matters — a database migration requiring a real `axiom_user_is_admin()` check on every insert, update, and delete against both tables, so the restriction holds even if someone bypassed the interface entirely and called the write API directly with their own valid session token.
Same rule, screen and database
Admin-only write, enforced twice
Command center screen with real metrics
Admin-only, checked twice — screen and database.

A screen that checks who can click a button governs less than it looks like it does

A settings page that only shows a "Save" button to the right people creates a strong, correct-looking impression of access control — nobody who shouldn't be able to make the change can see how to trigger it from the interface. What that impression leaves out entirely is that a web application's interface and its actual data layer are two separate things, and only one of them is impossible to route around: anyone who already has a valid, logged-in session can, in principle, call the exact same write endpoint the hidden button would have called, without ever loading the screen that hid it. A role check that lives only in what the screen displays is a restriction on the path most people will take, not a restriction on what the system will actually accept — and for a screen whose entire purpose is publishing something to the public, that distinction is the whole ballgame.

How the underlying problem shows up before you fix it

A screen that creates, edits, or deletes a publicly-facing record has no visible role check at all — any authenticated member of the organization can reach it and use it exactly like an administrator would.

The database-level access rule for a sensitive table scopes a write only by which organization the row belongs to, never by which role the acting user holds within that organization.

A hidden button or an unreachable route in the interface is treated as if it were the actual security boundary, when the identical write is still reachable by calling the underlying API directly with any valid user's own token.

An update policy has a `USING` clause restricting who can touch an existing row, but no matching `WITH CHECK` clause — leaving open the possibility that an edit could move the row into a different organization entirely as a side effect.

Two enforcement points that are supposed to agree with each other — what the interface is willing to show, and what the database is willing to accept — were built at different times, by different work, and nobody ever confirmed they still describe the same rule.

Why organization-level isolation and role-level restriction are two different problems

Most screens inside a product built for many separate organizations at once only need one kind of protection: making sure organization A can never see or touch organization B's data, which is exactly what data isolation by organization, enforced at the database level and scoped to `organization_id`, accomplishes on its own. Inside a single organization, most everyday actions — creating a client, starting a session, adding a task — are intentionally left open to any team member, because restricting them further would slow down normal work for no real security benefit. A public-facing Trust Center admin screen is a structurally different kind of surface: it isn't "my organization's working data," it's the organization's public face, and the one thing that should distinguish it from every other same-organization screen is precisely the role-based restriction that everything else in the product deliberately doesn't need. That difference is easy to miss specifically because the org-isolation policy already looks like real security — it correctly stops a different tenant from reaching the data — and nothing about a working, correctly-isolated policy signals that a second, role-based layer was also supposed to exist on top of it.

How Centriu Axiom closed the gap on both the screen and the database that actually enforces it

The gap surfaced as part of the same internal audit that rewrote Axiom's proof-of-action mechanism and connected its safety scanner to the real AI path (both covered on this pillar's companion pages) — a recurring pattern of a control that looked complete without actually being wired all the way through. For the Trust Center admin screen specifically, the finding was direct: the screen itself performed zero role checks, and the row-level security policies backing both `axiom_trust_documents` and `axiom_subprocessors` were a single `ALL`-scoped rule each, restricting access only to rows belonging to the caller's own organization — with no further restriction on which member of that organization could write.

Before writing a single line of the fix, the audit checked the blast radius directly against production, read-only: both tables held zero rows at the time, meaning tightening the policy could not corrupt or orphan any existing data. It then checked exactly who would be affected by the change — 2 platform masters and 14 organization admins across the live data would retain write access exactly as before, while 10 staff-level members would lose a write capability they should never have held in the first place. Nobody with a legitimate need to publish or edit a Trust Center document loses access as a result of this fix.

The fix itself is deliberately layered as two separate, cooperating pieces rather than one. The database migration adds a new function, `axiom_user_is_admin()`, that returns true only for a platform master or for a member whose role in the organization currently active for that request (respecting the same org-switcher logic the rest of the app already uses) is admin, administrador, or master — a direct, role-for-role mirror of the exact `mapUserRole` function the application's own UI already uses to decide what to show. That mirroring is deliberate: if the UI's notion of "admin" and the database's notion of "admin" were two independently-maintained definitions, they could drift apart over time and quietly disagree about who is actually allowed to write, with the interface offering a button the database would refuse or — worse — the database silently accepting a write the interface never should have permitted. The migration replaces each table's single organization-scoped policy with four narrower ones: read stays open to the whole organization (the Trust Center itself needs every member to be able to see what has already been published), while insert, update, and delete each now additionally require `axiom_user_is_admin()` to return true. The update policy specifically carries the same admin check in both its `USING` clause (which existing rows can be touched) and its `WITH CHECK` clause (what the row is allowed to look like after the edit) — the second check exists specifically to close a subtler gap: without it, an admin editing a row could in principle move it to a different organization entirely as a side effect of the update, since `USING` alone only governs which rows can be selected for editing, not what the edited result is allowed to contain.

The screen-level half of the fix adds a genuine role check to `TrustCenterAdmin.tsx` itself: while the current user's role is still loading, the page shows a loading state rather than rendering anything; once resolved, anyone who is not an owner or admin sees a plain, honest restricted-access message directing them back to the read-only Trust Center, instead of the admin interface. The page's own code comment is explicit about what this half actually is and isn't: a screen-level gate alone would be decoration, since anyone who wanted to write anyway could still call the underlying API directly with their own valid token — the database migration is described in that same comment as "the half that matters." Confirmed directly in the current source: both the UI check and the database function remain in place today, unmodified since the fix.

What is actually built today

A database function, `axiom_user_is_admin()`, mirroring the application's own role-mapping logic exactly — a platform master or an org-level admin, administrador, or master role, resolved against the organization currently active for the request.

Insert, update, and delete on both `axiom_trust_documents` and `axiom_subprocessors` now require that function to return true — enforced by the database itself, not only by what the interface displays.

A `WITH CHECK` clause on the update policy specifically preventing a row from being moved into a different organization as a side effect of an otherwise-permitted edit.

Read access to both tables remains open to every member of the organization, unchanged — the fix is scoped exclusively to writes.

A UI-level gate on the admin screen itself, showing a restricted-access message to anyone who is not an owner or admin, explicitly documented in the code as the half that alone would not be sufficient.

Verified before deployment against live production data: zero existing rows affected, every legitimate admin's access preserved, and exactly the staff-level members who should never have had write access are the only ones who lose it.

The same restriction, checked two different ways (illustrative scenario, not a real client)

A staff member without any admin role opens the Trust Center admin screen and is shown the restricted-access message — the UI gate working as designed. Suppose instead that same staff member skipped the screen entirely and called the underlying write endpoint directly with their own valid, logged-in session token, exactly as a browser's developer tools would allow. Before this fix, that request would have succeeded, because the database itself imposed no role requirement — only the now-bypassed screen ever asked the question. After the fix, the identical direct request is refused by the database's own row-level security policy, independent of whether any screen was ever involved.

What changes operationally

A document that is shown to the public as an organization's official privacy policy or subprocessor list can now only be created, changed, or removed by someone the database itself — not merely the interface — recognizes as an owner or administrator of that organization. The restriction survives being called from a different client, a different screen, or no screen at all, because it lives in the one layer that every possible path to writing that data has to pass through regardless.

When this is not the right fit

This fix restricts WRITE access to published Trust Center documents and the subprocessor list to owners and admins — it does not restrict READ access, which intentionally remains open to every member of the organization, since the whole point of the Trust Center is that anyone inside the company can see what has already been made public. It is also a role gate, not a multi-step review or approval workflow: an admin's edit takes effect immediately, without a second person needing to approve it first. A team specifically wanting a publish-approval queue on top of this restriction would need that as a separate, additional mechanism.

A gate that only the screen enforces vs. one the database enforces too

A role check built only into an interface restricts the path most people will take, but does nothing about a request made directly against the underlying API with a valid session token — which is precisely how a determined bypass, or simply a different, unaudited client built later, would reach the same data. Centriu Axiom's fix closes that exact gap by putting the real restriction in the database itself, using a function that mirrors the interface's own definition of "admin" so the two layers can't quietly drift apart and disagree.

Related systems

Main system: Centriu Axiom.

What it does NOT do

  • Does not restrict READ access to published Trust Center documents or the subprocessor list — every member of the organization keeps the ability to see what has already been made public, unchanged by this fix.
  • Does not rely on a hidden button or an unreachable screen as its actual security boundary — the restriction is enforced by a database rule that holds even when the write is attempted directly against the API with a valid token, bypassing the interface entirely.
  • Does not use a `USING`-only update policy — a matching `WITH CHECK` clause specifically blocks a restricted actor from moving a row into a different organization as a side effect of an otherwise-permitted edit.
  • Does not change access for any of the organization's existing legitimate admins or platform masters — confirmed directly against live membership data before the fix was applied that all of them retain write access exactly as before.
  • Does not touch any other table or screen in the module — the fix is scoped specifically to the two tables backing the public Trust Center admin surface.
  • Does not introduce a second, independently-maintained definition of who counts as an administrator — the database function mirrors the exact same role-mapping logic the application's own interface already relies on.

Security and governance

Write access to published Trust Center documents and the subprocessor list is enforced at the database level via row-level security requiring a real admin or owner role, independent of any interface. Read access remains scoped to the owning organization. Any personal or business data referenced in a published document remains subject to Brazil's LGPD (Law No. 13,709/2018). Full detail on access control lives at /governanca and /iso.

Pricing and contracting

Available by monthly subscription, with tiered plans. Values and terms come from the official pricing table at /precos (Centriu's central source — never restated here).

Frequently asked questions

Who could edit the public Trust Center documents before this fix?

Any authenticated member of the organization — the admin screen had no role check, and the underlying database policy for both tables only restricted access by organization, never by role within it.

What actually enforces the restriction now — the screen, or the database?

Both, deliberately: the screen shows a restricted-access message to non-admins, but the database itself is the layer that actually matters, since it refuses the write even if the screen is bypassed entirely.

Did tightening this policy break any existing data or lock out any legitimate admin?

No — verified against live production before the fix: both tables held zero existing rows, and every one of the organization's real masters and admins was confirmed to retain write access.

Can a member of the organization still see the published documents without admin access?

Yes — read access is unchanged and remains open to every member of the organization; only insert, update, and delete now require an admin or owner role.

What does the `WITH CHECK` clause on the update policy specifically prevent?

It prevents an edit from moving a document or subprocessor row into a different organization as a side effect of the update — a gap a `USING`-only policy would leave open.

What does Centriu Axiom cost?

It is sold by subscription with a published starting price — exact current values are on the central pricing page.

See how Centriu Axiom protects public Trust Center documents

Reach our commercial team directly, or leave your details below — we'll follow up with guidance for your case.

Sources

  1. Centriu Axiom — public product page — Centriu, 2026-07-20 · link(primária)
  2. Centriu Axiom — public factsheet (API, JSON) — Centriu, 2026-07-21 · link
  3. Law No. 13,709/2018 — Brazil’s General Data Protection Law (LGPD) — Presidência da República (Brazil), 2018-08-14 · link

Last material update on .

By · AI-assisted production, with human review