Query ACLs
Summarize
Summary of Query ACLs
Query ACLs in ServiceNow provide granular control over user queries by explicitly defining who can query specific data. They enhance security by restricting or enabling access based on detailed query operations, preventing unauthorized data extraction through blind query attacks.
Show less
When to Use Query ACLs
- Implement query ACLs whenever columns contain sensitive data requiring partial or conditional access.
- Use them to enforce row- and column-level access controls, particularly when data filters do not fully enforce restrictions.
- Consider use cases like payroll and HR data, where users may see limited data but should be prevented from querying broader ranges or sensitive fields (e.g., salary ranges or SSNs).
Key Features and Behavior
- Operations: Query ACLs operate using two types:
- querymatch: Supports safe operators such as EQUALS, NOTEQUALS, IN, NOTIN, SAMEAS, and others designed to fetch specific records without exposing additional data. Passing this allows users to submit match queries; failing denies such queries.
- queryrange: Includes operators like STARTSWITH, CONTAINS, >=, <=, which enable broader range queries and sorting. Passing allows unrestricted range queries and sorting; failing restricts these capabilities.
- Default Behavior: If no query ACL exists, a default star.star ACL delegates to read access. Defined query ACLs override this default, providing precise control over query permissions.
Practical Impact for ServiceNow Customers
By implementing query ACLs, customers can:
- Prevent unauthorized users from performing broad or range-based queries on sensitive data.
- Control access to specific fields or rows even when users have partial visibility, enhancing compliance and data privacy.
- Mitigate risks from blind query attacks by restricting query operations to safe, predefined conditions.
Query ACLs allow you to define more granular access control by explicitly defining who can query the data.
What is a query ACL
A query ACLs have their operation set to either query_range or
query_match. Query ACLs allow for more specific control of user queries, restricting or enabling access based on their
setup.
Query
ACLs are powerful tools against blind query attacks, where an attacker blindly queries the data to extract information from results, even when they can't see the values.
When to use a query ACL
Wherever a column contains sensitive values, and allows partial/conditional access to data a query ACL should be considered and implemented as necessary based on the sensitivity of the data. Wherever there is a partial/conditional access to rows and their columns in tables, especially where that access is not enforced by data filters, query ACLs should be implemented as necessary based on the sensitivity of the data.
Payroll query control
I can see one row in payroll table with my salary, but there is no reason for me to be able to issue range queries to query users with a salary contained within 2 boundaries. Aquery_range ACL on salary would prevent me from issuing that query.HR query control
I can see all hr_profiles, but can only see SSN for myself. I have no business querying SSN, and query ACLs should prevent me from running queries against SSN of other hr profiles to try to extract SSN mappings.
Query ACL behavior
query_match and query_range operations for secure and granular table
querying behavior. Their behaviors are described below:query_match-
query_matchis composed of: EQUALS, NOT_EQUALS, IN, NOT_IN, SAMEAS, NSAMEAS, ANYTHING, ISEMPTYSTRING, ISEMPTY, ISNOTEMPTY, ISNULL, ISNOTNULL.query_matchis made of the "safe operators", in a sense that they are built to fetch specific record(s), and can't be exploited to return others.Evaluation outcome Result Pass User can submit match queries Fail User will not be able to submit match queries: - EQUALS
- NOT_EQUALS
- IN
- NOT_IN
- SAMEAS
- NSAMEAS
- ANYTHING
- ISEMPTYSTRING
- ISEMPTY
- ISNOTEMPTY
- ISNULL
- ISNOTNULL
query_range-
query_rangeis composed of all the others (STARTS_WITH, CONTAINS, >=, <= etc) which are more dangerous as they allow users to query for more records by adjusting the boundary values.Evaluation outcome Result Pass User can submit range queries and sorting is unrestricted Fail The user will not be able to submit range queries with (STARTS_WITH, CONTAINS, >=, <=, etc. Sorting by column is restricted
Query ACLs (both query_match and query_range) default to a star.star ACL that delegates to read access. This means, where ACLs are enforced on queries, if no query ACL was created then read access to the column is evaluated ; if query ACLs are defined then they override the default behavior.