Policy Before Access, Proof After: Governing Postgres® Data in the Open Lakehouse with PGAA and Lakekeeper+
A hospital’s most valuable data lives in Postgres: patients, admissions, appointments. Analysts want it in the lakehouse, and AI agents want to read it too. Each new reader brings the same question from the compliance team: Who may read what, under which rule, and can we prove it afterwards? Most organizations answer that one system at a time, and the answer stops holding once the data leaves the database.
EDB Postgres AI (PG AI) now answers it on both sides. Analytics Accelerator (PGAA) 1.12 replicates Postgres tables to Apache Iceberg natively, and Lakekeeper+ from Vakamo is the governed catalog that every reader goes through. In this post, we’ll follow a fictional hospital’s data from Postgres into governed Iceberg tables, and we’ll watch one set of policies decide for an analytics server and an AI agent alike.
2. What launched, and who it’s for
EDB has partnered with Vakamo, the company behind Lakekeeper, the open source Apache Iceberg REST catalog. Two things come together in this release:
- Analytics Accelerator 1.12 replicates Postgres tables to Iceberg natively. Replication is switched on per table, and existing rows, then inserts, updates, and deletes flow to Iceberg with no separate pipeline to build.
- Lakekeeper+, Vakamo’s enterprise edition of Lakekeeper, is offered to PG AI customers with Analytics Accelerator. It adds policy as code with Cedar, a per-decision audit trail and enterprise identity integration to the catalog.
Lakekeeper+ is available as a technology preview for PG AI customers using Analytics Accelerator and is not sold separately. Customers opt in for new workloads, and Vakamo supports Lakekeeper+ within PG AI.
This post is for platform, data, and security teams in regulated industries: banks, insurers, healthcare providers, and the public sector. Regulations such as DORA, GDPR, and the EU AI Act require a showing of who accessed data, under which rule, and why. Now, AI agents multiply the number of access decisions to account for. With PG AI and Lakekeeper+, the answer to an auditor is a query, not a project: Every decision is recorded with the policy that made it, and the data stays in open formats on infrastructure the customer controls.
3. How the pieces fit
An agent or an analytics engine has two ways into enterprise data: the database and the lakehouse catalog. PG AI governs the first. Lakekeeper+ governs the second. This section covers the three problems a buyer has to solve on the lakehouse side and how each is answered.
Getting data in
Most analytics still waits on nightly ETL, and every pipeline makes another copy of the data to secure. With PGAA 1.12, replication is a table setting. One ALTER TABLE statement on the source Postgres names the catalog, namespace, and table, and PGAA copies the existing rows before streaming inserts, updates, and deletes. Each batch of changes becomes an Iceberg snapshot. There is no separate pipeline to build or run, and the source database holds no storage keys. It writes with credentials the catalog issues. Data arrives in the lakehouse in minutes, already under the catalog’s policies.
Governing it once
Every engine that reads an Iceberg table asks the catalog for it before reading a single file. That makes the catalog the checkpoint: A policy enforced there applies to every engine that speaks the Iceberg REST protocol, Analytics Accelerator included. A read through Lakekeeper+ takes four steps:
- Authenticate: The engine or agent presents an OpenID Connect token. Lakekeeper+ resolves its roles from token claims or from role providers such as Okta, Microsoft Entra ID, and LDAP.
- Authorize: The built-in Cedar authorizer evaluates the request as a principal, an action, and a resource. Policies can match at any level of the hierarchy, from server and project down to warehouse, namespace, table, and view, and a forbid overrides any permit.
- Issue access: If policy permits the read, the catalog returns temporary storage credentials with the table metadata, scoped to that table’s location. A read-only principal receives read-only credentials. On Amazon S3, the catalog can sign each storage request itself, so the engine never holds credentials at all.
- Record: The catalog emits an audit record, in a published JSON schema, with the decision and the policies that determined it.
Because the policy engine runs inside the catalog, there is no separate authorization service to deploy or keep in sync.
Proving it
An auditor’s question is usually some version of “Who read this, and which rule allowed it?” Lakekeeper+ answers both parts. Each audit record carries the actor, the action, the resource, the outcome, and the policies behind the decision. The policies themselves are plain Cedar text that teams keep in version control and review before they take effect. The catalog checks each policy set against a published schema, and if a new set is refused, the policies already loaded stay in force. Every policy change is attributed to the named person who submitted it.
What Lakekeeper+ adds to open source Lakekeeper
Open source Lakekeeper is licensed under Apache 2.0. It already authenticates each request, vends credentials scoped to a single table, and secures tables with fine-grained, inherited permissions through OpenFGA. Lakekeeper+ changes how each request is authorized and what is recorded:
One relationship for both halves
Each half guards what the other cannot reach. Before an agent touches data in Postgres, PG AI checks its declared purpose and role, and it keeps an audit record of every session. Lakekeeper+ puts a policy check before every lakehouse read and a record after it. Together, you have one path from the first transaction to the last query, on open formats you own, and one support model.
4. Setting the stage: Mendwell Health
To show the pieces working together, we use a healthcare use case focusing on Mendwell Health, a fictional hospital chain. It has five components:
- A hospital Postgres with PGAA, the operational system of record
- Lakekeeper+, the Iceberg REST catalog that tracks tables, decides who may read them, and hands out short-lived storage credentials
- MinIO AIStor, the S3-compatible object store where the Iceberg tables live
- An analytics Postgres, a separate server that reads the lake through the catalog
- A care assistant, an AI agent that reads through the same catalog
In the demo, we’ll follow four Mendwell Health employees as they complete their daily tasks. Here are the employees we follow through the story:
To illustrate these state changes clearly, several interface views from the Mendwell Health demo application demonstrate how each persona experiences PG AI.
Figure 1. Mendwell Health solution architecture
One point matters for everything that follows: The catalog decides about services, not about individual people. Postgres presents one identity per catalog connection, so a policy names that service’s role. It does not name Cy. Rules for individual analysts stay in Postgres, which can see who is actually asking.
The data
The hospital Postgres holds three operational tables:
patients: Names, emails, and other personal detailsadmissions: Ward, admission date, length of stay, costappointments: Scheduled date, duration, fee
PGAA replicates each one to Iceberg in the hospital namespace of a warehouse called demo. Replication is switched on per table with one statement, run on the hospital Postgres:
ALTER TABLE public.admissions
SET (pgaa.replicate = true,
pgaa.managed_by = 'lakekeeper',
pgaa.catalog_namespace = 'hospital',
pgaa.catalog_table = 'admissions');
Within the Mendwell application UI, Sue monitors table statuses transition from loading to streaming. Rows already in the table are copied first, then inserts, updates, and deletes keep flowing, and each batch of replicated changes becomes an Iceberg snapshot. The hospital Postgres holds no storage keys: It writes through credentials the catalog issues.
Figure 2. Tables are being replicated
Where everyone starts
In the beginning, every identity has a narrow starting position.
The only identity that can write table data is the replicator, the service the hospital Postgres uses to publish. Hippa and Sue can open tables and see schemas, snapshots, and tags, and neither can read a single row through the catalog. That is deliberate: Governance writes the rules and does not read the data.
Flo starts with her own read permit, scoped to the hospital namespace in the same way as the one Cy receives in 5.2 and written with Hippa’s token. Her part of the story begins in 5.3.
With Cedar authorization on and no permit, the catalog refuses a service’s request. That default is the starting point of the walk-through.
5. The walk-through: Permissions over time
We will follow Cy and Flo across three tables—Patients, Admissions, and Appointments—and keep a running scorecard. In each cell, ✅ means the read is allowed and ❌ means it is refused. Neither of them can write at any point.
5.1. Nothing is allowed until a policy says so
Cy asks the analytics Postgres for the Admissions table. The request reaches Lakekeeper+, which finds no policy that allows it, and refuses. Every decision produces an audit record with the actor, the action, the resource, the outcome, and the policies that determined it, so the refusal has a record.
Figure 3. The refused read, with the audit record beside it
5.2. Hippa writes a permit
Hippa signs in to the Lakekeeper+ UI, opens the warehouse’s Policies page, and chooses New policy. A policy is a few lines of Cedar: a name, a description, and a text editor. She writes one that lets the analytics readers select from the hospital namespace:
@id("analytics-readers-select")
@description("analytics-readers may read tables in the hospital namespace")
permit (
principal in Lakekeeper::Role::"<project-id>/lakekeeper~<analytics-readers-id>",
action in [Lakekeeper::Action::"TableSelectActions"],
resource in Lakekeeper::Namespace::"<hospital-namespace-id>"
);
Three things to notice:
- The policy names a role, not a user ID, so the identity provider can change without rewriting the policy.
- The action is a group,
TableSelectActions, so she does not list individual operations. - The resource is a namespace, with
in, so the permit covers every table inside it.
She saves it. Policies are stored in the catalog, and the change takes effect immediately. Cy’s next query returns rows, and the audit trail records Hippa as the actor of the policy write, using her own sign-in token and no administrator override.
The UI is one way in. The same Cedar text can come from version control after review: The catalog checks every policy set against its schema, and a set that fails the check is refused while the policies already loaded stay in force.
Figure 4. The Policies page, new policy form with the Cedar text
Now Cy can see the same query returning rows:
Figure 5. The same query, now returning rows
Because the scope is the namespace, Appointments opened too, even though nobody named it. Scope is the point.
5.3. A policy for a tag
Reading everything is too generous for a table of names and emails. Hippa writes a second policy that refuses personal data by tag, so it names no table:
@id("pii-forbid")
@description("Data-reading roles may not select from tables tagged pii")
forbid (
principal,
action in [Lakekeeper::Action::"TableSelectActions"],
resource
)
when {
principal in [
Lakekeeper::Role::"<project-id>/lakekeeper~<analytics-readers-id>",
Lakekeeper::Role::"<project-id>/lakekeeper~<assistants-id>",
Lakekeeper::Role::"<project-id>/lakekeeper~<browser-readers-id>"
] &&
resource.governance_tags.hasTag("pii")
};
This is a forbid, and a forbid overrides a permit. It targets the three roles that read data through the catalog and checks for the pii tag. Written alone, it refuses nobody, because no table carries the tag yet.
Then Hippa tags the Patients table pii. Within about 10 seconds, the analytics Postgres and the care assistant are each refusing patients, with an audit record of each, while Admissions and Appointments still read and replication keeps streaming. The catalog refuses every new request as soon as the tag is set. The short delay comes from storage credentials that were already issued, which stay valid until they expire. That is one more reason to keep credential lifetimes short.
Figure 7. The refusal on patients and the audit entry
That is the same policy set deciding for a Postgres server and for an AI agent. Each role has its own select permit and its own credentials, and the one tag rule applies to both.
Hippa herself can still open the Patients table, list its tags, and remove tags. The forbid names the reader roles and not governance, so she can undo her own changes. She never gains the ability to read the data through the catalog. Removing a tag restores the reads.
5.4. The safe path: No policy change needed
Sue wants analytics to keep working without personal data. The catalog decides at the table level, so rather than hiding columns she publishes a reduced copy of Patients, without names or emails. (Row-level rules would stay in Postgres). On the hospital Postgres, she publishes a copy of Patients without names or emails:
CREATE TABLE public.patients_no_pii (
id integer PRIMARY KEY, birth_year integer, postcode_area text);
INSERT INTO public.patients_no_pii
SELECT id, birth_year, postcode_area FROM public.patients
ON CONFLICT DO NOTHING;
ALTER TABLE public.patients_no_pii
SET (pgaa.replicate = true, pgaa.managed_by = 'lakekeeper',
pgaa.catalog_namespace = 'hospital', pgaa.catalog_table = 'patients_no_pii');
It replicates like the other tables, and it carries no tag. Then Cy runs a report that joins Admissions to the new table, grouped by postcode area. It runs.
Nobody wrote a policy for it. The permit from 5.2 is scoped to the hospital namespace, so it already covers any table that lands there. The forbid from 5.3 matches the pii tag, and this table has none. Sue herself held no permission to change policy. Publishing the table was the whole action.
It works because only the replicator can write table data, and Sue's change went through the hospital Postgres, where it can be reviewed. If many identities could write, anyone who can read a table could publish an untagged copy of it, so it is worth keeping write access this narrow.
This is the design in one picture: Permits and forbids are written against scope and tags, not against individual tables, so new tables inherit the right behavior with no policy change. Governance does not block the work.
5.5. The agent, with short-lived credentials
Flo reads through the same catalog with her own identity. When a table is loaded, Lakekeeper+ returns a short-lived storage credential (a key, a secret, a session token, and an expiry), so she holds no standing storage keys. DuckDB reads the replicated Iceberg tables with those credentials, including tables that have had updates and deletes.
6. What the demo shows about the design
Across the walk-through, a governance officer and a platform engineer changed what the lake allowed without reading a row through the catalog, and one policy set decided for a Postgres server and an AI agent. Three design choices made that possible:
Policy is written against scope
Policies attach to a level of the hierarchy: project, warehouse, namespace, or table. Hippa’s permit in 5.2 named the hospital namespace, so it covered Appointments without naming it, and it covered patients_no_pii in 5.4 before that table existed. New tables arrive with the right access and no policy change.
Tags carry the rule
The forbid in 5.3 names no table. It matches the pii tag, so tagging a table closes it to reader roles, and removing the tag opens it again. Governance tags set on a warehouse or namespace are inherited by the tables beneath them, so one rule covers every table that holds personal data, however many there are.
One policy set, several engines
The analytics Postgres and the care assistant read through the same catalog with different identities and different permits, and the same forbid applied to both. Any engine that speaks the Iceberg REST protocol is treated the same way, because the decision is made in the catalog, not in the engine.
7. Try it yourself
To experience something similar to what you saw with Mendwell Health, join the Lakekeeper+ technology preview by visiting www.enterprisedb.com/partners/vakamo or talking to your EDB account team.