Bounds
Emulated and native identity
Ideally a lease is a real database principal, created on demand and dropped when the lease ends. Where a connector can mint one it does, and the operations show up under that principal in the database’s own logs. Where it cannot, the lease is emulated: it scopes and attributes the work, but the underlying connection is still the gateway’s role. The identity then carriesemulated: true all the way into the audit record.
That distinction is never smoothed over. An emulated identity gives you attribution and expiry; a native one additionally means the database would refuse what the lease does not permit. On PostgreSQL, set the connection’s
lease_role option to get native identity — see PostgreSQL. Without it, identity is unavailable and a policy that requires it refuses to start. On MongoDB and Neo4j, identity is gateway-enforced by design — see MongoDB and Neo4j — so a policy requiring more than enforced refuses to start there.Revocation
Surviving a restart
Leases are journalled todata_dir, so they survive a restart with their expiry intact. Without a data directory they live in memory and are lost — agents are then issued fresh ones, and the gateway warns about this at startup.