Skip to main content

Configure custom-object permissions

Configure who can find each custom ServiceNow object's records in Glean. These settings apply to custom objects, not to the existing permission models for native objects.

Choose a permission model​

Glean supports ServiceNow Access Control List (ACL) evaluation and rules based on identity fields. Choose a model that matches how your ServiceNow table controls access.

Identity type in GleanUse whenRequired setup
ACLAccess depends on the individual record, including scripted or conditional access checksA ServiceNow Scripted REST API endpoint that evaluates each user's access to each record
ACL roleTable access depends on roles in read ACLs without scripts or conditionsRead access to ServiceNow ACL metadata and role membership
Group, User criteria, Audience, UsersReadable fields on the record or a related table identify who can access itField paths that reference the selected identity type
Match the source access policy

ACL role does not evaluate scripted or conditional ACLs. Don't use it to reproduce access that depends on those checks. Use record-level ACL evaluation instead, and verify both allowed and denied users before making the content available.

Prerequisites​

Complete the following prerequisites:

  • Enable custom-object support and configure the ServiceNow connector. See Configure ServiceNow objects and fields.
  • Give the service account read access to the custom table and any fields or related tables used to determine permissions.
  • Work with your ServiceNow administrator to choose the permission model and complete its source-side setup before enabling indexing.

The service account's ability to crawl a record is separate from an end user's ability to find it in Glean. Test with end-user accounts, not just the service account.

Configure record-level ACL evaluation​

Glean evaluates record access during identity crawling through a customer-hosted ServiceNow endpoint. Work with Glean Support and your ServiceNow administrator to set up and validate this endpoint before selecting ACL.

Prepare the endpoint​

The endpoint must accept authenticated GET requests at:

/api/glt/glean_acl/record_access

Glean sends these query parameters:

ParameterValue
userThe ServiceNow user's sys_id
tableThe ServiceNow table name
recordThe record's sys_id

Glean authenticates with the connector's OAuth bearer token. Grant the service account access to this endpoint. The implementation must evaluate the requested user's effective record access, not the service account's access.

The HTTP response body must contain a top-level result object with the following fields. Replace the illustrative identifiers with the values from the request:

{
"result": {
"user_sys_id": "<user-sys-id>",
"table": "change_request",
"record_sys_id": "<record-sys-id>",
"record_exists": true,
"can_read_record": true
}
}

Glean grants access through this rule only when the user, table, and record match the request and both Boolean fields are true. For an existing record that the user can't read, return record_exists: true and can_read_record: false.

Validate the actual HTTP response, including the result wrapper, before testing search results. Don't assume that a successful HTTP status means the permission check succeeded.

Select ACL in Glean​

Configure the custom object's permission rule:

  1. Go to Admin console → Connectors, open your ServiceNow connector, and open Objects.
  2. Open the custom object's three-dot menu and select Edit.
  3. Open Permissions and click Add permission rule.
  4. Select ACL and set Access to Can read. This rule doesn't require a source table or field path.
  5. Click Save.

For a new object, create the permission configuration during the add-object flow and select the same rule.

After setting up or changing record-level ACL evaluation, work with Glean Support to run a full identity crawl and refresh the affected content. An incremental identity crawl alone doesn't create the full user snapshot needed for record-level evaluation.

Configure table-level ACL roles​

Use ACL role for role-only access rules. Glean reads active read ACLs for the table and its table.* field-wildcard layer, then resolves the roles assigned to users.

Prepare ServiceNow access​

Give the service account read access to both sys_security_acl and sys_security_acl_role, including the fields used for role discovery. Access to the custom content table alone isn't sufficient.

Glean checks ACLs on the exact table and its table.* pattern. It doesn't follow parent-table ACL inheritance. If a custom table relies only on ACLs inherited from a parent such as task, Glean finds no usable table-level role and keeps its documents private under ACL role.

Review the table's existing ACLs with your ServiceNow administrator:

  • Glean uses roles from ACLs that have no advanced scripting or conditions. It ignores roles on scripted or conditional ACLs.
  • The table-level read ACLs must supply at least one usable role. Without one, this permission model doesn't grant access to the table's documents.
  • If the table.* ACLs also supply roles, a user must satisfy both layers. Roles within a layer combine as alternatives.
  • If the table.* layer supplies no usable roles, Glean adds no field-wildcard restriction. A scripted or conditional wildcard ACL is not a substitute for a supported role restriction.

For example, if the table allows role_a or role_b and table.* requires role_c, a user must have (role_a OR role_b) AND role_c.

Do not remove or weaken ServiceNow ACLs to make this model fit. Choose ACL instead when the effective source policy requires scripts, conditions, or per-record evaluation.

Select ACL role in Glean​

In the custom object's Permissions tab, add an ACL role rule and set Access to Can read. No field path is required. Click Save, then allow identity and content crawling to refresh before you test visibility.

Don't use Cannot read with ACL role

Glean currently treats Cannot read with ACL role as Can read, not as a deny rule. Don't use this combination to restrict access.

Configure field-based rules​

Choose Group, User criteria, Audience, or Users when fields identify the allowed or denied identities. These are explicit permission mappings, not automatic evaluation of the table's ServiceNow ACLs.

  1. In the custom object's Permissions tab, click Add permission rule and choose the identity type.
  2. Set Access to Can read or Cannot read.
  3. Set Source table to This table when the identity is on the content record. Otherwise, select the related table that stores the permission relationship.
  4. Select the Identity field path. Its final reference must match the identity type: sys_user_group, user_criteria, sn_cd_audience, or sys_user.
  5. For a related source table, also select the Content field path that links its rows to the content record.
  6. Click Save.

For example, a Group rule can use an assignment_group field that references sys_user_group. Review that mapping with your ServiceNow administrator rather than assuming that assignment alone grants source access.

Glean combines field-based Can read rules as follows:

  • For rules that read directly from the content record, Glean skips a readable field with an empty value. A missing or unreadable field instead makes the document private.
  • Rules with the same Source table and Content field path count as one group. Matching any allowed identity from any returned row in that group is sufficient. A group with no allowed identities adds no read restriction.
  • A user must match every remaining rule or group. Cannot read rules take precedence. If no rule or group supplies allowed identities, Glean keeps the document private.

For example, with a Group rule on assignment_group and a Users rule, a record with an empty assignment group is controlled by the Users rule alone. Don't rely on an empty field to deny access.

Read every permission relationship

The service account must be able to read all fields and relation rows used for permissions, including deny rows. If ServiceNow hides a deny row entirely, Glean can't distinguish it from a nonexistent row, which can make access too broad. Use only readable fields and unconditional relation rows for this model.

Verify access​

After the relevant identity and content crawls finish, test a known record with users who should and should not see it. Compare Glean results with ServiceNow access, including users affected by roles, assignments, and deny rules.

If expected records are missing, check the selected permission model, service-account access, and crawl completion. For ACL, also check the endpoint's response for the same user and record. For ACL role, check both ACL metadata tables and the roles available from each ACL layer.

If a user sees a record they shouldn't, turn off crawling for the object and contact Glean Support to review the permissions and existing indexed content. Turning off crawling does not immediately remove previously indexed results. See Enable or turn off crawling for an object.