Row-level security and safe practice¶
A slicer, page filter, hidden column, or a "North Revenue" measure is not an authorization boundary. RLS governs eligible rows for assigned roles; access to a workspace/model must also be configured correctly.
A static role on a dimension¶
In the disposable practice model choose Manage roles, create a role named NorthReader, select DimRegion, and use this rule:
DimRegion[Region] = "North"
Use View as to inspect that role. Revenue should be 4100. The active Region relationship filters Sales. Adding a normal report slicer does not grant access to South rows.
REMOVEFILTERS in a measure cannot remove the security filter to reveal
unauthorized rows. Test the actual secured query rather than assuming that
ordinary filter experiments prove access control.
Desktop testing is only part of validation¶
Publishing and role assignment are separate service-side operations. RLS applies to the appropriate viewer/read access scenario, not indiscriminately to workspace editors/administrators. Test with the intended identity and permissions after any real deployment.
This repository does not publish a model or assign users. Do not experiment with production permissions or put actual user mappings/credentials into contributions. A dynamic security design needs its own identity/mapping requirements, relationship tests, and service-level validation.
Security checklist¶
- Confirm role expression, dimension grain, and intended filter propagation.
- Check every relevant report/query path and combinations of roles.
- Verify workspace/model permissions and service-side identity.
- Include empty/unmapped identity behavior in a dynamic design.
- Do not generalize unprotected USERELATIONSHIP examples to an RLS model.
- Use synthetic records and remove temporary test roles from disposable files.
Done when: you can explain why a North-only slicer is not security and why desktop View as does not prove every service access scenario. Reference: RLS in Power BI.