{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":38189,"path":"platform-administration/ai-search/content-security-ais.md","title":"Content security in AI Search","bundle":null,"doc_type":null,"release":"australia","body":"\n# Content security in AI Search\n\nAI Search filters search query results and displays only records that the currently logged in user can access.\n\nContent security is automatically enabled and isn't configurable.\n\n## Indexed security features\n\nWhen indexing records from ServiceNow AI Platform® tables, AI Search preserves the following access control settings:\n\n-   Role-based field-level [access control list rules](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/access-control-rules.md) \\(ACLs\\)\n-   Non-scripted conditional ACLs\n-   Scripted table-level ACLs\n-   [Before Query business rules](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/bp-before-query-business-rules.md)\n-   [Domain separation](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-administration/ai-search/ai-search-domain-separation.md)\n-   [User criteria](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/servicenow-platform/t_CreateAUserCriteriaRecord.md) for records indexed from the Knowledge \\[kb\\_knowledge\\] and Catalog Item \\[sc\\_cat\\_item\\] tables\n\nAI Search doesn't support scripted field-level ACLs or conditional field-level ACLs.\n\n## Early and late binding security implementations for search queries\n\nAt query time, AI Search filters search results by evaluating user access to indexed tables and records. The filtering implementation used depends on the security features present on tables and records that match the search query.\n\n<table id=\"table_a3q_bz4_5mb\"><thead><tr><th>\n\nContent security implementation\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nEarly binding\n\n</td><td>\n\nDefault content security implementation that incorporates security filters into the search query. The system adds relevant security filters for the user to each search query. To appear in the search results, records must match the search query and pass all security filters.\n\n Early binding security supports non-scripted ACLs, Before Query business rules, and domain separation, plus user criteria for records indexed from the kb\\_knowledge and sc\\_cat\\_item tables. If a search matches records that have table-level scripted ACLs, the search query automatically falls back to use late binding security.\n\n **Note:** If an early binding filter produces an error, the search query automatically falls back to use late binding security.\n\n</td></tr><tr><td>\n\nLate binding\n\n</td><td>\n\nMore computationally expensive alternate content security implementation that post-filters search query results. The system applies security filters to the search query just as early binding security does. After retrieving records that match the filtered query, it invokes the [GlideRecord.canRead\\(\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/server-api-reference/c_GlideRecordScopedAPI.md) method for each record. To appear in the search results, records must match the search query, pass all security filters, and return **true** for the API method.\n\n Late binding security supports all indexed security features.\n\n By default, late binding security serves as a fallback mechanism for early binding security. You can override this default behavior in the following ways:\n\n-   To make AI Search use late binding security for all results from an indexed source, set the value of that indexed source's **Force Late Binding** field to **true**.\n-   To make AI Search use late binding security for all search results, set the value of the **Force AI Search to use late binding for ACL evaluation** \\(**glide.ais.security.force\\_late\\_binding**\\) system property to **true**.\n\n If AI Search applies late binding security to any results from an indexed source used by a facet, the list of available filter selections for the facet changes. When this happens, the facet only displays field values found in the current page of search results. For details on facets, see [Create a facet in an AI Search application configuration](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-administration/ai-search/create-facet-ais.md).\n\n When you enable search result counts for facets in a search application, the counts indicate the number of results that matched the user's search. Late binding security can remove results after they’re counted, causing the actual number of displayed results to be lower than the count. For more information on search result counts for facets, see [Show search result counts for facets on the results page for a search application](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-administration/ai-search/display-result-counts-ais.md).\n\n</td></tr></tbody>\n</table>## Content security for external content\n\nAI Search preserves access permissions when ingesting external documents. You can alias ServiceNow AI Platform users to the externally defined users and groups specified in these access permissions. AI Search constructs content security filters for external document records from these permissions and aliases.\n\nTo learn about using AI Search with external data sources, see [Indexing and searching external content in AI Search](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-administration/ai-search/external-content-ais.md). For full details on external content security, see [External content security for AI Search](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-administration/ai-search/external-content-security-ais.md).\n\n**Parent Topic:**[Administering AI Search](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-administration/ai-search/administer-ais.md)\n\n"}}