Audit log
The audit events NebulaCtrl records, their fields, how to filter and export them from the Activity page or the API, and what is never written to them.
The control plane writes an audit event for each state-changing action. The Activity page and the API read those events. This page lists the fields, the guarantees, the filters and every action the control plane records.
Quick reference
| Console | Activity, in the organization's navigation |
| API | GET /api/v1/activity (listActivity) and GET /api/v1/activity/export (exportActivity) |
| Who can read | Every role, including viewer. A project-limited API token sees only events of its projects. |
| Export | CSV only |
| Retention | Kept as long as the organization exists |
| Editable | No. Events are append-only. |
An audit event
| Field | Meaning |
|---|---|
id | The event's identifier. |
at | When it was recorded, in UTC. |
actorType | user, token, agent or system. |
actorId | The user's or token's id, the id of the cluster that sent the event, system, or updater for the outcome of a control plane update. |
action | What happened, such as member.role_changed. |
target | A JSON object of ids and names the action touched. |
before, after | JSON snapshots, present only for actions that change something. |
The console shows the actor by name: the member's name, NAME token or API token, CLUSTER agent, or system. An event with no actor is recorded as system.
Guarantees and limits
- Append-only. A database trigger rejects every update and every delete of an event. The only exception is the cascade that deletes an organization's events together with the organization.
- Best effort in places. Most events are written after the action completes. If the write fails, the action still happened, and the control plane logs
audit event was not recorded; the action it describes still happened. Events written together with a change, such as organization creation, team changes, SCIM changes and change set transitions, roll back with it. - Not in any organization's feed.
user.signed_inanduser.provisionedbelong to no organization. - Where it came from. Every event written during a request records
actorIp, the client address the control plane resolved across its trusted proxy, anduserAgent, which the client chooses and so is evidence rather than identity. Events written by background work, and events recorded before this was kept, have neither: not reported. - Refusals are coalesced. A token refused, or a caller denied, repeatedly is one event per credential, route and reason every 10 minutes.
repeatsin its target counts the refusals not written since the last one. - No secrets. Events name which variable, token or credential changed and never its value.
- One exception.
database.queriedrecords the full query text. - Outside the record. Changes made directly in the database or inside a cluster.
Filter the Activity page
| Control | Effect |
|---|---|
| Kind | all, deploys, config, access or clusters. The API takes kind=deploy, config, access or cluster. |
| Search box | Filter by actor, target or action matches the action, the actor id and the readable fields of the target. The API parameter is q. |
| Project | Events of one project, directly or through its environments, services and releases. The API parameter is projectId. |
| Time range | Last 24h, Last 7 days, Last 30 days or All time. The API takes from and to as RFC 3339 timestamps. |
| Actor chip | Select an actor's name in a row to filter by them; the chip clears the filter. The API parameter is actorId. |
The API also filters by action. Pages hold 50 events by default and at most 200, and the response carries nextCursor and an exact total. The page groups events by UTC day and folds runs of identical actions by one actor into one row.
Select a row to see its action, actor, time, target, and the Before and After values when they exist.
Export
Select Export CSV on the Activity page, or call GET /api/v1/activity/export. The export applies the same filters, ignores paging and walks the whole matching ledger in batches of 500. The file is named activity.csv by the API, and activity-TIMESTAMP.csv by the console.
The header row is:
id,at,actorType,actorId,action,target,before,after,actorIp,userAgentat is RFC 3339 with nanoseconds in UTC. target, before and after are JSON text. A user agent that starts with =, +, - or @ is prefixed with an apostrophe so a spreadsheet does not read it as a formula. If the export fails partway, the file is truncated, and the rows already sent are correct.
Stream to your own system
The ledger lives in the same database as the control plane. To keep a copy somewhere a breach of the control plane cannot reach, set up the Audit stream under Settings > Security & policy. Only admins and owners can see or change it. Stream the audit log to your own system has the steps.
- The sink is one HTTPS URL. The host must resolve to a public address.
- It receives every event recorded after you create it, in order, in signed JSON batches. The batch shape and the signature check are in the webhook reference.
- Delivery is at least once. The sink moves its position only when your endpoint answers
2xx; a failing endpoint is retried with a wait that doubles to an hour, and nothing is dropped. Deduplicate on the eventid. - A row is delivered once every transaction that started before it has finished, so an event can arrive a moment after it appears on the Activity page.
- Events that belong to no organization, such as
user.signed_in, are not sent. - Send test posts an empty batch with
testset totrue. It never moves the sink's position. - Creating the sink shows its signing secret once. Rotate signing secret replaces it.
- Changing, switching off or deleting the sink asks a signed-in person to have signed in within the last 15 minutes. API tokens are exempt.
The API calls are getAuditSink, putAuditSink, deleteAuditSink, rotateAuditSinkSecret and testAuditSink, under /api/v1/audit-sink.
Events by kind
The Kind filter groups events by the prefix of their action. Events with the prefixes mesh., template., tailnet., preview., project_config., generated_domain. and backup., and four organization.* settings events, fall under no kind. They appear under all, with the chip other; Under no kind lists them.
Deploys
| Action | Recorded when |
|---|---|
release.created, release.promoted | A release is created, or promoted to another environment. |
deployment.started, deployment.rolled_back, deployment.cancelled, deployment.superseded | A deployment starts, rolls back, is cancelled, or is replaced by a newer one. |
approval.requested, approval.decided, approval.expired | A production approval is requested, decided, or expires. |
build.queued, build.cancelled, build.superseded, build.release_failed | A build is queued, cancelled, replaced, or fails to produce a release. |
change_set.submitted, .applied, .failed, .rejected, .discarded, .item_staged, .item_removed | A change set moves through its states, or an edit is staged or removed. |
service.suspended, service.resumed | A service is suspended or resumed. |
process.restarted, pod.restarted | A process or a pod is restarted. |
shell.started, shell.ended, shell.failed | A browser shell opens, ends (with how long it lasted and why) or could not open. The commands typed and their output are not recorded. |
shell.files_listed, shell.file_downloaded, shell.file_uploaded | A directory in an instance is listed, or a file is downloaded from or uploaded to it, with the path. |
Configuration
| Action | Recorded when |
|---|---|
project.created, .updated, .deleted, .restored, .purged | A project changes, is deleted into the recovery window, is restored, or is purged when the window ends or by Delete now. |
environment.created, .updated, .bound, .cluster_bound, .deleted, .restored, .purged | An environment changes, or is bound to a cluster, by a person or automatically. It is deleted into the recovery window, restored, or purged. |
service.created, .updated, .deleted, .restored, .purged, service.production_approval_changed | A service changes, or its production approval rule does. It is deleted into the recovery window, restored, or purged. |
service.template_updated | An environment of a service moves to a newer version of the template the service was installed from. |
service.watch_paths_updated | A service's preview watch paths change. |
service.alert_rule_updated, service.alert_acknowledged | An alert rule of a service is changed or reset to its default, or an alert is acknowledged. |
process.created, .updated, .deleted | A process changes. |
volume.created, volume.deleted, volume.restored, volume.purged | A volume is created, deleted into the recovery window, restored, or purged. |
variable.set, .deleted, .revealed, .unmanaged | A variable is set, deleted or revealed, or stops being owned by nebula.toml. A call for a service's resolved variables records one variable.revealed for each secret it returns, with the key and never the value. |
external_resource.created, .updated, .deleted, .linked | An external resource changes, or is linked to services. |
domain.created, .exposure_updated, .dns_settings_updated, .certificate_method_updated, .deleted | A domain changes. |
domain.checked, domain.dns_synced, domain.dns_adopted | A domain is checked, its DNS records are synced, or existing records are adopted. |
domain.certificate_issued, domain.certificate_renewed | A certificate is issued or renewed. |
git_connection.created, .deleted | A Git connection changes. |
registry_credential.created, .deleted | A registry credential changes. |
object_store.created, .updated, .deleted | An object store changes. |
cloudflare_connection.created, .updated, .deleted | A Cloudflare connection changes. |
notification_channel.created, .updated, .deleted | A notification channel changes. The event records whether the secret was replaced, not the secret. |
notification_channel.smtp_saved, notification_channel.smtp_deleted | The organization's SMTP server is saved or removed. The event records the host, port, security, username and sender, and whether the password was replaced, never the password. |
database.created, database.queried, database.pitr_enabled, database.pitr_disabled, database.reader_promoted, database.archive_deleted | A database service is created, queried, has point-in-time recovery switched, has a reader promoted, or has its archive deleted. |
volume_backup.created, .deleted, .downloaded, .succeeded, .failed | A volume backup is taken, deleted, downloaded, or finishes. |
volume_restore.created, .succeeded, .failed | A volume restore starts or finishes. |
volume_backup_schedule.put, volume_backup_schedule.deleted | A backup schedule is set or removed. |
organization.updated | The organization's name or default cluster changes. |
Access
| Action | Recorded when |
|---|---|
user.signed_in, user.provisioned | A person signs in, or signs in for the first time. Recorded outside any organization. A sign-in made to confirm it's you before a sensitive action carries reauthenticated. |
session.revoked | A session ends, by sign-out or revocation. |
organization.created, .deleted, .transferred | An organization is created, deleted, or changes owner. |
member.role_changed, member.removed, member.left | A member's role changes, or they are removed or leave. |
invitation.created, .revoked, .accepted | An invitation is created, revoked, or accepted by link. |
auth.token_rejected | An API token that identified itself was refused. The reason in the target is bad_secret, revoked, expired or ip. Recorded in the token's own organization. A token id nobody holds names no organization and is not recorded. |
auth.forbidden | A signed-in caller was refused. The target holds the reason (denied, mfa_required, wrong_organization, not_a_member), the route pattern and the caller's role. |
user.sign_in_refused | A person the identity provider vouched for was turned away. The reason is no_invitation, email_unverified or incomplete_claims. Recorded outside any organization, with a hash in place of the person's identity and only the email's domain. |
audit_sink.saved, .deleted, .secret_rotated, .tested | The audit sink changes or is tested. The URL and the secret are never recorded, only the host. |
api_token.created, api_token.revoked | An API token is created or revoked. |
team.created, .updated, .deleted, team.members_set, team.member_added | A team changes. |
scim.token_rotated, scim.token_disabled | The SCIM token is rotated or turned off. |
scim.user_provisioned, .user_updated, .user_deleted, .user_bound, .user_deprovisioned | The identity provider provisions, updates, deletes, binds or deprovisions a user. The last records how many tokens and sessions ended. |
Clusters
| Action | Recorded when |
|---|---|
cluster.created, .updated, .deleted, .enrolled | A cluster changes, or its agent enrolls. |
cluster.enrollment_token_regenerated | The install credentials are regenerated, with whether the running agent was replaced. |
cluster.agent.token_rotation_requested, cluster.agent.token_rotated | An admin rotates the agent token, and the agent confirms it. |
cluster.join_token_created, cluster.join_token_revoked | A node join token is created or revoked. |
cluster.high_availability_started, cluster.cnpg_install_started, cluster.tailscale_connect_started | One of those installs is started. |
cluster.ssh_key_created, cluster.ssh_install_started, .ssh_install_confirmed, .ssh_install_finished | An SSH install runs. The events carry the host, port, user and host-key fingerprint, never a key. |
cluster.agent.update, cluster.agent.rollback | An agent update or rollback starts, with the images it moves between. |
cluster.cordoned, cluster.uncordoned | A cluster stops or resumes accepting new workloads. |
node.cordoned, node.uncordoned, node.drained | A node is cordoned, uncordoned or drained. |
control_plane.update.requested, .cancelled, .finished | A control plane update is requested, cancelled, or ends. The last is written by the updater or by the control plane when it gives up on a silent updater. |
Under no kind
| Action | Recorded when |
|---|---|
organization.policy_updated | The change policy, Allow shell in protected environments or the deploy freeze changes. |
organization.security_updated | Require two-factor for everyone changes. |
organization.join_token_ttl_updated | The default join token lifetime changes. |
organization.deleted_retention_updated | The recovery window changes, with the hours before and after. |
organization.session_policy_updated | The organization's session idle timeout changes, with the seconds before and after; null is the installation default. |
generated_domain.base_set, generated_domain.base_cleared | The generated domain base is set or cleared. |
generated_domain.wildcard_synced | NebulaCtrl writes or corrects the wildcard DNS record it keeps for the base in Cloudflare. |
mesh.peer_registered, mesh.peer_rekeyed, mesh.peer_revoked | A machine joins the mesh, a server on the mesh is re-installed with a fresh enrollment token and takes a new key, or a peer is revoked. |
mesh.grant_created, mesh.grant_deleted | Cross-environment network access is granted or removed. |
preview.settings_updated, preview.created, preview.deleted | Preview settings change, or a preview environment is created or deleted. |
preview.service_deployed_anyway | Someone deploys a service that a focused preview left unbuilt. |
project_config.set, project_config.removed | A project's config repository is set or removed. |
tailnet.device_removed, tailnet.device_removal_failed | A Tailscale device is cleaned up, or cleanup fails. |
template.created, .updated, .deleted, template.installed | A template changes, or is installed. |
backup.objects_deleted | Backup objects are removed when an environment is deleted. |
See also
- Security model for what the record covers.
- Manage members and teams for the access events.
Secrets and sealing
How NebulaCtrl encrypts stored secrets with envelope encryption, what the master key protects, how rotation and resealing work, and which values are never logged.
Troubleshooting
Find the page that explains the message you see, from a deployment that does not start to a cluster that does not connect and a control plane that does not sign you in.