CEL Conditions & Access Patterns
This page covers how to grant users access to policy-tagged data using CEL (Common Expression Language) conditions
Objective
This page covers how to grant users access to policy-tagged data using CEL (Common Expression Language) conditions. For an overview of policy tags, the gate chain, and how to bind tags to data, see Policy Tags Overview.
Table of Contents
Granting Access with CEL Conditions
Granting a user access to policy-tagged data is a two-part process:
- Assign the policy tag value to the user via the Grant Access UI in Lakehouse Manager
- Verify or edit the CEL condition on the user's role binding in the Identity Access Manager
Using the Grant Access UI
The Grant Access UI provides a quick way to assign policy tag values to users:
-
Open the Grant Access menu.
-
Select the policy tag you want to assign and specify the access type: Read for read-only access, or Read and Write for both.
-
Assign the policy tag values (e.g.,
access_level: level 1) to the user or group.
-
Confirm and save the access settings.
Important limitation: The Grant Access UI generates a CEL condition without Resource-level scoping. This means the condition is evaluated at every level of the gate chain (dataset, table, attribute). If the policy tag is only applied at the table level, the dataset-level check will fail and the user will be denied access. You must manually edit the CEL condition in the IAM to add Resource scoping. See Writing CEL Conditions Manually below.
Note: Users without Advanced Data Access Control permissions cannot read or write to any dataset, table, or attribute by default. This can be verified in the IAM settings for the user.
Writing CEL Conditions Manually
To correctly scope policy tag access, you must edit the CEL condition on the user's role binding in the Identity Access Manager.
The Grant Access UI generates a CEL condition like this:
This condition checks PolicyTags.sensitivity == "high" at every resource level. If the dataset doesn't have sensitivity: high (only the table does), the dataset check fails and the user is denied.
To fix this, edit the CEL condition to scope the policy tag check to specific resource levels using Resource:
This condition means:
- At the dataset level: always pass (no tag check needed)
- At the table level: require
sensitivity: high - At the attribute level: always pass (no tag check needed)
To edit the CEL condition:
- Open the Identity Access Manager and navigate to the user or group.
- Find the ADAC role binding (the one with Service
adac). - Click Edit on the condition.
- Switch to the CEL editor and replace the generated condition with the Resource-scoped version.
- Save.
Note the comment // Permissions are managed in Lakehouse Manager. Do not update here! on line 1. This is auto-generated by the Grant Access UI. You can safely replace the CEL content below it with your Resource-scoped condition.
Common CEL Patterns
Below are ready-to-use CEL patterns for common scenarios. In each pattern, replace tag keys and values with your own.
Critical: Any resource level with a plain pass-through (e.g., || Resource == "dataset") has no tag enforcement at that level. Only use pass-throughs for levels where you intentionally want to skip tag checks. All patterns below list conditions in gate chain order: dataset → table → attribute.
1. Enforce tags at ALL levels (dataset, table, and attribute), recommended for full access control:
This checks tags at every level. A user with level 1 + level 2 can access the dataset, tables tagged up to level 2, and attributes tagged up to level 2. Attributes tagged level 3 will be denied.
2. Enforce tags at table level only (dataset and attribute pass-through):
Use this when you only tag tables and don't need dataset-level or attribute-level restrictions. Note: attribute-level tags are not enforced with this pattern.
3. Grant access to tables that do NOT have a specific tag:
4. Enforce at dataset level only (all tables and attributes pass through):
Use this when you only need to gate access at the dataset level. All tables and attributes within the dataset are accessible if the dataset gate passes.
5. Enforce at dataset and table levels (attribute pass-through):
Attribute-level tags are not enforced with this pattern.
6. Enforce at attribute level only:
7. Combine multiple tag values (user needs any of the listed values):
For more information on CEL syntax, operators, and the visual condition builder, see Roles and Conditions, CEL Conditions.
Best Practices
-
Always tag at the dataset level first. Since the gate chain starts at the dataset, an untagged dataset with tagged tables creates a confusing setup. Set a baseline tag on the dataset.
-
Use Resource-scoped CEL conditions. Never rely on the default CEL generated by the Grant Access UI for production access control. Always edit the CEL to include
Resourcescoping. -
Order CEL checks as dataset → table → attribute. This matches the gate chain evaluation order and makes conditions easier to read and debug.
-
Keep tag structures simple. Use a single tag key (e.g.,
sensitivity) with a small number of values (e.g.,public,internal,restricted). Avoid deeply nested tag combinations. -
Grant cumulative tags. Remember that users need tags for every level in the chain. If a user needs
restrictedtable access, they also need whatever tag is on the parent dataset. -
Test with a dedicated user. Before rolling out access policies, create a test user and verify each level of the gate chain independently. See Testing Access Control.
-
Audit CEL conditions regularly. As policy tags change, CEL conditions on role bindings may become stale. Review them when modifying tag bindings.
-
Document your tag schema. Keep a record of which tag keys and values are in use, what they mean, and which resources they're bound to.
Go further
If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for a custom analysis of your project.
Ask questions, give your feedback and interact directly with the team building the Data Platform on the dedicated Discord channel.
If you need support with your OVHcloud services, create a request in our Help Centre.
Join our community of users.

