Incorrect Token URL when setting up GitLab Spoke along with GitLab application

Elihu El
Tera Contributor

My goal is to create and invoke GitLab commands via ServiceNow Actions using a GitLab Spoke.  I am attempting to setup my GitLab Spoke (Connect to a GitLab application) in ServiceNow using the instructions found at: 

Google: “servicenow.com” "GitLab Spoke"

 

The error comes when I attempt to get the OAuth Token here:

ElihuEl_8-1664817200378.png

 

…while logged into ServiceNow as admin, attempt to test it by copy-and-pasting the Token URL {Get OAuth Token} into the browser, I authorize ServiceNow application within GitLab:

ElihuEl_0-1664819038820.png

 

…, then this is displayed:

ElihuEl_10-1664817200400.png

 

Questions:

1. Is there any insight why this is not working or where I could find the correct Token URL?

 

 

2. It is plausible that this may arise with OAuth when the endpoints cannot communicate due to security/networks issues.  However, both ServiceNow and GitLab are accessible on the same domain and not www publicly accessible.  Are the Mid-servers adequate to authenticate OAuth 2.0? 

 

 

3. The instructions explicitly state that the “Send Credentials” within the ServiceNow Application Registry should be set to <In Request Body (From URL-Encoded)>. 

ElihuEl_11-1664817200411.png

 

…If I change the “Send Credentials” to <As Basic Authentication Header>, would the change allow me to use the mid-server and the credentials for the GitLab spoke to connect to our GitLab instance while not compromising security?

 

 

4. What is the best means of testing the connectivity of the GitLab spoke to GitLab using an outbound RESTful Authentication action from ServiceNow?

 

9 REPLIES 9

Keshav9
Tera Contributor

Identified any solution ?

This worked for me. Thanks!

This worked for me! Just make sure to also update the callback URL in GitLab too so they both match.

Elihu El
Tera Contributor

Slide1.JPG

 

Slide2.JPG

 

Slide3.JPG

 

EOL.jpg