ServiceNow APIs enable the automation of processes and integration with other systems. However, these integrations can expose sensitive data and functionality to potential security threats. Improving API security is critical to protecting your ServiceNow instance and keeping your data safe. In this article, let us explore how to enhance API security practices in ServiceNow.
IMPORTANT: The REST API Explorer ignores this setting. The REST API Explorer can interact with tables with the Allow access to this table via the web services option disabled.
By default, ServiceNow REST APIs use basic authentication or OAuth to authorize user access to REST APIs/endpoints. You can also configure your instance to use multi-factor authentication to access REST APIs. The user ID that you specify in a REST endpoint call is subject to access control in the same way as an interactive user. Each request requires the proper authentication information, such as user name and password. Ensure that each endpoint request includes an Authorization header with sufficient credentials to access the endpoint.
ServiceNow REST APIs also support cookies that enable binding to the existing session. To use the certificate to call the API and information on mutual authentication, see Certificate-based authentication. REST API access policies with filter criteria such as IP, role, group, and restrict the scope of API; you can use the REST API Auth Scope. To learn more about the REST API access policy, see REST API access policies. You can craft one single policy to block the incoming request at a global REST API level by using the REST API Access policy from an outside trusted network and at a basic REST authentication level.
In addition to user authentication, each REST endpoint can have different requirements for the roles required to access the endpoint. Some require the admin role, and others require API-specific roles. Role requirements are specified in the access control list (ACL) associated with the REST API/endpoint. For specifics on the valid roles for each REST API/endpoint, refer to the REST API reference or locate the associated ACL for the API/endpoint within an instance through System Security > Access Control (ACL).
REST API ACLs define criteria, such as the roles needed and conditions that a user must meet to access a ServiceNow REST API or endpoint. A single ACL may be defined for an entire REST API, such as the Table API and Attachment API ACLs, or for an individual endpoint, such as the clotho_rest_put ACL that only applies to MetricBase PUT methods.
The following ServiceNow REST API ACLs are available in the base system but are deactivated by default. All other ServiceNow REST API ACLs are active by default.
IMPORTANT: You should never modify the names of REST API ACLs.
Implementing these best practices will significantly enhance the security of your ServiceNow Web API.
To improve ServiceNow API security, you should create robust authentication and permission procedures, encrypt data, check inputs, set rate restrictions, log actions, and use safe third-party integration. Following these recommended practices will significantly improve the security of your ServiceNow instance.