Area: Observability Issues
Sub-Area: Audit Log Retention and Compliance
Applies to: Cloud
Issue
Teams that answer to GDPR or to an internal legal review need to know what personal data DataHub Cloud keeps about their users, where it lives, and how long it stays. This article covers two stores: usage and audit events in the search cluster, and user profile data on corpuser entities.
You Might Be Asking
- How long does DataHub keep audit fields such as
sourceIP,userAgent,timestamp,actorUrn,entityUrn,entityTypeandaspectName? - Can I change the retention period myself?
- When we offboard an employee in our identity provider, when does DataHub delete their data?
- Does the DataHub garbage collection job clean up usage events?
Solution
1. Usage and audit events (datahub_usage_event index)
DataHub writes UI activity and audit events to the datahub_usage_event index in OpenSearch. The index lifecycle policy that DataHub creates for it has two states:
- Rollover: the active index rolls over to a new index when it reaches 5 GB.
- ReadOnly: an index moves to read only 14 days after it was created. Its data stays searchable.
DataHub Cloud runs this policy as shipped. It has no delete state, so usage events are kept indefinitely unless someone deletes them. You can't change this policy yourself on DataHub Cloud.
You can read these events with the Audit Events Search API (POST /openapi/v1/events/audit/search).
2. Fields in usage events
Events sent from the DataHub UI (page views, searches and other clicks) carry:
-
actorUrn: the user who acted, for exampleurn:li:corpuser:jane@example.com. -
timestampanduserAgent. -
browserId: a random UUID kept in a browser cookie that expires after 365 days. It is not tied to a user account. Every UI event carries it. - Event specific fields such as
entityUrnandentityType. Search events carry thequerytext the user typed, which can include a name or email address.
UI events don't carry sourceIP.
Audit events written by the backend carry actorUrn, timestamp, entityUrn, entityType, aspectName, userAgent and sourceIP when the request has them. DataHub writes these for logins and for a fixed set of admin actions: access token create and revoke, policy create, update and delete, ingestion source create and update, and user create and update.
DataHub stores all of these values as sent. It doesn't hash or mask them.
The SSO username becomes the user URN. The default OIDC username claim is email, so actorUrn often contains an email address. See Configuring OIDC Authentication.
3. User profile data (corpuser aspects)
DataHub stores user profiles as aspects on corpuser entities in its database:
-
corpUserInfo: display name, first, last and full name, email, title, manager, department, country code and custom properties. -
corpUserEditableInfo: details the user edits in DataHub, such as email, phone, Slack handle, picture link, title and about me text. -
corpUserStatus: the user's status (for exampleACTIVEorSUSPENDED) and who changed it and when. -
corpUserCredentials: only for native DataHub users. It holds an encrypted salt, a hashed password and an encrypted password reset token.
4. What happens to a user you offboard
The result depends on how users reach DataHub.
Okta or Azure AD ingestion source: with stateful ingestion and remove_stale_metadata on, the next run soft deletes users who are no longer returned by the identity provider. The Okta source skips users in the DEPROVISIONED state by default (include_deprovisioned_users: false). A soft deleted user drops out of search, but their aspects stay in the database. The DataHub garbage collection job then hard deletes the user once the soft delete is older than soft_deleted_entities_cleanup.retention_days. The source default is 10 days. Contact DataHub Support to confirm the value on your instance.
Okta SCIM provisioning: when you unassign or deactivate a user in Okta, DataHub sets the user's status to SUSPENDED. This is not a soft delete. The garbage collection job never removes suspended users, so their profile stays. Deleting a user in Okta doesn't delete the user in DataHub. See Configuring Identity Provisioning with Okta.
Microsoft Entra SCIM provisioning: when you permanently delete a user in Entra, Entra sends a delete to DataHub. DataHub hard deletes the user and all their aspects at once, with no waiting period. See Configuring Identity Provisioning with MS Entra.
Manual removal: a DataHub admin who deletes a user in DataHub hard deletes the user and all their aspects at once.
None of these paths touch the datahub_usage_event index. Past events keep the user's actorUrn, and where present sourceIP and userAgent, after the profile is gone.
5. Garbage collection does not clean usage events
The datahub-gc source revokes expired tokens, truncates timeseries aspects such as dataset, chart, dashboard and query usage statistics, removes old data process instances, execution requests and queries, and hard deletes soft deleted entities. It does not read or delete the datahub_usage_event index. See DataHub Garbage Collection.
6. Removing a user's usage events
DataHub Support can delete the usage events of named users on request, for example to handle a right to erasure request. Send DataHub Support the user URNs (for example urn:li:corpuser:jane@example.com) whose events you need removed. For any other retention requirement for usage events, contact DataHub Support.
Summary
| Data | Where | Default retention |
|---|---|---|
| Usage and audit events | OpenSearch datahub_usage_event
|
Kept indefinitely; the policy has no delete state. Support can delete a named user's events on request. |
| User removed by Okta or Azure AD ingestion | Database | Hard deleted by GC after retention_days (source default 10) |
| User suspended by Okta SCIM | Database | Kept |
| User deleted by Entra SCIM or by an admin | Database | Hard deleted at once |
Related Documentation
- Audit Events Search API
- DataHub Garbage Collection
- Configuring Identity Provisioning with Okta
- Configuring Identity Provisioning with MS Entra
- Okta source
- Configuring OIDC Authentication
Tags: audit-log, data-retention, compliance, GDPR, usage-events, OpenSearch, corpuser, scim, data-privacy