Audit log
What Baseera records about security-relevant changes, what an entry holds, and who can read it.
The audit log answers who changed what, and when. It is append-only for everyone, owners and the service role included.
What is recorded
Triggers on the rows a change touches write an entry in the same transaction as the change. A change cannot commit without its entry, and a refused change leaves none. Because it is a trigger, every path to the row is covered: the platform, the server API, the tenant uploader and service-role code.
Recorded events:
- organization created;
- agent created, draft saved (names of the changed fields), published and rolled back;
- allowed domains, dev mode and required test suites changed;
- agent keys created and revoked;
- provider keys added, replaced and removed, and every key check attempt (
provider_key.checked); - webhooks created, rotated and deleted;
- knowledge bases created and deleted, sources deleted, crawls created and deleted, document access rules changed, tenant knowledge purged;
- eval runs started and stopped, review labels created and changed;
- spending limits set, changed and removed;
- team changes: members invited, joined, role changed and removed, invitations revoked;
- two-factor enrollment, removal, recovery code use and the organization requirement.
Changes made through the in-product guide carry "via": "guide". That is a label for readers, not a boundary, and nothing decides access by it.
What an entry holds
An entry names the organization, the person (or api_key, tenant_user, system), the target id, the time and a small allow-listed set of details: changed field names, versions, last 4 characters, counts and webhook hosts.
It never holds a key, a prompt, config text or a URL path. The only writer, record_audit, runs inside the triggers and nothing can call it. It refuses:
- unlisted detail keys;
- nested values;
- strings over 300 characters;
- anything shaped like a provider key, token or signing secret;
- details over 8 KB.
Tenant ids are never a detail.
Append-only
audit_events grants nothing but select. No API role has insert, update, delete or truncate. Triggers raise on update, delete and truncate for everyone else, the table owner included. There is no retention function and no purge function, because anything callable is something an attacker with the service role key could call. A test proves each role is refused.
Superusers of the database can still disable triggers. That is a database operator's act, outside the platform. The guarantee given to customers is about the platform.
Survives deletion
Entries have no foreign keys. Deleting an organization or a user does not touch them. A deleted user's id stays as an opaque uuid, and entries carry ids, never names or emails. The page looks up emails at read time, only for people who still have an account and only for owners and admins.
Who reads it
Owners and admins read their organization's log in the console, newest first, 30 entries a page, with filters for the kind of event and the person. Developers and viewers get no rows, and the database refuses them regardless of the page.
Changes made before the audit log existed were not recorded, and the page says so.