Harneet Sital
Mega Sage
Mega Sage
 
Comments
Shakeel Shaik
Giga Sage
Giga Sage

Great video.

Randheer Singh
ServiceNow Employee
ServiceNow Employee

Hi @Harneet Sital  @Shakeel Shaik 

There is a platform-provided capability to enforce a specific authentication method for an API.

Please check the API access policy feature. 

 

You have to install the REST API Access Policy plugin (com.glide.rest.policyplugin. While creating the authentication profile for the API access policy, you can choose the authentication method (Basic AuthID TokenCertificate-based Auth, or OAuth). You can optionally also add a policy in the profile to enforce IP/location restrictions.

My esteemed colleague @Jason Nichols has created this awesome video series on YouTube for scripted REST APIs. This series also includes the API access policy feature.

Thanks,

Randheer

Randheer Singh
ServiceNow Employee
ServiceNow Employee

Harish V
Giga Guru

@Randheer Singh ,

 

On the Standard auth profile record (table std_http_auth) that already exists in the instance "OAuth token" there is no OAuth Entity associated by default. Can I leave this blank and create a REST API access policy with "global" checked(Vancouver) to block all basic auth attempts? I want to extend this to apply IP Filter criteria.

 

The main question I have is can I leave "OAuth Entity" field blank in the standard auth profile record and proceed to create a rest api access policy?   

Version history
Last update:
‎09-26-2023 01:55 PM
Updated by:
Contributors