docs/features/feature-guides/search-access-controls.md
import FeatureAvailability from '@site/src/components/FeatureAvailability';
:::note Self-hosted (OSS) deployments
Search Access Controls with query-time filtering are a DataHub Cloud feature. On OSS, set VIEW_AUTHORIZATION_ENABLED=true for entity page gating — this does not filter search at query time. See Designing policies for view-based access control in the Policies Guide.
:::
Search Access Controls allow organizations to restrict which entities users can discover through search results. This feature uses the View Entity permission to filter search results based on policies, ensuring users only see metadata they are authorized to access.
The View Entity permission controls whether a user can discover and access an entity. When Search Access Controls are enabled:
This unified approach ensures that access control is applied consistently regardless of how a user attempts to discover or view an entity.
Without Search Access Controls enabled:
When Search Access Controls are enabled:
When Search Access Controls are enabled, some entity types still bypass view authorization entirely and can appear
in search without a View Entity grant. The lean baseline is declared on entities in entity-registry.yml via
viewUnrestricted: true. Optional overlays use VIEW_UNRESTRICTED_ENTITY_TYPES (full replace when non-empty) plus
_ADD / _REMOVE. All other types are restricted by default.
Stock _ADD defaults to the previous unrestricted CSV minus types already flagged in
entity-registry.yml. schemaField remains on stock _ADD, but document does not: documents are view-restricted
by default. To stop columns from appearing for users without View Entity grants:
VIEW_UNRESTRICTED_ENTITY_TYPES_REMOVE=schemaField
These are GMS environment variables (see Environment Variables). The same list
applies to core view authorization when VIEW_AUTHORIZATION_ENABLED=true on self-hosted deployments — that only
gates entity pages / post-search masking on OSS; query-time search filtering remains DataHub Cloud–only (see the
note at the top of this page). Breaking-change details: updating DataHub.
schemaField) after you restrict themOnce schemaField is removed from the unrestricted list, two different paths apply:
urn:li:schemaField:(<datasetUrn>,<fieldPath>)), then falls back to a direct grant on
the column URN. Users who can open a dataset can open its columns even when the column itself has no domains,
owners, or containers.Cloud SBAC limitations for schemaField:
| Policy shape | Datasets in search | Columns (schemaField) in search |
|---|---|---|
| Domain / container / resource-owner filters | Matched via facets on the dataset doc | Not matched — column docs lack those facets; there is no parent-domain/container/owner pushdown |
TYPE = dataset (alone or ANDed with other filters) | Matched | Excluded — the type clause requires dataset, so schemaField hits fail even if a sibling URN clause would match |
URN equals / starts-with on a dataset (and type is unset or includes schemaField) | Matched | Matched — Cloud expands URN filters with a prefix on urn:li:schemaField:(<datasetUrn>, |
So domain-scoped “View Entity on datasets in Finance” policies correctly hide Finance datasets from unauthorized
users and still allow authorized users to browse columns on the dataset page, but they will not list those
columns as separate search hits. To surface columns in search under SAC, use URN-scoped grants (without a
TYPE = dataset-only constraint), an explicit TYPE = schemaField policy, or keep schemaField unrestricted
(not recommended if columns must not leak in search).
OSS does not implement this URN-prefix search pushdown; self-hosted VIEW_AUTHORIZATION_ENABLED only gates
entity pages / post-search masking.
Search results are automatically filtered based on:
When a user performs a search:
The feature is enabled by your DataHub Cloud administrator. Contact your admin to enable Search Access Controls for your organization.
When Search Access Controls are enabled, the "Most Popular" recommendations on the home page can also be filtered to prevent information leakage.
The peer group setting controls how "Most Popular" recommendations are calculated:
| Setting | Behavior |
|---|---|
| Peer Group Enabled | Recommendations show what users in your same groups have been viewing. This allows you to see popular assets among your peers while preventing visibility into what other teams are accessing. |
| Peer Group Disabled | Recommendations are based only on your own activity. You will only see assets you have previously viewed. |
This prevents scenarios where users could infer the existence of sensitive data by seeing it appear in "Most Popular" recommendations, even if they cannot access it directly.
This section walks through a complete example of setting up Search Access Controls for an organization with two teams that need different levels of access.
An organization wants to ensure:
| Domain | Engineering Team | Finance Team |
|---|---|---|
| Engineering Data | Can View | Cannot View |
| Finance Data | Cannot View | Can View |
| Company Metrics | Can View | Can View |
Navigate to Settings > Domains and create the following domains:
<p align="center"> </p>Engineering Data
Finance Data
Company Metrics
</td>
<td style={{width: '33%', verticalAlign: 'top', border: '1px solid #333', borderRadius: '6px', padding: 0}}>
</td>
<td style={{width: '33%', verticalAlign: 'top', border: '1px solid #333', borderRadius: '6px', padding: 0}}>
</td>
Navigate to Settings > Users & Groups > Groups and create:
</td>
<td style={{width: '50%', verticalAlign: 'top', border: '1px solid #333', borderRadius: '6px', padding: 0}}>
</td>
To ensure users can only see what they are explicitly granted access to, you must disable or remove the default read access policies:
:::caution Removing the default read access policies means users will not see any entities in search results until you create explicit access policies. Plan your access policies before making this change. :::
Navigate to Settings > Permissions > Policies and click Create Policy:
Create another policy with:
</td>
<td style={{width: '50%', verticalAlign: 'top', border: '1px solid #333', borderRadius: '6px', padding: 0}}>
</td>
After creating both policies, you can view all configured view access policies:
<p align="center"> </p>Now let's verify that the access controls are working correctly by logging in as users from each group.
Alice (Engineering Team)
When Alice logs in and searches, she can only discover entities in the Engineering Data and Company Metrics domains:
<table style={{width: '100%', borderCollapse: 'separate', borderSpacing: '10px'}}> <tr> <td style={{width: '50%', verticalAlign: 'top', border: '1px solid #333', borderRadius: '6px', padding: 0}}></td>
<td style={{width: '50%', verticalAlign: 'top', border: '1px solid #333', borderRadius: '6px', padding: 0}}>
</td>
David (Finance Team)
When David logs in and searches, he can only discover entities in the Finance Data and Company Metrics domains:
<table style={{width: '100%', borderCollapse: 'separate', borderSpacing: '10px'}}> <tr> <td style={{width: '50%', verticalAlign: 'top', border: '1px solid #333', borderRadius: '6px', padding: 0}}></td>
<td style={{width: '50%', verticalAlign: 'top', border: '1px solid #333', borderRadius: '6px', padding: 0}}>
</td>
Policies can filter resources by:
What happens if an entity has no domain assigned?
Entities without a domain will not match domain-based policies. These entities will only be visible to users with policies that:
How do I grant access to specific entities rather than domains?
Use tags to identify specific entities that should be accessible. Create a tag (e.g., "Finance Approved") and apply it to the entities you want to grant access to. Then create a policy with a tag-based resource filter. This approach is more maintainable than URN-based policies since you can easily add or remove entities by updating tags.
Can I use tags instead of domains for access control?
Yes. Instead of domain filters, select "Tag" as the resource filter type. This is useful when your access boundaries align with data classification rather than organizational structure.
How do I troubleshoot when a user cannot see expected results?
Do Search Access Controls affect the GraphQL API?
Yes. The same filtering applies to programmatic access via the GraphQL API. Users will only receive entities they have permission to view.
Why do users still see columns (schemaField) without View Entity grants?
schemaField is on the stock VIEW_UNRESTRICTED_ENTITY_TYPES_ADD. Remove it with
VIEW_UNRESTRICTED_ENTITY_TYPES_REMOVE=schemaField (or set a full override with
VIEW_UNRESTRICTED_ENTITY_TYPES). Documents are view-restricted by default; if users can view them without a grant,
check whether document was added through VIEW_UNRESTRICTED_ENTITY_TYPES or _ADD. See
Entity types that bypass view checks.
After restricting schemaField, why don’t columns appear in search for users who can see the parent dataset?
Entity-page access inherits from the parent dataset, but Cloud search filtering does not. Domain, container,
and resource-owner policies match facets on the search document; column docs usually lack those facets.
Policies that set TYPE = dataset also exclude schemaField hits. URN-scoped dataset grants can match columns
via a Cloud-only URN prefix. See
Columns (schemaField) after you restrict them.
Can I create a policy that denies access instead of granting it?
DataHub policies are grant-based. To deny access, you must remove the grant. Note that you also need to disable or remove the default read access policies that grant "View Entity" to all users (see Step 3 above). Once the default policies are removed and Search Access Controls are enabled, users have no access until explicitly granted.