Qlik Sense Security Rules – Basics
🧠 What Are Security Rules?
Security rules in Qlik Sense define who can do what with which resource, based on:
-
User attributes (e.g., user name, group)
-
Resource types (app, stream, object)
-
Actions (read, update, publish)
They are written using conditions and expression logic.
🏗️ Anatomy of a Security Rule
A rule has the following components:
| Component | Description |
|---|---|
| Resource filter | Defines the type of resource (e.g., App_*, Stream_*, Sheet_*) |
| Actions | What users can do: read, update, publish, exportdata, etc. |
| Conditions | Logic to determine access (user.name, user.group, etc.) |
| Context | Determines if it applies in Hub, QMC, or both |
Examples of Basic Security Rules
🔹 1. Allow a user access to a specific stream
Goal: Grant user john.doe access to a stream called "Sales".
Rule:
-
Resource filter:
Stream_* -
Conditions:
resource.name = "Sales" and user.name = "john.doe" -
Actions:
read
🔹 2. Allow a group access to all apps in a stream
Goal: Members of the Finance group can access all apps in the "Finance" stream.
Rule:
-
Resource filter:
App_* -
Conditions:
resource.stream.name = "Finance" and user.group = "Finance" -
Actions:
read
🔹 3. Allow only the app owner to edit the app
Rule:
-
Resource filter:
App_* -
Conditions:
resource.owner.userId = user.userId -
Actions:
update
🔹 4. Allow users to publish to a stream
Goal: Let developers publish apps to the “Development” stream.
Rule:
-
Resource filter:
Stream_* -
Conditions:
resource.name = "Development" and user.group = "Developers" -
Actions:
publish
🔹 5. Prevent access to all unpublished apps
Rule:
-
Resource filter:
App_* -
Conditions:
!resource.published -
Actions:
read -
Check box: Deny access
💡 Use this as a deny rule, placed above general read access rules.
🛠️ How to Create a Rule in QMC
-
Go to Qlik Management Console (QMC)
-
Click Security Rules
-
Click Create New
-
Fill in:
-
Name
-
Resource filter (e.g.,
App_*,Sheet_*) -
Actions (e.g.,
read,update) -
Conditions using
user.andresource.attributes
-
-
Set Context (Hub, QMC, or both)
-
Click Apply
No comments:
Post a Comment