Exploring Access Control Lists
Summarize
Summary of Exploring Access Control Lists
Access Control Lists (ACLs) in ServiceNow define the permissions required for users to access specific objects and operations within the system. Each ACL rule specifies the object being secured, the operations allowed, and the permissions needed for access. This functionality is crucial for maintaining data security and ensuring that only authorized users can perform certain actions.
Show less
Key Features
- Components of ACLs: ACLs consist of the object type and name (e.g., records, fields) that need protection, the operations that can be performed (e.g., create, read, write), and the permissions required for access, which can include user roles, conditions, and scripts.
- ACL Evaluation Process: The system evaluates ACL rules against user permissions whenever data is requested. Access is granted only if all specified permissions are met for the matching ACL rule.
- Pre and Post Query Checks: ACLs are checked both before and after a query to determine access to fields and records, allowing for dynamic control based on user role and the context of the request.
- Permission Types: Different operations (e.g., create, read, write) have specific impacts on what users can see or do, such as preventing visibility of fields or restricting record modifications.
- Scoped Applications: ACL rules can be created for objects within the same application scope, with limitations on cross-scope rules, which enhances security and control over data access.
Key Outcomes
By effectively configuring ACLs, ServiceNow customers can:
- Protect sensitive data by restricting access based on user roles and conditions.
- Ensure that only authorized actions are performed on records and fields, enhancing overall system security.
- Maintain compliance with internal policies and external regulations by defining clear access parameters.
- Facilitate effective user management and streamline the evaluation of access rights within their organization.
Explore Access Control Lists (ACL).
Components of ACLs
- The object and operation being secured
- The permissions required to access the object
The object is the target to which access needs to be controlled. Each object consists of a type and name that uniquely identifies a particular table, field, or record.
For example, all these entries specify an object:
| Type | Name | Object secured |
|---|---|---|
| record | [incident].[--None--] | The Incident table. |
| record | [incident].[active] | The Active field in the Incident table. |
| REST_Endpoint | user_role_inheritance | The record for the user_role_inheritance Scripted REST API. |
Each operation describes a valid action the system can take on the specified object. Some objects, such as records, support multiple operations, while other objects, such as a REST_Endpoint, only support one operation.
For example, all these entries specify an operation:
| Type | Name | Operation | Operation secured |
|---|---|---|---|
| record | [incident].[-- None --] | create | Creating records in the Incident table. |
| record | [incident].[active] | write | Updating the Active field in the Incident table. |
| REST_Endpoint | user_role_inheritance | execute | Running the user_role_inheritance scripted REST API. |
- One or more user roles to the Requires role list.
- One or more conditions.
- A script that evaluates to true or false or sets the
answervariable to true or false.
To gain access to an object and operation, a user must pass all permissions listed in an access control. For example, this access control restricts access to view operations on the incident table.
To update a record in the incident table, a user must have the listed roles and the record must meet the condition.
| Permission type | Requirement | Description |
|---|---|---|
| Requires role | Requires role:itil | Only allow users with the itil role to update incidents. |
| Condition | [Incident state] [is not] [Closed] | Only allow updates to active incident records. |
ACL evaluation process
An ACL rule only grants a user access to an object if the user meets all permissions required by the matching ACL rule.
- The condition must evaluate to true.
- The script must evaluate to true or return an answer variable with the value of true.
- The user must have one of the roles in the required roles list. If the list is empty, this condition evaluates to true.
- [Record ACL rules only] The matching table-level and field-level ACL rules must both evaluate to true.
Whenever a session requests data, the system searches for access control rules that match the requested object and operation. If there’s a matching access control rule, then the system evaluates if the user has the permissions required to access the object and operation. If an access control rule specifies more than one permission, then the user must meet all permissions to gain access to the object and operation. Failing any one permission check prevents the user from accessing the matching object and operation.
The effects of being denied access to an object depend on the ACL rule that the user failed. For example, failing a read operation ACL rule prevents the user from seeing the object. Depending on the object secured, the ACL rule hides a field on a form, hides rows from a list, or prevents a user from accessing a UI page. The following table contains a complete list of results of failing an ACL rule for a given operation and object type.
Pre and post query ACL checks
- Pre-query ACL check
Before your instance runs a database query, it checks the ACL rules for each field in the queried table to determine which fields a user may access. This check only looks at the user's roles, and checks to see if these roles allow access to fields. Because this check runs before the query, the ACL doesn't have access to the records on the table, so it can’t take that data into account. Scripts and conditions that rely on knowing the contents of a record aren’t evaluated.
If the user doesn't have read access at this point, the value for the field isn’t shown to the user.
- Post-query ACL check
After the query, your instance checks each record returned by the query. During this check, there’s context for the ACL, so the role, condition, and script portions of the ACL are evaluated. If the user doesn't have read access at this point, the value for the field isn’t shown to the user, however the user sees the field label if their roles allow access to the field.
| Operation | Results of failing an ACL rule on object |
|---|---|
| execute | User can’t execute scripts on a record or UI page. |
| create | User can’t see the New UI action from forms. The user also cannot insert records into a table using API protocols such as web services. A create ACL with a condition requiring that a field contain a specific value may evaluate as false. Fields on new records are considered empty until the record is saved. |
| read | User can’t see the object in forms or lists. The user also can’t retrieve records using API protocols such as web services. |
| write | User sees a read-only field in forms and lists, and the user can’t update records using API protocols such as web services. |
| delete | User cannot see the Delete UI action from forms. The user also can’t remove records from a table using API protocols such as web services. |
| edit_task_relations | User cannot define relationships between task tables. |
| edit_ci_relations | User cannot define relationships between Configuration Item [cmdb_ci] tables. |
| save_as_template | Used to control the fields that should be saved when a template is created. |
| add_to_list | User can’t view or personalize specific columns in the list mechanic. |
| list_edit | User can’t update records (rows) from a list. |
| report_on | User can’t create a report on the ACL table. For more information, see Restrict report creation with an ACL rule. |
| report_view | User can’t view the content of a report on the ACL table or on the ACL field. For more information, see Reporting. |
| personalize_choices | User can’t right-click a list field and select Configure Choices. |
ACL matching requirements for objects
| Object Type | Matching ACL Rules Required to Access Object | Existing wild-card ACL Rules |
|---|---|---|
| Client-callable script includes | Users must meet the permissions of two ACL rules:
|
By default, there are no wild-card (*) rules for these object types. If you create a wild-card ACL rule for one of these objects, then the ACL rule applies to all objects of this type. |
| Processors | ||
| UI pages | Users must meet the permissions of two ACL rules:
|
By default, there are wild-card table rules (*) for the create, read, write, and delete operations and wild-card field rules (*.*) for the personalize_choices, create, and save_as_template operations. When you create a table, create ACL rules for the table unless you want to use the provided wild-card ACL rules. |
| Record |
Multiple ACL rules at the same point in the processing order
If two or more rules match at the same point in the processing order, the user must pass any one of the ACL rules permissions to access the object. For example, if you create two field ACL rules for incident.number, then a user who passes one rule has access to the number field regardless of whether the user failed any other field ACL rule at the same point in the processing order.
Required role
Normal admin users can view and debug access control rules. However, to create or update existing access control rules, administrators must elevate privileges to the security_admin role. See Elevate to a privileged role for instructions.
ACL rules in scoped applications
You can create ACL rules for objects in the same scope as the ACL rule. You can also create ACL rules for tables with at least one field that is in the same scope as the ACL rule.
- You can create an ACL rule for any table, UI page, or other object that is in the same scope as the ACL rule.
- You can create an ACL for a field that is in the same scope as the ACL rule.
- If the table is in the same scope, you can use a script to evaluate permissions.
- If the table is in a different scope, you can’t use a script to evaluate permissions.
- You can’t create or modify ACL rules for objects that are in a different scope than the application you’ve selected in the application picker, including adding a role to an ACL in a different scope.
- You can create wild-card table rules (*) only in the global scope.
- You can create wild-card field rules (*) only for tables in the same scope as the ACL rule.