Every quarter a bank sends managers a spreadsheet of who holds which database privilege and asks them to confirm each line. Managers confirm almost everything, because they cannot remember whether an analyst still needs SELECT on the accounts table, and saying no feels riskier than saying yes. The result is a signed review that changes nothing. InsightAIShield asks a better question: not “does this person need this grant?” but “did this person use it in the last 90 days?”. This post works through the answer on Northmere Bank, a fictional bank, where 61 of 79 grants on sensitive data were never used in the window.
In short
- Grants come from the source, use comes from the activity. The read-only harvest collects every grant; the proxies, gateway and monitor sources record every query. The review compares the two.
- Three recommendations. Revoke: no use in the window. Reduce: a write or ALL privilege only ever used to read. Keep: used as granted. Unused grants on sensitive data come first.
- A reviewer answers each line. Keep or revoke; keeping a grant the recommendation said to revoke needs a reason, written on the record.
- Four eyes on every revocation. One person proposes, a different lead approves, and the REVOKE statement for the source’s own dialect is kept on the item for the DBA to run.
Two lists that never meet
Every database already knows who may do what. PostgreSQL exposes its grants through the system catalogue, MySQL keeps them per user and host, Snowflake per role, S3 in IAM policies. Every access tool knows what people actually ran. The trouble is that the first list lives with the DBAs and the second with the security team, and an access review needs both side by side.
InsightAIShield already holds both. When a source is harvested, read-only through a secret reference, the connector collects the grants along with the tables and columns: for Northmere’s core banking PostgreSQL that is a live read of the privileges on each table. And because every query that passes a proxy, the query gateway or a monitor source is recorded with its principal, database user, objects and command, the product knows which grant each query relied on.
Grants, observed use and the sensitive-data map meet in one finding per grant.
What “used” means
For each live grant the review looks at the activity of everyone the grant covers, the database user or role named in the grant mapped back to people and agents through the directory, over the window. It counts the queries that touched the granted object with the granted kind of command. Then it recommends:
| Recommendation | When | Example from the demo |
|---|---|---|
| Revoke | no use in the window; an unused grant on sensitive data scores first | nm_dprice holds SELECT on accounts, which holds bank account numbers and SSNs, and never used it |
| Reduce | a write or ALL privilege only ever used to read: SELECT is enough | none in this campaign: Northmere’s write grants were simply unused |
| Keep | used as granted in the window | 18 of the 79 grants on sensitive data |
The order matters. A grant scores higher when it would be revoked, higher again when the object holds sensitive data, and the reason says which classes: “not used in the last 90 days; the object holds bank_account, ssn; a privileged account”. A reviewer working down the list sees the riskiest unused access first.
What Northmere found
The excess-privilege view covers all four sources: the core banking PostgreSQL, the cards MySQL, the Snowflake warehouse and the S3 lake. Of 79 grants on sensitive data, 61 were never used in the 90 days. A few patterns stand out, and they are the patterns most estates share:
- Write privileges nobody writes with.
nm_rmehtaholds DELETE, INSERT, TRUNCATE and UPDATE on the accounts and customers tables. None were used. Raj Mehta’s recorded activity is mostly reading table statistics and counts. - Wildcards.
nm_rmehta@%holds ALL PRIVILEGES oncards.*in the cards database, which includes the card security code. - Service roles that outlived their job. An IAM role for analytics readers can GetObject on the whole lake, including the raw KYC files with passport numbers; it read nothing.
- An AI agent with more than it uses. The loan officer copilot’s database user holds SELECT on the customers table. The agent reaches data through the query gateway, under its own policy, and never used the direct grant.
- A dormant administrator. Tom Becker’s account, the one that woke up at 03:41 and read SSNs from abroad, holds write privileges across core banking and the cards database.
A campaign a person can answer
Findings are a view; a review is a commitment. The access reviewer agent compares every grant with its observed use and prepares a campaign, which a person opens. Northmere’s Q4 least-privilege review (core banking and cards) covers 55 grants, is due on 6 December 2026, and is scoped to the two sources where the bank’s most sensitive data lives.
Each line gets one of two answers:
- Keep. The grant stays. If the recommendation was to revoke, the reviewer must say why: “month-end reconciliation, used quarterly” is a reason the next review can check. Without one, the keep is refused.
- Revoke. The reviewer proposes the revocation. InsightAIShield writes the REVOKE
statement in the source’s own dialect and puts it on the item: a schema-qualified table for
PostgreSQL,
`schema`.`table`and the user’s host for MySQL,TABLEfor Snowflake, a schema-wide form for a wildcard grant.
Four eyes on the revocation
Revoking access is a change with consequences: a nightly job that runs once a quarter fails, a branch report stops. So a proposed revocation waits for a second person, a lead who did not propose it. The product refuses the approval if the approver is the proposer, and refuses it outright from an agent. When the second lead approves, the grant is marked revoked in InsightAIShield and the statement stays on the item, with who proposed it and who approved it.
In the demo, two of Tom’s grants, INSERT and DELETE on the accounts table, are revoked: Avery Brooks
proposed them and Jordan Ellis approved. A third, SELECT on branch_staff for the reporting
service, was proposed by Jordan and waits for another lead. Jordan sees the Approve button as a lead, and
the product refuses the click because he proposed it.
InsightAIShield never runs DCL on a source. The REVOKE statement is the hand-off: the DBA runs it in the bank’s own change process, and the next harvest shows the grant gone. That keeps the security product out of the database’s privilege system, which is where most DBAs want it.
Who does what in a revocation. The agent recommends; two people decide; the DBA changes the database.
Why this beats the spreadsheet
Every line looks the same. The manager confirms what they cannot judge. Nobody records why a grant stayed, and next quarter starts from zero.
The unused, sensitive and privileged grants come first. A keep carries its reason. A revocation carries its statement, its proposer and its approver.
It also feeds the evidence. PCI DSS requirement 7.2.1 asks that access be assigned by least privilege; SOC 2 CC6.1 and CC6.3 ask that access be restricted and removed when no longer needed; HIPAA 164.312(a)(1) asks for access control. InsightAIShield’s compliance view reads the campaigns and shows, per control, how many campaigns ran, how many grants were reviewed and how many revocations were approved with four eyes. While Northmere’s campaign is open, with 2 of 55 grants decided, the product marks those controls partial, which is accurate.
Practical notes for a first campaign
Grants come from the harvest. A source monitored from its audit log only still contributes activity.
90 days is the default. A quarterly job needs a window longer than a quarter, or a keep with that reason.
Start with the sources holding card numbers and SSNs; the findings view covers the rest.
Privileged, unused and sensitive. Keep with a reason or propose revoke.
The proposer can’t approve. The statement is on the item.
Run them in your change process; the next harvest confirms.
Least privilege is not a policy you write once. It is a comparison you repeat.
Grants drift up; use drifts down. Comparing the two every quarter, with the evidence on every line and a second person on every revocation, is how access stays close to what people actually need.
Where people stay in charge
- The access reviewer agent recommends; a reviewer answers keep or revoke for each grant, and keeping a grant the agent said to revoke needs a written reason.
- Every agent action is capped at L2, “ask first”: an agent prepares, and a person confirms, activates, revokes, sends or decides.
- A policy version goes live only when a second lead, not the person who proposed it, approves it.
- A revocation is proposed by one reviewer and approved by another; the REVOKE statement is kept on the record for your DBA to run.
- Detokenizing needs a stated purpose, is recorded, and is capped per person per period.
- SIEM batches and attestation requests are held until a person releases them.