Audit log API
The audit log records every mutating admin API call. The gateway writes one row per POST, PATCH, PUT, or DELETE request against /admin/v1/ — except the read-only search POSTs that carry their search term in the body (/users/search, /conversations/search, /chat-commands/search, /tenant-prompts/search, /playground/search, /gateways/{id}/agents/search; see Search and lookup values travel in the request body), which are reads and, like a GET, write no row. The recorded fields are the timestamp, the calling user ID, the source IP, the HTTP method, the request path, and the response status.
The generic access row does not capture the request body or a JSON diff of the change. A few security-relevant configuration changes additionally write a structured event with a redacted before/after (see gateway.endpoint_config_changed and the gateway.provider_key.* / tenant.provider_key.* / gateway.managed_model.* rows below).
Security events
In addition to the generic access trail, the gateway records security-relevant events for anomaly review. Each carries an action label so it can be distinguished from an ordinary access row. The rows from gateway.endpoint_config_changed onward are configuration- and data-lifecycle events rather than denials — they are here because each one is a moment a protection stops applying or data leaves the platform's control, which is exactly what an anomaly review needs to see:
action |
When | Recorded actor |
|---|---|---|
access.denied |
Any admin request that is answered with 403 Forbidden — a permission denial (including on GET), or a business-rule denial such as a protected-account guard. Also recorded: a request under /admin/v1/tenants/{id}… for an unknown tenant id or a tenant other than your own (the same identical 404, status 404, no entity; see tenant ids), a request under /admin/v1/projects/{id}… (including governance and org-share), a group-grant request naming a project in resource_id, an agent create or PATCH whose project_ids names a project you cannot see, and the connector-sync routes and the memories routes (/admin/v1/memories…) with a caller-supplied project_id for a project you cannot see — unknown, another tenant's or not shared with you (the identical 404, no entity; see projects), a request for a request-log id, content-report id, connector id, connector-sync source id or compliance snapshot id (GET /admin/v1/compliance/reports/{id}) that does not exist or belongs to another tenant, or a trace that does not exist or sits on a gateway you cannot access (the identical 404, no entity; see ids of another tenant), and a request under /admin/v1/gateways/{id}… for an unknown gateway id or another tenant's gateway — the API answers both with the identical 404 not found, and both write a row carrying status 404 and no entity — the row never carries a gateway id (the id can come from a stored record, e.g. a trace's gateway, and must not reach your audit trail); an id taken from the URL is visible in path, stored decoded (see audit path). A malformed id — see Another tenant's gateway id — is audited the same way. The same holds for a group id or role id you cannot see — unknown, another tenant's or malformed — on the groups, roles, user-role, group_id analytics and bulk-group routes (the identical 404, no entity; see group and role ids); on PATCH and PUT role routes the body is validated first, so a malformed body answers 400 (or 403) for any id and records no such row; a group_id in a query string or request body is not stored in the row, only the route path. The same holds for a department id under /admin/v1/departments/{id}… that is unknown, another tenant's or malformed (the identical 404, no entity; see ids of another tenant); a tenant-less caller's 403 caller_has_no_tenant is recorded like any other 403 (status 403), and a storage fault (503) writes no row. The same holds for a group_ids or user_ids entry on PUT /admin/v1/gateways/{id}/agents/{agent_id}/sharing that is unknown or another tenant's (the coded 404 group_not_found / user_not_found, no entity; the ids in the body are not stored; a malformed entry answers 400 and a storage fault 503, neither recorded). The same holds for the user_id of POST /admin/v1/projects/{id}/members that is unknown, another tenant's or a deleted user (the coded 404 user_not_found, no entity), and for a deleted user in user_ids. The same holds for the user_id of POST /admin/v1/groups/{id}/members that is unknown, another tenant's or a deleted user (the plain 404, no entity, for platform admins too). For an extract-failure download that finds no capture (extract_failure_capture.download_miss), the unvalidated id from the URL is recoverable only from path (percent-decode it); the row's entity_id is empty. GET /admin/v1/extract-failures/{id}/download accepts only the exact canonical id shape (lowercase 8-4-4-4-12 hexadecimal); any other value (upper case, trailing or embedded invisible or control characters, wrong length) is answered 404 without a database lookup and recorded as download_miss. A successful download (extract_failure_capture.downloaded) records the stored capture id as entity_id. |
The signed-in user, when present. |
auth.otp_failed |
An OTP verification with an invalid or expired code (401; also a wrong code on POST /admin/auth/setup/email-code), only when the email maps to a real account. An OTP failure for an unknown email is deliberately not recorded — rotating the email would otherwise let an unauthenticated caller grow the log without bound (anti-amplification). |
The target user. |
auth.otp_blocked |
Recorded once per block episode, on the wrong guess that spends the code's last of five attempts (the response to that guess is still 401; every later attempt is 429 otp_attempt_cap and records nothing). A new code starts a new budget and a new episode. The same applies to POST /admin/auth/setup/email-code. In a multi-node deployment "once" is per node: the no-live-code counter is node-local, so an episode split across nodes can end without a row on one of them (see Where each counter lives in Authentication). |
The target user, when known. |
auth.login_denied |
A valid OTP for which no account exists (403). |
None. |
auth.password_failed |
A counted wrong password on POST /admin/auth/signin/password (401), also a break-glass attempt of a password holder who is not on the organisation's list, even with the correct password. Nothing is recorded for an address that is not a password holder (unknown, disabled, deleted, no password), for a request refused by a running lock, or for a malformed request. Never the address or the password. |
The account (actor_id), with its organisation. |
auth.static_otp_locked |
A fixed (static) sign-in code just spent its cluster-wide 24-hour budget of 20 wrong guesses (admin sign-in or partner sign-in): recorded once, on the guess that spends the last slot (that response is still 401); every later attempt is 429 otp_attempt_cap (admin sign-in) or 429 otp_failure_cap (partner sign-in) and records nothing. Never carries the code or its hash. Only static-code accounts: an ordinary e-mailed code that exhausts the budget records no row. |
The account, with its organisation (a partner has none, and is recorded as a partner actor). |
auth.static_otp_expired |
A legacy fixed (static) sign-in code was presented correctly after its 30-day grace ended (or with no grace deadline on record); the sign-in is refused 403 static_code_expired, no session is created and the attempt budget is not cleared. Never carries the code or its hash. |
The account (a partner is recorded as a partner actor). |
auth.password_locked |
The wrong password that locks the account's password sign-in (429), recorded once per lock. |
The account, with its organisation. |
auth.password_accepted |
A correct password on POST /admin/auth/signin/password issued a pending sign-in or setup token (200); the session itself is issued by the second factor. |
The account, with its organisation. |
auth.password_set |
The first password of an account was set on POST /admin/auth/setup/password (200, row started by the email code). Never carries the password or a hash. |
The account, with its organisation. |
auth.password_reset |
The password was replaced through a reset link on POST /admin/auth/setup/password (200). Never carries the password or a hash. |
The account, with its organisation. |
auth.password_changed |
The signed-in person changed their own password on PUT /admin/v1/me/password (200). Written once, after the commit, and not when the answer is a refusal, a lock or a fault. Never carries either password or a hash. A wrong current password on this route is recorded as auth.password_failed, and the one that locks as auth.password_locked. |
The account, with its organisation. |
auth.demo_denied |
A demo-login request for a slug that is not a demo account (404) — the escalation boundary for public demo links. Dormant: the public no-login demo entry is disabled, so POST /admin/auth/demo-login now returns 404 for every request before the slug lookup and this action is no longer emitted. |
None. |
sso.* / saml.* |
SSO / SAML login, logout, denial, replay, and first-link conflict (link_conflict: an e-mail-matched account already linked to another identity, 403) outcomes, the administrator unlink of an SSO identity link (sso.link_removed, target = the user, before = the removed provider, issuer and subject; see SSO links), plus account_disabled.login_denied (a disabled account with an existing link, 403; never written for an active account whose link a concurrent sign-in has just created) and account_deleted.login_denied (a link whose account was deleted and has no active account at the claim e-mail, 403), for example sso.account_disabled.login_denied or saml.account_deleted.login_denied. |
The user (when known), plus the tenant and identity-provider entity. The account_disabled.login_denied and account_deleted.login_denied rows carry no user id (tenant and identity provider only); the user id is in the gateway WARN log. |
sso.identity_linked, saml.identity_linked |
A single sign-on identity was linked for the first time to an existing account (201): the first OIDC or SAML sign-in of that person, or a sign-in that re-links an identity whose previous account was deleted. Written once per link; a repeat sign-in with the identity already linked writes nothing, and an account created by just-in-time provisioning writes jit_created instead. The person also gets the security mail "New sign-in method linked to your account" (see Security emails). Like jit_created, a success row is not mirrored to the organisation's SIEM. |
The tenant and identity-provider entity (issuer). The row carries no user id; the user id is in the gateway WARN log line first-link: identity linked to existing account. Never the e-mail or the subject. |
oauth.admin_mfa.login_denied, sso.admin_mfa.login_denied, saml.admin_mfa.login_denied |
A Myra platform admin (sys:admin) refused at a Google / Microsoft / app sign-in, an OIDC callback or a SAML ACS while admin_mfa_enforced is on (403, admin MFA). A platform row: it carries no tenant id, so it is listed for platform administrators only and is not streamed to the organisation's SIEM (the sys:admin role is Myra-internal and is not disclosed to a customer). |
The refused user as the actor; the organisation of the account in the entity id; the identity provider (provider:sub for Google / Microsoft, the issuer or SAML entity id) in the identity-provider entity id. Never the e-mail. |
impersonation.* |
Admin "View as User" start / stop / stop_failed / action / denied outcomes, dual-identity recorded. See Admin impersonation. | The admin and the impersonated user. |
support_request.emailed |
A Contact Support request left the platform by email — recorded because it carries tenant content and a named user's identity to an address outside the workspace. Carries the recipient and whether delivery succeeded, never the summary or description. A row with delivered: false means the request is still waiting in the feedback inbox. |
The submitting user, plus the tenant. During impersonation the actor is recorded as the actor and the impersonated user appears as on_behalf_of — dual-identity, like the impersonation.* rows. |
gateway.endpoint_config_changed |
A gateway config write (POST create/upsert or PATCH) that changes where the gateway's provider credentials are sent: provider_base_urls, azure_endpoint, azure_resource or hf_endpoint. before/after carry only the changed keys; a URL is recorded as its origin (https://host[:port]), followed by /… when a path, query or fragment followed it — never the full value, because any of those parts (and user info) can carry a secret. An unset value and null are the same; re-sending an unchanged value writes no row. Also listed by the gateway audit endpoint (GET /admin/v1/gateways/{id}/audit). |
The signed-in admin, plus the gateway. |
gateway.purpose_changed |
The purpose of an existing gateway changed (POST upsert or PATCH) — notably to or from disabled, the gateway kill switch (see Switching a gateway off). before / after carry the purpose value. Creating a gateway, or re-sending the stored value, writes no row. Also listed by the gateway audit endpoint (GET /admin/v1/gateways/{id}/audit). |
The signed-in admin, plus the gateway. |
gateway.provider_key.stored / gateway.provider_key.deleted |
A provider API key was stored (or replaced) / deleted on a gateway. Carries the provider and alias only — never key material. A delete that removed nothing writes no row. A plan change onto a self-serve plan also writes a .deleted row per removed own key, with reason plan_change_self_serve (actor: the signed-in admin for an admin plan change, the system for a billing-driven one). The one-time operator cleanup of legacy own keys writes the same row with reason legacy_self_serve_cleanup (actor: the system). |
The signed-in admin, plus the gateway. |
tenant.provider_key.stored / tenant.provider_key.deleted |
A tenant-scoped provider API key (anthropic-admin) was stored (or replaced) / deleted. Carries the provider and alias only — never key material. A delete that removed nothing writes no row. The row is committed in the same transaction as the key change. A write made by platform staff shows no before/after in the tenant's own audit view. A plan change onto a self-serve plan writes a .deleted row with reason plan_change_self_serve (actor user or system), or legacy_self_serve_cleanup (the one-time operator cleanup, actor system). |
The signed-in admin, plus the tenant. |
gateway.managed_model.granted / gateway.managed_model.revoked |
A Myra-provided (Platform Key) model was enabled / disabled on a gateway — the moment Myra's managed key becomes usable for it. Carries provider and model. Re-enabling an enabled model, or disabling one that was not enabled, writes no row. | The signed-in admin, plus the gateway. |
gateway.deleted |
A gateway was deleted. after carries replay_records_deleted (the gateway's stored replay records removed by the delete), replay_purge_truncated (more remain; the hourly cleanup removes them) and replay_purge_failed. Also listed by the gateway audit endpoint. |
The signed-in admin, plus the gateway. |
mcp_connector.group_created / mcp_connector.group_updated / mcp_connector.group_deleted / mcp_connector.credentials_revoked |
A group-scoped MCP connector was created, changed (visibility or groups, with the before and after group ids) or deleted; or every user's stored connections to a connector were revoked because its OAuth endpoint, server_url or scope changed (reasons only, never a secret). Each row is committed in the same transaction as the change it records: if the row cannot be written the change is not made (503 retryable, or a sanitised 500). A connector that vanished mid-request records no row. credentials_revoked is its own transaction and, in a PATCH that also changes the groups, precedes the group_updated row. See MCP connectors. |
The signed-in admin, plus the connector. |
turn_replay_record.orphan_gateway_purged |
The hourly cleanup removed replay records left behind by an already-deleted gateway (a purge cut short at delete time, or a record written while the delete ran). One row per committed batch of a gateway; after carries records, batch (1-based) and truncated (set only on the last batch when the run stopped at its batch limit). A batch that fails, or whose row cannot be written, is rolled back and the next hourly run retries; a zero-count status row with failed: true and a reason records the stop. Counts only, never content. |
system, plus the tenant and the deleted gateway's id. |
guardrail_masker.deactivated |
A gateway config write (PATCH or POST to an existing slug) that deactivates a PII-masking detector — toggling its enabled to false or removing it. Deactivating a masker lets that PII flow to the model unmasked (see Guardrails → enabled), so who/which/when is recorded. Carries the detector name and type only — never its keywords or entities. |
The signed-in admin, plus the gateway. |
user.budget_cap_changed |
A member's optional personal budget was set, changed or reset (PUT /admin/v1/users/{id}/budget-cap). before / after carry budget_mode (inherit, none or amount) and budget_usd (USD, null unless the mode is amount). Written in the same transaction as the change. |
The signed-in admin, plus the tenant and the user. |
user.static_otp_set / user.static_otp_cleared |
A user's fixed sign-in OTP was set or cleared by a platform admin (PUT /admin/v1/users/{id}/static-otp, details). Never carries the code or its hash. Committed in the same transaction as the change: if the row cannot be written the change is not made (503 retryable, or a sanitised 500). A user that vanished mid-request records no row. |
The signed-in admin, plus the tenant and the user. |
auth.webauthn_sign_count_regressed |
A passkey or security key presented a signature counter equal to or below the stored one on a signed assertion (catalogue E32, a possible cloned key); the proof is refused with 401 wrong_second_factor (details). A duplicate submit of one assertion (a double click) can also record it. Carries no counter value, credential id or key. For a member of an organisation it is also sent to the organisation's SIEM stream. |
The user (actor), plus the tenant and the factor id. |
auth.second_factor_added |
A first passkey or security key was stored by POST /admin/auth/setup/webauthn (MAP-4106), or a first authenticator app by POST /admin/auth/setup/totp/confirm (MAP-4098) or POST /admin/v1/me/factors/totp/confirm (MAP-4099), or a passkey or security key by POST /admin/v1/me/factors/webauthn (MAP-4107, after the commit). Written on success only, in the same request. entity_id is the factor id (user_mfa_factor); the kind (passkey, security_key or app) is read from that row. Carries no credential, TOTP secret, code, challenge or token. Refused and counted attempts are not audited here; they are counted in the pending row and the account's failure counter (PCI 10.2.1.4 evidence is the attempt table and the request log). |
The user, plus the tenant. |
auth.second_factor_moved |
A signed-in person moved their authenticator app to a new device (POST /admin/v1/me/factors/totp/confirm after me/factors/totp/move, MAP-4099). Written on success only, after the commit. entity is user_mfa_factor, entity_id the unchanged factor id. Carries no secret, code or token. |
The user, plus the tenant. |
auth.second_factor_renamed |
A signed-in person renamed a factor (PATCH /admin/v1/me/factors/{id}, MAP-4100). Written on success only, in the same transaction. entity is user_mfa_factor; after is { type, kind }. The name is never recorded. |
The user, plus the tenant. |
auth.second_factor_removed |
A signed-in person removed a factor (POST /admin/v1/me/factors/{id}/remove, MAP-4100). Written on success only, in the same transaction as the delete. entity is user_mfa_factor; after is { type, kind }, never the name. |
The user, plus the tenant. |
auth.second_factor_failed |
A well-formed second factor was refused at POST /admin/auth/signin/finish (401 wrong_second_factor, details). The wrong attempt is counted before it is verified, so a parallel burst cannot exceed the cap. The 429 answers (factor_attempt_cap, factor_failure_cap) write no row, so a refused burst cannot flood the log; the request log and the attempt table are the evidence. Never carries the factor, a code or a token. |
The signed-in-to-be user, plus the tenant. |
auth.second_factor_accepted |
A second factor was accepted at POST /admin/auth/signin/finish, whether it then issued a session or moved a reset-link row to the new-password step. Never carries the factor or a token. |
The user, plus the tenant. |
auth.setup_completed |
POST /admin/auth/setup/finish issued a session and ten recovery codes. Written in the same database transaction that spends the setup row and stores the code hashes. after carries amr (the second factor kind) and recovery_codes_issued (10); never a code or a hash. |
The user, plus the tenant. |
user.second_factor_reset |
An admin removed a member's second factors and recovery codes (POST /admin/v1/users/{id}/second-factor/reset, details). Written on success only, in the same database transaction as the reset (when the audit row cannot be written, nothing is reset). after carries counts only (factors removed, recovery codes voided, sessions and device logins ended), never a factor name, id or token. |
The signed-in admin, plus the tenant and the user. |
user.recovery_codes_regenerated |
A person created new recovery codes (POST /admin/v1/me/recovery-codes, details). Written in the same database transaction as the new set, so the row exists exactly when the old set was voided. after.issued is the number of codes made (10). Never carries a code or a hash. Using a recovery code at step-up writes no audit row. |
The signed-in person, plus the tenant and the user. |
user.password_reset_link_sent |
An admin sent a member the password reset link (POST /admin/v1/users/{id}/password-reset-link). Written on success only. Never carries the link or its token. |
The signed-in admin, plus the tenant and the user. |
user.signin_unlocked |
An admin ended a member's password sign-in lock (POST /admin/v1/users/{id}/signin-unlock). Written on success only. before.locked_until is present only when a live lock was ended; after.lock_ended says whether one was (false when it expired in between). |
The signed-in admin, plus the tenant and the user. |
tenant.default_role_changed |
A tenant's default role for newly provisioned accounts was changed (PATCH /admin/v1/tenants/{id}, default_role). before / after carry default_role. Under config approval the row is written when the held change is applied. |
The signed-in admin, plus the tenant. |
tenant.member_budget_changed |
A tenant's default per-member spend limit for new accounts was changed (PATCH /admin/v1/tenants/{id}). before / after carry member_budget_mode and member_budget_usd (null unless the mode is amount). |
The signed-in admin, plus the tenant. |
tenant.signin_policy_changed |
A tenant's sign-in option and/or Myra's enforcement flag was changed (PUT /admin/v1/tenants/{id}/signin-policy). before / after carry signin_policy and enforced (a malformed stored value is recorded as "malformed"). A write that changes nothing still writes the row. The row is committed in the same transaction as the change; a refused request writes no row. |
The signed-in admin (organisation admin or platform admin; while viewing as a user, that user, with the viewing admin recorded as the impersonator), plus the tenant. |
group.member_budget_changed |
A group's per-member spend limit was set, changed or reset (PUT /admin/v1/groups/{id}/member-budget). before / after carry member_budget_mode (inherit, none or amount) and member_budget_usd (USD, null unless the mode is amount). Written in the same transaction as the change. |
The signed-in admin, plus the tenant and the group. |
conversation.residency_released |
A conversation was moved out of a project that restricts data residency (Local only or PII mandatory) — detached, or moved elsewhere. The move itself requires owner rank on that project, so this is an authorised act; it is recorded because it is the moment a residency restriction stops applying to that conversation's future turns. Carries the project it left and that project's tier. | The signed-in user, plus the conversation. |
project.conversations_released |
A project that restricts data residency was deleted while it still held conversations. Deleting detaches every one of them — including other members' — so the restriction is lifted from all of them at once. Carries the project's tier and the number of conversations released. | The deleting admin, plus the project. |
workflow.run_budget_changed |
A workflow's run budget was set, changed or cleared (PATCH /admin/v1/gateways/{gw}/workflows/{id}). before / after carry run_budget_micros (null = no cap). Not written when the value is unchanged. |
The signed-in admin, plus the gateway. |
workflow.content_withheld |
A workflow run stopped before its first step because its trigger content (an email body or attachment, or a form upload) could not be masked and was withheld. Entity workflow_run; after carries cause (config_unavailable, mandate_no_masker, masker_unavailable, masker_error, budget_exhausted), trigger_kind (email / form), the withheld fields and workflow_id. No content, sender or subject. |
The system (no actor), plus the gateway. |
project.owner_handed_over |
A project that would have been left without an effective owner by a soft-delete path (user delete, self-delete, move to another tenant, tenant delete with its users, SCIM deprovision) or by an identity-provider group-membership write (SCIM group member remove / replace / unlink, SAML claim sync, OIDC claim sync, SCIM department sync) was handed to a live admin of the project's tenant. One row per project, in the same transaction. after carries reason (user_deleted, tenant_deleted, user_moved, scim_deprovision, scim_group_member_removed, scim_group_members_replaced, scim_group_unlinked, saml_claim_sync, oidc_claim_sync, scim_attr_sync) and the successor. |
The acting admin; self for a self-delete; system for SCIM deprovision and identity-provider group sync. |
project.conversation_retention_changed |
A project's conversation retention period (Löschfrist) was changed. Carries the new value only — retention days are not personal data. | The signed-in admin, plus the project. |
tenant.provider_allowlist_changed |
The tenant-wide provider allowlist floor or its enforced flag was changed by a platform admin (details). before / after carry the changed field(s); null means no floor, [] means deny all. |
|
tenant.model_block_added / tenant.model_block_removed |
A model was blocked / unblocked for the whole tenant (details). Carries provider and model. Re-blocking a blocked model or removing an absent block still writes the row of the request that was made. | The signed-in admin, plus the tenant. |
tenant.conversation_retention_changed / tenant.request_log_retention_changed |
A tenant's conversation / request-log Löschfrist was changed. The conversation period is changed by a platform admin only. For the request log, a tenant admin may change the effective retention within the platform ceiling, and a platform admin changes the ceiling (request_log_retention_max_days); lowering the ceiling below a longer effective value clamps it down, and the row then carries both request_log_retention_days and request_log_retention_max_days before/after. A tenant-admin change held for four-eyes approval is audited when it is applied. Written only on an actual change — an unchanged echo on a tenant save emits no row (previously every save that carried the field did). Before/after values only. |
The signed-in admin, plus the tenant. |
request_log.content_read |
Request content (prompt / answer) was read through the admin API: GET /logs without metadata_only=1, GET /logs/{id}, POST /logs/{id}/read, a trace detail (GET /traces/{id}) or POST /traces/{id}/read. Written before the content is sent; if the write fails the call is a 500 with no content. after carries the caller's reason (from X-Read-Reason or the reason of a POST .../read body) and scope (detail, list, trace); a list read adds count and ids and writes one row per tenant on the page (none for an empty page). The content itself is never recorded. |
The signed-in user, plus the row's tenant (entity type request_log, or playground_trace for a trace). |
tenant.content_logging_disabled_changed |
A workspace's privacy mode was switched. Written only on an actual change; before/after content_logging_disabled. |
The signed-in admin, plus the tenant. |
tenant.named_reports_enabled_changed |
A workspace's named-person reports policy was switched. Written only on an actual change; before/after named_reports_enabled. |
The signed-in admin, plus the tenant. |
tenant.answer_corrections_enabled_changed |
A workspace's AI-answer corrections policy was switched. Written only on an actual change; before/after answer_corrections_enabled. |
The signed-in admin, plus the tenant. |
tenant.web_search_confirmation_enabled_changed |
A workspace's web-search confirmation policy was switched. A direct change audits only an actual change; a change held for four-eyes approval is applied and audited as approved (under the requester), even if the value already matches by then. Before/after web_search_confirmation_enabled. |
The signed-in admin (the requester for an approved change), plus the tenant. |
tenant.report_min_group_size_changed |
A workspace's smallest group size in reports was changed. Written only on an actual change; before/after report_min_group_size. |
The signed-in admin, plus the tenant. |
tenant.approval_ttl_default_changed |
A workspace's default approval waiting time for new agents was set, changed or cleared (immediately, or when a held change was approved). Written only on an actual change; before/after approval_ttl_default_s (null = not set). |
The signed-in admin (the requester for an approved change), plus the tenant. |
tenant.protection_thresholds_changed |
A workspace's automatic agent protection settings changed (immediately, or when a held change was approved). Written only on an actual change; before/after carry all six settings (protection_deny_burst_count, protection_deny_burst_window_s, protection_volume_factor, protection_rejection_count, protection_rejection_window_s, protection_count_expiries). |
The signed-in admin (the requester for an approved change), plus the tenant. |
analytics.named_report_viewed |
A person-level analytics report was revealed (GET /stats/analytics?anonymize=0). Written for every allowed reveal, platform administrators included; carries the requested scope, never the revealed data. |
The viewer, plus the tenant (entity_id global for an unscoped platform-administrator view). |
model_price.create / model_price.update / model_price.delete / model_price.deprecate / model_price.undeprecate / model_price.markup / model_price.sync |
A model price changed (prices are billing-relevant). One row per actual change of a model_price row: through the admin API (PUT/DELETE /model-prices…, deprecate, un-deprecate, markup), by the health prober's auto-deprecation, and by every provider sync — a price it adds or reprices, a model it deprecates or restores (the scheduled syncs as well as POST /model-prices/sync). before / after hold the provider, model, the per-1k prices, markup and deprecation state; after.source is admin, prober, sync, myra_sync or openrouter_sync. A manual POST /model-prices/sync additionally writes one model_price.sync row with the scope it ran (after.scope: the named source, or * for a full sync) and the per-provider counts; a request refused with 400 (unknown or malformed ?provider=) runs nothing and writes no row. A write that changes nothing (re-saving identical prices, a delete or un-deprecate that matches no row or a row that is not deprecated, a probe that does not flip the row) writes no row. If the before-image cannot be read, an admin change is refused (503, retry) rather than made unaudited; a sync logs the failed read and continues. |
The signed-in admin — under "View as User" the real admin, with the viewed user in after.impersonated_user_id; a scheduled sync is recorded with actor_type: system. |
role.created / role.updated / role.permissions_changed / role.deleted |
A custom role was created, renamed or re-described, had its permission set replaced, or was deleted. Committed in the same transaction as the change (if the row cannot be written the change is not made: 503 retryable, or a sanitised 500); a refused request (400, 403, 404, 409) writes no role.* row (a 403 is recorded as access.denied). Entity is the role. tenant_id is the acting tenant. role.created after = {name, description, perm_keys}; role.updated before / after = {name, description}; role.permissions_changed before / after = {perm_keys} (sorted lists, the before read in the same transaction as the write, so a re-order alone is not a change); role.deleted before = {name, perm_keys}. |
The calling user. |
role.assigned / role.unassigned |
A custom role was assigned to, or removed from, a user. Entity is the user. role.assigned after = {role_id, role_name} and is written only when an assignment row was actually inserted (the idempotent repeat PUT writes none); role.unassigned before = {role_id}. |
The calling user. |
scim.user_updated |
A SCIM PUT / PATCH changed a user. after = {source: "scim", fields_set} where fields_set lists the attribute names the request sent (fields sent, not a proven change; a same-values update still writes a row) — never their values (no name, email or other personal data is stored). Written in the same transaction as the change. |
None (actor_type system); actor_ip is the SCIM caller's address. |
scim.user_department_changed |
A SCIM request changed a user's stored Department. before / after = {department_id, department_source, effective_department_id}, and after additionally carries source: "scim"; after.unknown_department: true when the IdP sent a name no Department of the tenant has. No row when nothing changed. |
None (system). |
chat_bridge.connection_created / chat_bridge.connection_deleted |
A chat-bridge connection was created or deleted. Entity is chat_bridge_connection. The audit row is written in the same transaction as the change: if the audit write fails the change is rolled back and the request fails. |
The signed-in administrator. |
saml_config.metadata_refreshed |
The daily IdP metadata refresh changed a tenant's SAML configuration. after carries changed (the field names) and the SHA-256 fingerprints of the previous and new signing certificates (old_cert_sha256, old_cert_next_sha256, new_cert_sha256, new_cert_next_sha256); the certificates themselves are not logged. No row when nothing changed. |
None (system). |
saml_config.metadata_refresh_failed |
The daily IdP metadata refresh failed (unreachable, invalid, or entity ID mismatch); the stored configuration is unchanged. after.error carries the short reason. |
None (system). |
saml.user_department_changed / oidc.user_department_changed |
A SAML or OIDC login changed a user's stored Department: through the tenant's department_attribute (SAML) or through a group_mapping department target (SAML or OIDC; the mapping then owns the Department and department_attribute is not consulted). before / after = {department_id, department_source, effective_department_id}, and after additionally carries source: "saml" or "oidc"; after.unknown_department: true when the IdP sent a name (or the mapped id) no Department of the tenant has. No row when nothing changed. |
None (system). |
user.custom_role_changed_by_idp |
An identity-provider sync (SAML, OIDC or SCIM) changed the custom roles granted to a user through a group-mapping role target. before / after carry the role_ids; after.source is the lane (saml_claim, oidc_claim, scim_attr). Actor: system. |
|
scim.group_created / scim.group_renamed / scim.group_unlinked |
A SCIM group was created (after = {source, name, idp_group_id}), renamed (before = {name}, after = {source, name}) or unlinked by DELETE (before = {scim_member_count}, after = {source}). Entity is the group. |
None (system). |
scim.group_member_added / scim.group_member_removed |
A SCIM group gained (after = {source, user_ids, count}) or lost (before = {user_ids, count}, after = {source}) members. One row per request, listing only the members that actually changed (user_ids sorted, at most 500, with truncated: true when count is larger). A re-add of existing members, an add of users outside the tenant, or a removal of non-members or manually added members changes nothing and writes no row. |
None (system). |
scim.group_members_replaced |
A SCIM PUT / PATCH replaced or cleared a group's whole member set. before / after = {member_ids} read from the database (sorted), each list capped at 500 ids; a capped list adds truncated: true and count (the full size). No row when the full before and after lists are equal. |
None (system). |
gateway.config_changed |
A gateway config write (POST create, PATCH) changed the guardrail-relevant config: log_payloads, any detector, a role_policies entry, or a write-only secret leaf (secrets.<section>.<leaf>, recorded only as a (previous value) / (new value) / null marker, never the value or a hash; a supplied leaf counts as changed even when identical, because that is a rotation). The guardrail-config import writes the same diff under the action guardrail_config.import. Entity is the gateway; see Gateway config audit. |
The calling user. |
source_policy.lowered |
A source policy was made looser and the change was applied: a connector's source policy (PATCH /admin/v1/mcp/{id} tool_policy.source), a gateway's built-in sources (config.source_policy, POST / PATCH gateway) or the organization's minimum for every source (source_policy_floor, PATCH /admin/v1/tenants/{id}) — written once per applied change, together with the change's own entry (mcp_connector.tool_policy_set, gateway.config_changed, tenant.source_policy_floor_changed); one entry per lowered built-in source. Entity is the connector, gateway or organization. after carries levels and ids only: source (kind connector, builtin or tenant_floor, and id: the connector id, web_pages / web_search / knowledge_files, or the organization id), cells (every looser cell, e.g. {"cell": "pii.input", "from": "mask", "to": "allow"}; for the minimum, null = no minimum), trust (from / to, only when the trust class changed), requested_by, approved_by and approval_id (the config approval that applied it), direct (true when it was written without an approval — then approved_by and approval_id are null). A held change writes this entry only when it is approved and applied; a tightening never writes one. before is empty. |
The requester. |
Every *.retention_purged / purge deletion-log row is written in the same transaction as the batch it records (one row per committed batch, with a 1-based batch and truncated set only on the last batch; a batch whose row cannot be written is rolled back and retried), so a deleted batch always has its row. A sweep that stops on a fault adds one zero-count status row with failed: true and a reason (batch_fault, audit_row_failed, lease_not_obtained); failed is absent on ordinary batch rows. reason: lease_not_obtained is informational: another node held the sweeper lease, and the work follows on a later tick. audit_log.retention_purged is one row per pruned checkpoint range (from_seal_seq, up_to_seal_seq, pruned), and a purged organisation's registry removal writes its own tenant.billing_evidence_deleted row with registry_cleared: true. See Data retention.
Apart from the documented before / after values (the configuration, retention, role.*, scim.*, gateway.config_changed and model_price.* rows), these rows record only the actor ID, source IP, method, path, status, and action (status is 0 on rows written by a background job or a write-side event rather than a request outcome). A failed-login attempt never stores the submitted email address, OTP code, password, or any token — no secret or account-enumeration data enters the audit log.
SIEM streaming
Security-event failures (status >= 400) that can be attributed to a tenant are also streamed to that tenant's configured SIEM under the security event category. A SIEM with no explicit siem.events list receives them by default; a SIEM configured with an explicit events list must include security (or all) to receive them — a list that omits both (for example ["blocked"]) streams no security events, though the durable audit-log row is always written regardless. Successful logins/logouts are recorded in the audit log but are not streamed, so routine authentication cannot trip SIEM alerting. Events that are recorded but cannot be attributed to a tenant (for example an auth.login_denied for a valid OTP with no matching account) are kept in the durable audit log — retrievable by a platform administrator below — but are not streamed to any SIEM. The *.admin_mfa.login_denied refusals are such platform rows on purpose: they carry no tenant id, so they are never streamed (see the row above).
Governance decisions are streamed under the governance event category (on by default, included by all; an explicit siem.events list without governance streams none; tenant-level configuration only): approval decisions on held tool calls (APPROVAL_DECISION, including expiry), automatic agent pauses (AGENT_PAUSED) and resumes (AGENT_RESUMED), decisions on held configuration changes (CONFIG_APPROVAL_DECISION), admin configuration changes written to this audit log (ADMIN_CONFIG_CHANGE) and the external delivery of agent and workflow results with personal data held, released or blocked (DELIVERY_HELD, DELIVERY_RELEASED, DELIVERY_BLOCKED). Each decision is sent once, after it is saved. An ADMIN_CONFIG_CHANGE is sent for saved admin configuration entries, including organization settings saved with PATCH /admin/v1/tenants/{id} (and its /document-ai route), a governance template apply and a held four-eyes change — the held change only when it is applied, never when it is requested; a refused or failed save sends nothing. Departments, webhook triggers, member budget caps (also an approved limit request), budget resets, provider keys removed by a plan change, a member moved to another organization, an administrator's erasure of a member and the organization's account group set by Myra staff are streamed the same way: once per saved entry, after the save, once even when the save was retried. Entries whose actor is the member themselves (actor_type self: deleting or erasing their own account) or the system are not admin configuration changes and are not streamed; the deletion of the organization itself is not streamed either (its SIEM target is no longer read once it is deleted). An ADMIN_CONFIG_CHANGE carries the action, the entity and the names of the changed fields — never their values (before / after are not streamed), so no token, key, password or credential reaches the SIEM. It also carries the audit event id: the id of the entry here (audit_event_id, CEF externalId); an AGENT_PAUSED carries the id of its agent.protection_paused entry the same way (pause_event_id). Either is left out when the database reports no id. Actors are rendered as in the tenant audit view (member id, Myra staff stf_<16 hex>, Myra staff, erased); a decision or change made under "View as User" is credited to the impersonating staff account, never the viewed user, and carries no actor IP. Fields, CEF keys and examples: SIEM › Governance events.
Tenant audit log
A tenant administrator reads their own workspace's audit trail. This is separate from the platform listing above: it is fenced to the tenant in the path and never shows Myra staff identities.
| Route | Result |
|---|---|
GET /admin/v1/tenants/{id}/audit |
Keyset-paged JSON |
GET /admin/v1/tenants/{id}/audit/export |
Streamed CSV (audit-log.csv), at most 50,000 rows |
POST /admin/v1/tenants/{id}/audit/verify |
Read-only integrity check, projected onto the tenant (see Verifying integrity from the tenant) |
The Audit log page in the admin UI (Organisation › Governance & security, and Platform › Compliance) is built on these routes; see Audit log.
Required permission: TENANT_AUDIT_VIEW (View the tenant audit log, a tenant_admin gate-class permission, held by admin and tenant_admin; delegable to a custom role). The caller must also have access to the tenant in the path. A tenant you cannot access (unknown or another tenant's) is answered with the identical 404; a caller without TENANT_AUDIT_VIEW receives 403.
Query parameters (all optional; each may be given once and must not be empty):
| Parameter | Applies to | Description |
|---|---|---|
limit |
JSON only | Page size, 1 to 500, default 100. |
cursor |
JSON only | The next_cursor of the previous page (<ts_ms>_<id>). |
action |
both | Exact action name (lowercase letters, digits, _, ., -; at most 128 characters). |
entity_type |
both | Exact entity type (same charset; at most 64 characters). |
from_ms, to_ms |
both | Inclusive time window in epoch milliseconds. from_ms after to_ms is rejected. |
An unknown parameter, a repeated or empty parameter, a malformed cursor, an out-of-range limit or an invalid filter value is 400 { "error": "...", "code": "bad_param" }. limit and cursor are not accepted by the export. A database fault is 503, never an empty list. Paging is stable across rows with the same timestamp (no gap, no duplicate). Tool-access decision seal-mirror rows are excluded.
JSON response:
{ "items": [ { "id": "812", "ts": 1700000000, "ts_ms": 1700000000123,
"actor": { "kind": "user", "id": "u-1", "ip": "198.51.100.7" },
"actor_type": "user", "method": "PUT", "path": "/admin/v1/users/u-2/role", "status": 200,
"action": "user.role_changed", "entity_type": "user", "entity_id": "u-2", "gateway_id": null,
"sealed": true, "seal_seq": "41", "chain_hash": "…", "prev_hash": "…",
"before": { "role": "member" }, "after": { "role": "admin" } } ],
"next_cursor": "1700000000123_812",
"chain": { "audit_chain_enabled": true, "sealed_through_ms": 1700000000000 } }
seal_seq is a decimal string (it can exceed the exact range of a JSON number). A staff row carries no actor_type. next_cursor is null on the last page. chain.audit_chain_enabled is true, false, or null when the state cannot be determined. chain.sealed_through_ms is the time (epoch milliseconds) of this tenant's newest sealed entry, or null when the chain is not on (false / null) or none of the tenant's entries is sealed yet. It is tenant-wide, not narrowed by the filters (the SCIM sync log, which shares this response shape, carries it too). Entries are sealed by an hourly job, so the newest hour is normally unsealed. If it cannot be read, the whole list answers 503, never null.
Actor kinds. actor.kind is user (a workspace member, or an erased one), system (a background job or scheduler) or staff (Myra staff acted in the workspace). The exact rendering for every case, on every surface that shows an actor, is the table under Actor rendering. A staff row carries no actor_type; support_ref is always null.
Actor rendering
This is the single statement of how an actor is shown to a workspace. The tenant audit log (JSON and CSV), the audit_logs.csv file of the data export, the config approvals (inbox and export), the support access grants a tenant admin sees, the access decisions and the agent delivery approvals all follow it; those pages describe only the fields they add.
Rules that apply to every row:
- A row written under an impersonated request is classified by the impersonator, not by the impersonated user, and by the impersonator's role and home workspace as they are when the log is read, not as they were when the action happened. A role change later changes how old rows are shown.
- An impersonator is Myra staff when they hold the platform-administrator role, have no role or no home workspace, belong to another workspace, or when the impersonation context cannot be read. An impersonator who is an ordinary member of this same workspace is shown as that member. An impersonator whose account has since been erased is shown as
erased. - An account that holds the platform-administrator role is Myra staff on every surface, even when it also holds a workspace role such as tenant admin. Holding a workspace role in addition never identifies the account as the actor of a row; the same applies when it acts directly and when it acts as the impersonator. An account holding both the platform-administrator role and a workspace role is a short-lived state: the periodic role reconciliation reduces an account with several system roles to its lowest-ranking one. While the state lasts every surface shows the account as Myra staff; afterwards it is shown by the role it then holds.
- Staff are never identified. The stored actor id, the source IP and the impersonator id are not returned; the label is
Myra staffandstaff_idis the pseudonymstf_<16 hex>, stable per workspace so repeated actions can be correlated. If the pseudonym key is unavailable the pseudonym isnull(absent in config approvals) and the identifiers are still withheld. - A past action of a staff member whose account has since been erased is shown as kind
userwith iderased, never the former id. - Rows older than 730 days are unlinked from their impersonation; the impersonator is then no longer shown.
Reading the tables: stored is the value kept on the row, null is a JSON null, absent means the field is not returned, of actor / of impersonator is the pseudonym of that person, none means a staff row that carries no pseudonym at all (staff_id is null), and - means not applicable.
Audit log actor (tenant audit API and CSV, and audit_logs.csv in the export). Every impersonated row renders the same whatever the impersonated user is, including a system actor.
| Case | Situation | kind | id | ip | staff_id | redacted |
|---|---|---|---|---|---|---|
direct_user |
A live member acted directly | user |
stored |
stored |
- | no |
direct_system |
A background job or scheduler | system |
stored |
stored |
- | no |
direct_erased |
The acting account has been erased | user |
erased |
stored |
- | no |
direct_platform_admin |
A platform administrator acted directly | staff |
absent |
absent |
of actor |
yes |
direct_dual_role |
An account that is both a platform administrator and a tenant admin of this workspace acted directly | staff |
absent |
absent |
of actor |
yes |
direct_tenant_admin |
A tenant admin who is not a platform administrator acted directly | user |
stored |
stored |
- | no |
imp_staff_platform_admin |
Impersonator holds the platform-administrator role | staff |
absent |
absent |
of impersonator |
yes |
imp_staff_dual_role |
Impersonator is both a platform administrator and a tenant admin of this workspace | staff |
absent |
absent |
of impersonator |
yes |
imp_staff_no_home |
Impersonator has no home workspace | staff |
absent |
absent |
of impersonator |
yes |
imp_staff_other_tenant |
Impersonator belongs to another workspace | staff |
absent |
absent |
of impersonator |
yes |
imp_staff_no_role |
Impersonator has no readable role | staff |
absent |
absent |
of impersonator |
yes |
imp_staff_unreadable |
The impersonation context cannot be read | staff |
absent |
absent |
none |
yes |
imp_member |
Impersonator is a member of this workspace | user |
impersonator |
stored |
- | no |
imp_erased |
Impersonator account has been erased | user |
erased |
null |
- | yes |
redacted means the before/after diff is withheld (diff_omitted: true). For imp_erased the actor_type is withheld as well, and the stored IP is not kept, unlike direct_erased.
Config approval requester (requested_by and requested_via). own rule means requested_by follows the requester's own rows of this table (a plain id, Myra staff for a platform administrator, erased for an erased account). In requested_by, "" means the requester was erased while the request was being applied; in requested_via, "" means the impersonating account was erased while the request was being applied.
| Case | Situation | requested_by | requested_via | requested_via without key |
|---|---|---|---|---|
cfg_direct |
Requested directly by a live member | id |
absent |
absent |
cfg_imp_erased_applying |
Impersonated request by a member requester; the impersonating account was erased while the request was being applied | id |
"" |
"" |
cfg_direct_platform_admin |
Requested directly by a platform administrator | Myra staff |
stf of requester |
absent |
cfg_direct_dual_role |
Requested directly by an account that is both a platform administrator and a tenant admin of this workspace | Myra staff |
stf of requester |
absent |
cfg_imp_erased_applying_platform_admin |
Impersonated request by a platform-administrator requester; the impersonating account was erased while the request was being applied | Myra staff |
"" |
"" |
cfg_direct_erased |
Requester account has been erased | erased |
absent |
absent |
cfg_imp_erased_applying_erased |
Impersonated request by an erased requester; the impersonating account was erased while the request was being applied | erased |
"" |
"" |
cfg_requester_empty |
The requester was erased while the request was being applied | "" |
absent |
absent |
cfg_via_staff |
Impersonated by staff, for any of the staff reasons above | Myra staff |
stf of impersonator |
absent |
cfg_via_unreadable |
Impersonated, but the impersonation context cannot be read | Myra staff |
absent |
absent |
cfg_via_member |
Impersonated by a member of this workspace | own rule |
id of impersonator |
id of impersonator |
cfg_via_erased |
Impersonated by an erased account | own rule |
erased |
erased |
Config approval decider (decided_by). absent means the request is undecided.
| Case | Situation | decided_by | without key |
|---|---|---|---|
dec_member |
Decided by a live member | id |
id |
dec_platform_admin |
Decided by a platform administrator | Myra staff stf_… |
Myra staff |
dec_dual_role |
Decided by an account that is both a platform administrator and a tenant admin of this workspace | Myra staff stf_… |
Myra staff |
dec_erased |
Decider account has been erased | erased |
erased |
dec_null |
Not decided yet | absent |
absent |
dec_empty |
Stored as the empty marker | "" |
"" |
Free text in config approvals. In a config approval's summary, apply_error and (export only) payload, every occurrence of an id the row renders as staff is replaced by the same text the row shows for that person, and the id of an erased requester, impersonator or decider by erased. Matching ignores letter case and reaches every depth of the payload, in values and in keys. When two keys of one payload object become the same text, both values are kept: the later key in the sorted order of the original keys gets #2 (then #3, and so on) appended. The inbox applies this to summary and apply_error; the export applies it to summary, apply_error and payload.
| Case | Situation | id in the text becomes | without key |
|---|---|---|---|
txt_staff_requester |
The requester is a platform administrator and nobody impersonated them | Myra staff stf_… |
Myra staff |
txt_staff_impersonator |
The impersonator is Myra staff | Myra staff stf_… |
Myra staff |
txt_staff_requester_via_member |
The requester is a platform administrator and a member of this workspace impersonated them | Myra staff |
Myra staff |
txt_staff_requester_via_erased |
The requester is a platform administrator and an erased account impersonated them | Myra staff |
Myra staff |
txt_staff_target |
The user who was impersonated by Myra staff | Myra staff |
Myra staff |
txt_staff_decider_dual_role |
The decider is both a platform administrator and a tenant admin of this workspace | Myra staff stf_… |
Myra staff |
txt_staff_decider |
The decider is a platform administrator | Myra staff stf_… |
Myra staff |
txt_erased_requester |
The requester account has been erased | erased |
erased |
txt_erased_impersonator |
The impersonator account has been erased | erased |
erased |
txt_erased_decider |
The decider account has been erased | erased |
erased |
txt_member |
A live member of this workspace | id |
id |
Support access grant actors (requested_by, approved_by, decided_by and revoked_by, as a tenant admin sees them in the list and in the approve, deny and revoke answers). requested_by is always a platform administrator, so it is never shown as an id. The other three follow the same rules as above: a platform administrator, a user without a role or home workspace, or a user of another workspace is Myra staff; an erased account is erased; a live member of this workspace keeps the id. A field that is not set (a pending grant has no approver) is not returned. The platform administrator who made the request still sees the stored ids in their own list and answers.
| Case | Situation | value | without key |
|---|---|---|---|
sg_requester |
requested_by, the requesting platform administrator |
Myra staff stf_… |
Myra staff |
sg_requester_erased |
requested_by, the requester's account has been erased |
erased |
erased |
sg_actor_member |
approved_by, decided_by or revoked_by is a live member of this workspace |
id |
id |
sg_actor_staff |
approved_by, decided_by or revoked_by is a platform administrator |
Myra staff stf_… |
Myra staff |
sg_actor_dual_role |
approved_by, decided_by or revoked_by is both a platform administrator and a tenant admin of this workspace |
Myra staff stf_… |
Myra staff |
sg_actor_erased |
approved_by, decided_by or revoked_by account has been erased |
erased |
erased |
sg_actor_null |
The step has not happened yet | absent |
absent |
Access decision actors (owner_id and acting_user_id, with owner_name and acting_user_name, in the access decisions list, detail and CSV export a tenant admin sees). The two fields follow the same rules, and a name is returned only together with a live member's id. The platform view of the same records stays unredacted. The tenant SIEM stream renders them like the tenant view: a Myra staff account appears as Myra staff stf_<16 hex> (bare Myra staff when the pseudonym key is not configured), an erased or unclassifiable account as erased, and a live member of your workspace as the member's id. A staff or erased id is never sent in the clear. If the record cannot be read when the event is sent, the event is still delivered without the two ids.
| Case | Situation | id | name | id without key |
|---|---|---|---|---|
ad_member |
A live member of this workspace | id |
name |
id |
ad_platform_admin |
A platform administrator | Myra staff stf_… |
null |
Myra staff |
ad_dual_role |
An account that is both a platform administrator and a tenant admin of this workspace | Myra staff stf_… |
null |
Myra staff |
ad_no_home |
An account without a home workspace | Myra staff stf_… |
null |
Myra staff |
ad_other_tenant |
An account that belongs to another workspace | Myra staff stf_… |
null |
Myra staff |
ad_no_role |
An account without a readable role | Myra staff stf_… |
null |
Myra staff |
ad_erased |
The account has been erased | erased |
null |
erased |
ad_null |
No owner or acting user is recorded | null |
null |
null |
The people offered in the access decisions filter (facets.people) follow the same rules. Staff appear once, under their pseudonym; erased accounts and staff without a pseudonym are left out.
| Case | Situation | id | name | id without key |
|---|---|---|---|---|
adf_member |
A live member of this workspace | id |
name |
id |
adf_staff |
A platform administrator, or any of the other staff reasons above | stf_… |
Myra staff stf_… |
absent |
adf_staff_no_key |
A staff person while the pseudonym key is unavailable | absent |
absent |
absent |
adf_erased |
The account has been erased | absent |
absent |
absent |
The user_id filter takes a member's id or the stf_<16 hex> value of a staff person from the filter choices. It never reveals who the value belongs to: a value that matches nobody in the time window returns an empty list. While the pseudonym key is unavailable no stf_ value can match, so the answer is always an empty list (never 422).
| Case | Situation | with key | without key |
|---|---|---|---|
adq_stf_match |
stf_… value of a staff person who acted in the window |
matches |
empty |
adq_raw_member |
The id of a live member of this workspace | matches |
matches |
adq_raw_staff |
The stored id of a staff person | empty |
empty |
adq_raw_erased |
The stored id of an erased account | empty |
empty |
adq_raw_other_tenant |
The id of an account of another workspace | empty |
empty |
adq_narrow_window |
stf_… value that matched nobody in a window too wide to search completely |
422 narrow_window |
empty |
Review item actors (approver_user_id, decided_by and first_decided_by). The three ids appear in the review items inbox, my tool approvals and the tool approval detail (holder / second approver); approver_name and first_decided_by_name appear only in the tool approval detail. The three ids follow the same rules, and a name is returned only together with a live member's id. The platform view of the same records stays unredacted. Whether you are the holder or the first decider is decided by the server from the stored ids and returned as is_holder and is_first_decider; compare nothing client-side.
| Case | Situation | id | name | id without key |
|---|---|---|---|---|
ri_member |
A live member of this workspace | id |
name |
id |
ri_member_no_name |
A member of this workspace whose name is not stored | id |
absent |
id |
ri_soft_deleted_member |
A member of this workspace whose account was soft-deleted (a soft delete keeps the account, its roles and its home workspace; only the name is withheld) | id |
absent |
id |
ri_soft_deleted_staff |
A platform administrator whose account was soft-deleted (the account and its roles are kept, so it is still Myra staff; only the name is withheld) | Myra staff stf_… |
absent |
Myra staff |
ri_platform_admin |
A platform administrator | Myra staff stf_… |
absent |
Myra staff |
ri_dual_role |
An account that is both a platform administrator and a tenant admin of this workspace | Myra staff stf_… |
absent |
Myra staff |
ri_no_home |
An account without a home workspace | Myra staff stf_… |
absent |
Myra staff |
ri_other_tenant |
An account that belongs to another workspace | Myra staff stf_… |
absent |
Myra staff |
ri_no_role |
An account without a readable role | Myra staff stf_… |
absent |
Myra staff |
ri_erased |
The account has been erased | erased |
absent |
erased |
ri_null |
The step has not happened yet | absent |
absent |
absent |
Agent approval decider (decided_by of an agent delivery approval, listed by GET /admin/v1/agent-approvals). A tenant admin sees the decider by the same rules as above: an account that is Myra staff reads Myra staff stf_<16 hex> (Myra staff alone when no pseudonym key is available), an erased account reads erased, and a live member of this workspace keeps the id. The field is absent while the approval is undecided. A soft-deleted account keeps its classification: a soft-deleted member keeps the id, a soft-deleted platform administrator stays Myra staff. The platform view of the same records stays unredacted.
| Case | Situation | decided_by | without key |
|---|---|---|---|
aa_member |
Decided by a live member of this workspace | id |
id |
aa_soft_deleted_member |
Decided by a member whose account was soft-deleted (the account and its home workspace are kept) | id |
id |
aa_soft_deleted_staff |
Decided by a platform administrator whose account was soft-deleted (still Myra staff) | Myra staff stf_… |
Myra staff |
aa_platform_admin |
Decided by a platform administrator | Myra staff stf_… |
Myra staff |
aa_dual_role |
Decided by an account that is both a platform administrator and a tenant admin of this workspace | Myra staff stf_… |
Myra staff |
aa_no_home |
Decided by an account without a home workspace | Myra staff stf_… |
Myra staff |
aa_other_tenant |
Decided by an account that belongs to another workspace | Myra staff stf_… |
Myra staff |
aa_no_role |
Decided by an account without a readable role | Myra staff stf_… |
Myra staff |
aa_erased |
The deciding account has been erased | erased |
erased |
aa_null |
Not decided yet | absent |
absent |
Before and after. before and after are returned only for the workspace-configuration and access actions on a fixed allowlist whose payloads hold only tenant-owned values (for example user.role_changed, group.*, role.*, department.created / department.updated / department.deleted). The Audit log page shows such a row's diff as key: old → new for each field that changed (a renamed department reads name: Old → New). A department.updated entry written by an earlier version holds only the changed fields in after; it is returned without before / after (diff_omitted: true), so it never reads as if the other fields were cleared. For every other action, and for every staff row, they are null and the row carries diff_omitted: true. A stored payload that cannot be parsed is null with before_invalid / after_invalid: true.
Chain anchors. Each item carries sealed, seal_seq, chain_hash and prev_hash so an auditor can anchor the row in the tamper-evidence chain. Rows not yet sealed have sealed: false and null hashes.
CSV. The export has a header row and the columns id, ts_ms, time_utc, actor_kind, actor_label, actor_id, actor_ip, staff_id, actor_type, method, path, status, action, entity_type, entity_id, gateway_id, sealed, seal_seq, chain_hash, prev_hash, with the same redaction as the JSON. The time window is fixed when the export starts. An export larger than 50,000 rows is refused with 422 export_too_large rather than silently truncated; narrow it with from_ms / to_ms. The actor_ip and method columns carry the same stored values, including the markers invalid and INVALID.
Listing audit entries
GET /admin/v1/audit-log
Required permission: PLATFORM_AUDIT_VIEW (a platform gate-class permission, held by the platform admin role). Callers without it receive 403 forbidden.
Optional query parameters:
| Parameter | Type | Description |
|---|---|---|
limit |
integer | Maximum rows to return. Default 100; larger values are clamped to 500. Anything but a plain integer ≥ 1 (at most 9 digits) is 400 invalid_limit. |
offset |
integer | Offset for paging. Default 0; values above 100,000,000 are clamped. Anything but a plain integer ≥ 0 (at most 9 digits) is 400 invalid_offset. |
A database fault is 503 { "error": "temporarily unavailable; retry later" } — never an empty list.
The tamper-evidence mirror rows of tool-access decisions (entity_type = 'access_decision') are excluded from this listing; see Tool-access decisions and erasure.
The response is an array, ordered by descending row ID:
| Field | Type | Description |
|---|---|---|
id |
integer | Auto-increment row identifier. |
ts |
unix seconds | Event timestamp. The audit_log.ts column is stored in milliseconds; this endpoint projects ROUND(ts / 1000), so the returned value is in seconds. |
actor_id |
string | null | The signed-in user who made the request. null for unauthenticated calls. |
actor_ip |
string | Client IP of the request: the leftmost X-Forwarded-For element, or the connection's peer address when the header is absent. A leftmost element that is an IPv4 or IPv6 address is stored normalized (brackets, port and zone removed). An empty or non-address leftmost element (for example the header is just ,, or it contains invalid UTF-8) is stored as the literal invalid rather than the peer address, so the row is still written. It is client-supplied, so treat it as a forensic hint, not as proof of origin. It is empty only for rows that deliberately record no request address (background jobs, system actors, replayed events). |
method |
string | HTTP method. A method that is not 1 to 16 characters of A-Z, _ and - is stored as the literal INVALID (the request method was not a valid token); this is distinct from invalid in actor_ip, which means the forwarded address was not IP-shaped. Rows written without a request carry AUDIT. |
path |
string | Request path without the query string, stored decoded; see audit path. |
status |
integer | null | HTTP response status. |
action |
string | null | Security-event label (e.g. access.denied, auth.otp_failed), or null for a generic access row. |
entity_type |
string | null | Category of a structured event (authz, auth, sso, agent, …), or null for a generic access row. |
tenant_id |
string | null | Tenant the actor belongs to, when known. |
entity_id |
string | null | Id of the object the event concerns (a user, a gateway, a setting), as stored; null when the event names none. |
actor |
object | Who acted, with identity; see Platform actor below. |
before, after |
object | null | The change, only for the actions on the same fixed allowlist as the tenant audit log (for example user.role_changed, group.*, role.*). For every other action both are null and the row carries diff_omitted: true. A stored side that cannot be parsed is null with before_invalid / after_invalid: true. |
Platform actor
The platform list is for Myra staff, so it identifies staff instead of pseudonymising them (the actor rendering table applies to what a workspace sees, not to this list). It uses the same classification as that table:
| Field | Type | Description |
|---|---|---|
kind |
user | staff | system |
staff when the person who acted holds the platform-administrator role (an account that also holds a workspace role included), or impersonated from outside the row's workspace, or the impersonation context cannot be read; system for a background job or scheduler; otherwise user. |
id |
string | null | The stored id of the person who acted. For a system actor, the job label. |
name, email |
string | null | Of a live account only; null for an erased account, a system actor, the unknown-impersonation marker, or an empty value. |
erased |
boolean | true when id names no live account any more (the account was erased). Only a confirmed live account counts as live. |
on_behalf_of |
object | null | For a row written under impersonation: the impersonated account (id, name, email, erased). The row's actor is then the impersonator, the person who acted, classified by their role and home workspace as they are when the list is read. null otherwise. |
The legacy actor_id field keeps the stored value (the impersonated account on an impersonated row).
Audit path
path is the decoded, normalised request path without the query string, after the gateway's web server has decoded the percent-encoding. Only these characters are rewritten, and only once, when the row is stored:
- a literal
%is stored as%25, so the escaping is unambiguous; - control characters, the C1 control characters (including U+0085) and the Unicode line separators U+2028 and U+2029 are stored as
%XX, one%XXper byte (U+0085 becomes%C2%85); - if the path is not valid UTF-8, every byte from 0x80 upwards in it is stored as
%XX, valid multibyte characters included:/a/üfollowed by the invalid byte 0xFF is stored as/a/%C3%BC%FF. A path that is valid UTF-8 keeps its other non-ASCII characters literal (/a/üstays/a/ü).
Quotes, <, > and spaces are stored literally. A newline is therefore stored %0A, and a literal %0A in the request is stored %250A. A path that contains none of the rewritten characters is stored unchanged. For example, a request for /admin/v1/conversations/%27%20OR%201%3D1--/share-project is stored as /admin/v1/conversations/' OR 1=1--/share-project.
This applies to the path of every audit row, whichever component writes it: the security log including its SIEM copy, the admin general audit trail, impersonation rows, and background-job and delivery rows. Because the stored value is decoded and can contain markup or delimiters, treat it as untrusted text when you render it. The admin API, the tenant export (JSON and CSV) and the SIEM output encode it for their own format.
Tamper-evidence (revisionssichere Protokollierung)
The audit log is tamper-evident: any retroactive change to a recorded event — altering a field, deleting a row, reordering, or inserting a back-dated entry — is detectable. This satisfies the revisionssichere Protokollierung (audit-proof logging) requirement for tenders such as BKK mkk M9.3.
How it works
Audit rows are written normally (concurrently, from every mutating admin action and every security event). A single background worker then seals each committed row into an append-only hash-chain:
- every sealed row is assigned a dense, monotonic sequence number and a keyed hash (HMAC-SHA-256) computed over the row's immutable content and the previous row's hash, so the rows form a chain where each entry commits to all prior entries;
- the HMAC key is a dedicated secret held outside the database — so an actor with only database access (a rogue administrator, a stolen backup, an injection) cannot recompute a consistent chain after tampering;
- periodic checkpoints anchor the chain digest at sequence boundaries.
Verifying integrity
An operator verification routine walks the sealed chain and recomputes every hash. It reports success, or the first point of divergence, distinguishing:
| Result | Meaning |
|---|---|
ok |
Every sealed row (and every checkpoint) matches — no tampering detected. |
row_tampered |
A row's recorded content was altered after it was sealed. |
seq_gap |
A sealed row was deleted or reordered. |
prev_hash_break |
The chain linkage was broken (relink / reorder). |
chain_truncated |
Rows were removed up to a checkpointed point. |
checkpoint_divergence |
An anchor digest no longer matches the recomputed chain. |
prune_boundary_mismatch / missing_anchor_for_pruned_prefix |
A retained row's anchor to a pruned range is inconsistent or missing. |
Verifying integrity from the tenant
POST /admin/v1/tenants/{id}/audit/verify lets a tenant administrator (TENANT_AUDIT_VIEW, with access to the tenant in the path) run the verification above on demand. It is read-only.
Request. No body or an empty JSON object {}, and no query parameters. Rejected: a tenant you cannot access → the uniform 404; no TENANT_AUDIT_VIEW → 403; a non-object body → 400 invalid_body; any body field → 400 unknown_field; any query parameter → 400 bad_param.
The chain is global. One sequence and one key span all tenants, and each entry's prev_hash is the previous entry's hash whatever its tenant, so a tenant's entries alone cannot prove the links between them. The endpoint therefore verifies the whole chain server-side and projects the result onto your tenant. You never see another tenant's sequence numbers, counts, ids or data.
Response (200) |
Meaning |
|---|---|
{ "ok": true, "verified_at": <ms>, "checked": n, "first_seq": a, "last_seq": b } |
The whole chain is intact. checked is the number of your sealed entries in the verified range, first_seq / last_seq your first and last sequence number there (null when you have none). |
{ "ok": false, "error": "<token>", "break_at_seq": n, "verified_at": <ms> } |
The chain breaks at your entry n. <token> is one of the results in the table above. |
{ "ok": false, "error": "chain_broken_elsewhere", "verified_at": <ms> } |
The chain breaks outside your entries (or at an entry that no longer exists). Nothing about the other entry is disclosed. Every break a fresh scan finds is written to the gateway's error log for Myra's operators. |
{ "ok": false, "error": "chain_key_unset" \| "chain_key_unusable" } |
Sealing is off: audit_chain_key is unset or unusable. |
{ "ok": false, "error": "chain_key_unavailable" } |
The key could not be read right now (transient); nothing was checked. Try again. |
Limits. At most 3 answered calls per tenant per 10 minutes on each gateway node. The next call answers 429 { "code": "rate_limited", "retry_after_s": n } with a Retry-After header. A 503 does not count against the limit. Only one full scan runs at a time across the cluster (a database lock). A call that waits more than 5 seconds for a running scan answers 503 { "code": "verify_busy", "retry_after_s": 30 } + Retry-After. A result less than 5 minutes old is reused for every tenant served by the same node, with its original verified_at, so many tenants cost at most one scan per node in 5 minutes. A database, snapshot or lock fault answers 503 { "code": "verify_unavailable" }, never a fabricated ok. The counter and the reused result live in the node's memory; with several gateway nodes each node keeps its own.
Audit. Every answered run writes one audit entry, action audit_log.verified, entity_type audit_log, with the projected verdict in after ({ "verdict": "ok" }, or the token and your break_at_seq). Nothing else is written.
Scope and trust boundary
The chain proves that no already-sealed event was retroactively changed by a database-level actor. Two residuals are covered by the off-box SIEM mirror (see SIEM streaming above) and externally-stored checkpoint anchors: (1) a forged row inserted in the brief window before the next seal pass, and (2) a full compromise of the application environment that also steals the HMAC key.
The source IP (actor_ip) is deliberately outside the integrity boundary: it is
subject to the GDPR right-to-erasure (it is nulled when a user is erased), and an
immutable chain cannot cover an erasable field. Every other recorded field is covered.
Operator configuration
Tamper-evidence is configured by Myra for your deployment through one thing: the dedicated
HMAC chain key, stored as the encrypted, write-only setting
audit_chain_key. Its presence is the switch — there is no
separate on/off setting and no environment variable.
- The key must be stable (changing it is a re-anchoring event: rows sealed under the old key no longer verify) and at least 32 bytes of printable ASCII (for example 64 hex characters). A missing, malformed, or undecryptable key makes sealing refuse to run — it never falls back to an unkeyed (forgeable) chain.
- A deployment without a usable key is loud, not silent. The sealing tick logs an
ERRline (audit_chain: DISABLED), the health summary reportsaudit_chain_disabled: truewith a closedaudit_chain_reason, and the Prometheus gaugeaig_audit_chain_enabledis0(see stats). If the key merely cannot be read right now (a transient settings fault) the state is reported as unknown, never as "not enabled".
verify refuses to report success without the key. Its failure error values for that case:
error |
Meaning |
|---|---|
chain_key_unset |
audit_chain_key is absent — nothing can be verified (or sealed). |
chain_key_unavailable |
The settings could not be read right now; retry. Not a verdict on the chain. |
chain_key_unusable |
The key row exists but cannot be used; the reason field names why: no_master_key, not_ciphertext, undecryptable (for example after a master-key change), not_header_safe, or too_short. |
⚠️ Enabling the chain also enables audit-log retention. Sealing is a prerequisite for the chain-aware prune, which is the only mechanism that deletes old
audit_logrows. The first activation on a long-lived deployment seals the entire historical backlog (background, off the request path) and then begins pruning rows older than the retention horizon (default 365 days, floored at 180). Pruning is incremental (it needs at least two checkpoints before any range is deleted), so there is no instant mass-delete — but confirm the retention horizon is intended before provisioning the key on a deployment that was previously keyless.
Audit-log retention is documented under Data retention.
Attribution and source on the structured events
- Impersonation. A change made while an admin is using "View as User" is attributed to the impersonator:
actor_idis the admin's user ID, andafter.impersonated_user_idcarries the user being viewed. The impersonated user is never recorded as the actor. - SCIM rows have
actor_typesystem, noactor_id,tenant_idset to the SCIM credential's tenant,actor_ipset to the caller's address, andafter.source="scim". SCIM user rows list attribute names only (fields_set), never values. - Keyword counts only. Gateway config rows never contain a keyword, pattern or regex value — only counts and field names.
- Out of scope. Group memberships changed as a side effect of SCIM department-attribute sync (department to group mapping) are not yet audited per member.
AI Workspace connector events (entity_type tenancy)
The AI Workspace connector (/tenancy/v1, off by default) records its audit facts as structured rows with entity_type tenancy. Five events are written so far, POST /tenancy/v1/contexts (context.open), DELETE /tenancy/v1/contexts/{id} (context.close), a refused delegated read or close (context.denied), a served user list (users.listed) and the end of a provisioning job (provisioning.status), all below; this section fixes the shape the connector's single emitter accepts and stores. Each row is written in the same database transaction as the change it describes, so a change that is rolled back leaves no audit row.
| Column | Value |
|---|---|
action |
The event name <entity>.<verb>: exactly two segments of lower-case letters a–z and _, each starting with a letter, joined by one . (at most 48 characters), for example tenancy.token_class_rejected or users.listed. Digits and further segments are refused. |
actor_type |
system (portal system token) or user (exchanged portal-user token). |
actor_id |
Required, at most 36 bytes (UTF-8): the system token's client ID or the user's subject. |
tenant_id |
Optional, at most 36 bytes (UTF-8). A tenancy.token_class_rejected row never has one (see below). |
actor_ip |
Optional, at most 64 bytes. |
entity_id |
The ID of the object the event is about (the event's target), required, at most 255 bytes. |
method |
The HTTP method (1–16 upper-case letters), or AUDIT when none is given. |
path |
The request path, stored as described in Audit path, at most 65,535 bytes after that escaping; the action when none is given. |
status |
The HTTP status (an integer 100–599), or 0 when none is given. |
before_json |
The state before an update, when the connector passes one: a JSON object of at most 50 top-level properties under the same rules as the event data; the emitter adds nothing to it. Empty (NULL) otherwise. |
after_json |
The event data, a JSON object of at most 48 top-level properties, plus two keys the emitter adds: target_type (the kind of object the event is about, lower-case letters and _, at most 32 characters, for example tenant) and outcome (success, failure or denied; always denied for tenancy.token_class_rejected). The stored object therefore has at most 50 properties. Event data that already contains target_type or outcome is refused. |
A context was opened (context.open). POST /tenancy/v1/contexts writes one row in the same transaction as the context_session row: actor_type user, actor_id the caller's subject (at most 36 bytes; a longer subject makes the emitter refuse, so no session is opened and the request answers 503), entity_id the new context session id, target type context, outcome success, method POST, status 201, and the tenant's tenant_id, so the row is visible in that workspace's audit view. The event data is kind, delegation, product, deployment and effective_until. A refused or failed open writes no row. The audit view has no per-action label for connector rows; they show under their action name.
A context was closed (context.close). DELETE /tenancy/v1/contexts/{id} writes one row in the same transaction as the UPDATE of the context_session row: actor_type user (the bound user, actor_id their subject) or system (actor_id the credential's azp), at most 36 bytes (a longer one makes the emitter refuse, so nothing is closed and the request answers 503), entity_id the context session id, target type context, outcome success, method DELETE, status 204, and the tenant's tenant_id. The event data is reason, kind, delegation, product, deployment and duration_seconds. reason is ended for a close before the context's effective_until; the first close of a context that expired without being closed records expired, with effective_until as its end (the stored closed_at, and duration_seconds counts up to it). Exactly one row is written per state change: closing a context that is already closed (including one whose expiry was recorded) writes none.
A user list was served (users.listed). GET /tenancy/v1/tenants/{portal_org_id}/users writes one row per answered page, in its own transaction, before the page is sent: actor_type user, actor_id the caller's subject, target type users, entity_id the customer, outcome success, method GET, status 200, the request path without a query string, and the tenant's tenant_id. The event data is delegation, context_session_id, permission, limit, page (first or next), count and returned. It holds no e-mail, name or user id. If the row cannot be written the request answers 503 and sends no user data; a refused or failed page read writes no row.
A provisioning job ended (provisioning.status). The provisioning job writes one row, in the same transaction as the job's transition, when it becomes completed, failed_recoverable or failed (no row for a retry or a step). A tenant purge that marks an unfinished job (pending, running, awaiting_customer_approval or failed_recoverable) failed writes that job's row too, in the purge transaction and with the same fields: job_status failed, observed_state deleted (a tenant is soft-deleted before its purge), no tenant_id, the step the job was on marked failed, and the stored desired state read before the purge erases it (when there is none or it cannot be read, the state and ETag of the job's stored 202 answer). That row names the purge, not the portal: actor_type user with the platform admin's id, method DELETE and path /admin/v1/tenants/<id>/purge for a native purge; actor_type system, actor_id purge-reaper, method SYSTEM and path billing.purge_reaper#sweep for the retention reaper; for a purge through the connector (POST /tenancy/v1/tenants/<portalOrgId>/actions/purge) actor_type user with the portal user's subject, or system with the portal system client, method POST and that path (the same actor values as the purge's tombstone). If that row cannot be written (also when neither desired state nor 202 answer is usable), the purge is rolled back. In the unusable case the gateway log records an error id only (the job id is chosen by the portal and never logged), and one best-effort operator alert (signal tenancy_provisioning_purge_refused), sent after the purge transaction has ended, carries the job id and that error id (its logged fields are the tenant id and the error id, never the job id), so an operator can repair the job's stored answer before the purge is retried; each refused attempt sends one alert (the retention reaper retries hourly), and a failed alert does not change the outcome. For the runner's own transitions: actor_type system, actor_id the portal client (cut to the actor limit), tenant_id set only once the native tenant exists, target type tenant, target_id the portal org id, outcome success for completed and failure otherwise. The event data holds job_id, operation_id, platform_tenant_id, desired_state, observed_state, job_status, version, portal_managed and the step list (step name, status and the error id only, never error text). It carries no settings, names or e-mail addresses.
A delegated read was refused (context.denied). A user token reading a reporting route with ?delegation= that the authority denies writes one row in its own transaction: actor_type user, actor_id the caller's subject, target type delegation, entity_id the delegation, outcome denied, status 404, no tenant (tenant_id empty), event data permission, reason, delegation and route. At most one row per actor, permission and reason is written per 60 seconds (shared with the require_delegated deny row, see Delegated requests, and with the close denies below), whatever delegation or customer the request names; the write is best effort and the caller's answer (404 not_found) never depends on it. An authority that is unavailable writes no row. A refused close (DELETE /tenancy/v1/contexts/{id}, a user token whose authority check for context.open on the context's delegation denies) writes its own context.denied row: actor_type user, actor_id the caller's subject, target type context, entity_id the context session id, tenant_id the context's tenant, outcome denied, status 403, method DELETE, path the route pattern /tenancy/v1/contexts/:context_session_id (never the id itself), and the same event data. This row is throttled per actor, permission and reason, 60 s, like the others, and is best effort; the caller's answer is 403 forbidden, also for a tenant_fenced deny.
A token of the wrong class (tenancy.token_class_rejected). When a valid token is presented on a route of the other token class (a system token on a user route, or a user token on a system route), the connector refuses the request with 403 and records a row with the token's verified identity: actor_type system or user, actor_id its client ID or subject, outcome denied, and no tenant_id, so the row appears only in the platform audit log and never in a workspace's audit view. Such a row stays in this audit log only; it is never passed on to the partner platform.
A tenant was purged through the connector (tombstone). The hard-delete engine writes one deletion tombstone per purged tenant. For an actor of kind tenancy (a portal user) it carries actor_type user, for kind tenancy_system (the portal system client) actor_type system; both carry the reason partner_portal_purge, method POST and path /tenancy/v1/tenants/<portalOrgId>/actions/purge (the organisation id comes from the tenant's connector row, read in the purge transaction; without one the purge is refused and rolled back). The admin purge (admin, DELETE /admin/v1/tenants/<id>/purge) and the retention reaper (system) keep their existing tombstone values.
What the event data and the before state may contain. Only allow-listed fields: never content, free text, display names, e-mail addresses (masked ones included) or other direct identifiers of a person, and never a secret, credential or token value. Audit rows are append-only and part of the tamper-evident chain, so anything written can never be erased. Today the connector's handlers keep to this rule themselves and the emitter caps the event data at 48 properties and the before state at 50; a per-section allow-list that the emitter enforces follows with the connector's event outbox.
The emitter refuses — and the connector's change is not committed — when the event name, the data or the context is missing or malformed: an event name outside the pattern above, data that is not a JSON object (an array, a string, a number, or a table that encodes as an array) or cannot be encoded as JSON (NaN, infinity), data with more than 48 properties or a reserved key, a before state that is not a JSON object or has more than 50 properties, a missing actor type, actor ID, target or outcome, a tenancy.token_class_rejected event with a tenant ID or an outcome other than denied, an unknown actor type, outcome or context field, a target type outside the pattern above, a value longer than its column, an empty value, invalid UTF-8, or a control or invisible formatting character in a text value. A missing value and a malformed value are reported as different errors. The emitter also refuses to write outside a database transaction, and inside a transaction that a failed statement (a deadlock or a lost database connection) has already ended, because such a row would survive the rollback of the change it describes. Operators: a refusal is logged as a warning at most once per minute for each refusal reason (the field and whether it was missing or malformed); further refusals of the same reason within that minute are logged at info level. The log line names the reason only, never a value of the event (for example not the actor ID). When the database refuses the row itself (for example during a database outage), the change is not committed either; the connector logs this as an error at most once per minute, with the event name, the database error number and the database error text reduced to printable characters and cut to 200 characters, and further failures within that minute at info level. The gateway's general audit-write error line is logged in addition.