Skip to main content

Audit events

Odudu records what happens to a tenant as audit events. Each event has an event_type, an action, an outcome, who did it and to what, the request’s request_id and ip, and a detail object that never holds a secret. Read them with GET /admin/tenants/{tenant}/audit (see the audit operations); a tenant’s audit_event_types setting chooses which types it stores.

Event types​

Event typeWhat it records
admin_mutationA write made through the admin API or the odudu console command. Its action is free-form: one per mutation, named <resource>.<verb>.
admin_accessA refusal at the admin API door: an authenticated caller without the capability, or a genuine token from another tenant.
authenticationAn answer to a sign-in step or to client authentication: a password, one-time code, recovery code or passkey, a second factor offered, a lockout tripped.
sessionA user session was created or ended.
tokenA token was issued, refreshed, exchanged or revoked, or a grant was revoked on reuse.
credentialA credential was created or changed: registration, email verification, password reset and change, enrolment of a one-time-code or passkey factor, recovery codes issued.

Actions by event type​

These types have a fixed vocabulary of actions.

admin_access​

ActionMeaning
capability.refusedAn authenticated admin caller lacked the capability a route needs. detail names it.
token.foreign_issuerA genuine token issued by another tenant was presented to the admin API.

authentication​

ActionMeaning
login.passwordA password was checked at sign-in.
login.otpA one-time code was checked at sign-in.
login.recovery_codeA recovery code was used in place of a second factor.
login.passkeyA passkey assertion was checked at sign-in.
factor.offeredA second factor was offered to a user who had passed the first.
lockout.trippedFailed sign-ins reached the limit and the subject was locked out.
client.authenticateA client’s authentication was refused at an endpoint that requires it.

session​

ActionMeaning
session.createdA user session was created by a completed sign-in.
session.endedA user session ended. detail.via says by logout, by an admin or by eviction.

token​

ActionMeaning
token.issueThe token endpoint issued tokens, or refused to.
token.refreshA refresh token was redeemed, or the redemption was refused.
token.exchangeA token exchange (RFC 8693) was answered. detail.mode says delegation or impersonation.
token.revokeA token was revoked at the revocation endpoint.
grant.revoked_on_reuseA refresh token was presented again after rotation, so its whole grant was revoked.
grant.revoked_on_code_replayAn authorization code was redeemed a second time, so the grant it produced was revoked.

credential​

ActionMeaning
account.registeredA user registered their own account.
account.registration_duplicateSomeone tried to register an email address that already has an account. resource_id names that account.
email.verifiedA user verified their email address through the mailed link.
password.resetA password was set through a reset link.
password.changedA user changed their password.
otp.enrolledA user enrolled a one-time-code authenticator.
passkey.enrolledA user enrolled a passkey.
recovery_codes.issuedA user was issued a new set of recovery codes.

Admin mutations​

The admin_mutation type has one action for each write the admin API makes, named <resource>.<verb>.

ActionMeaning
audit.exportThe audit trail was exported.
client.amendA client was amended.
client.createA client was created.
client.deleteA client was deleted.
client.evaluateThe claims a client would receive for a subject were evaluated.
client.grants_revokeEvery grant of a client was revoked.
client.rotate_secretA client secret was rotated.
client.secret_expiredThe retired secret of a rotated client expired and was removed.
consent.revokeA subject’s consent to a client was revoked.
console.assertionA client assertion for the console was printed by odudu console assertion.
flow.replaceA tenant’s authentication flow was replaced.
grant.revokeA subject’s grants to a client were revoked.
group.amendA group was amended.
group.createA group was created.
group.default_setA group was made, or stopped being, a default for new subjects.
group.deleteA group was deleted.
group.roles_setThe roles of a group were replaced.
key.createA signing key was created.
key.deleteA retired signing key was deleted.
key.promoteA signing key was made the active one.
key.retireA signing key was retired.
registration_token.mintAn initial access token for dynamic client registration was minted.
registration_token.revokeA registration token was revoked.
role.amendA role was amended.
role.composite_addA role was added to a composite role.
role.composite_removeA role was removed from a composite role.
role.createA role was created.
role.default_setA role was made, or stopped being, a default for new subjects.
role.deleteA role was deleted.
scope.amendA client scope was amended.
scope.assign_to_clientA client scope was assigned to a client.
scope.createA client scope was created.
scope.deleteA client scope was deleted.
scope.mappers_setThe claim mappers of a client scope were replaced.
scope.restore_builtinsThe built-in client scopes a tenant was missing were created again.
scope.roles_setThe roles a client scope carries were replaced.
scope.unassign_from_clientA client scope was unassigned from a client.
session.endOne session was ended by an admin.
session.end_allEvery session of a subject, a client or a tenant was ended by an admin.
subject.actions_email_sendA mail asking a subject to complete required actions was sent by an admin.
subject.amendA subject was amended.
subject.createA subject was created.
subject.credential_deleteA credential of a subject was deleted.
subject.deleteA subject was deleted.
subject.groups_setThe groups of a subject were replaced.
subject.lockout_clearA subject’s lockout was cleared.
subject.lockouts_clearThe lockouts of many subjects were cleared in one call.
subject.password_issueA password was set for a subject by an admin.
subject.password_reset_sendA password reset link was mailed to a subject by an admin.
subject.profile_amendA subject’s profile claims were amended.
subject.recovery_codes_revokeA subject’s recovery codes were revoked.
subject.required_actions_setThe required actions of a subject were replaced.
subject.roles_setThe roles of a subject were replaced.
subject.verification_sendAn email verification link was mailed to a subject by an admin.
tenant.amendA tenant was amended.
tenant.amend_settingsA tenant’s settings were amended.
tenant.createA tenant was created.
tenant.deleteA tenant was deleted.
tenant.exportA tenant was exported.
tenant.importA tenant was imported.
tenant.smtp_deleteA tenant’s SMTP relay was removed.
tenant.smtp_setA tenant’s SMTP relay was set.
tenant.smtp_testA test message was sent through a tenant’s SMTP relay.

Outcomes​

OutcomeMeaning
allowedThe action happened.
refusedThe action was refused by a rule: a bad credential, a missing capability, a limit.
failedThe action was attempted and an error stopped it.

Reasons​

A refused or failed event may carry a reason in its detail.

ReasonMeaning
unknown_subjectThe username or email names no subject.
bad_credentialThe credential presented did not match.
locked_outThe subject is locked out after too many failures.
replayedA credential that can be used once was presented again.
already_usedThe code, token or link was already used.
subject_mismatchThe credential belongs to another subject than the one signing in.
invalid_grantThe grant presented is unknown, expired or not usable here.
invalid_scopeA requested scope is not allowed for this client.
invalid_targetA requested resource is not allowed for this client.
unauthorized_clientThe client is not allowed to use this grant type.
unsupported_token_typeThe token type is not one the endpoint handles.
rate_limitedThe request was over its budget.
foreign_issuerThe token was issued by another tenant.
missing_capabilityThe caller lacks the admin capability the route requires.
already_registeredThe email address already belongs to an account.