docs/features/feature-guides/search-access-controls.md
import FeatureAvailability from '@site/src/components/FeatureAvailability';
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:
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.
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.