Page History
HTML |
---|
<style> .release-box { height: 30px; width: 100px; padding-top: 8px; text-align: center; border-radius: 5px; font-weight: bold; background-color: #8efeb3#828995; border-color: #FCE28A; } .release-box:hover { cursor: hand; cursor: pointer; opacity: .9; } </style> <meta name="robots" content="noindex"> <div class="release-box"> <a href="https://docs.perspectium.com/display/kryptonLithium" style="text-decoration: none; color: #FFFFFF; display: block;"> KryptonLithium </a> </div> |
DataSync meshlets that target a database, like the Snowflake meshlet, require making API calls to your ServiceNow instance in order to obtain the schemas of tables you are sharing. This way the meshlets know the table's structure to create the table properly in the target database.
By default, the meshlets use Basic Authentication to make API calls to your instance. However, you can also have the meshlet use ServiceNow's OAuth 2.0 implementation to make the API calls.
With the OAuth 2.0 implementation, the meshlet will initially use your credentials configured in the meshlet's configuration file to request an access token from your ServiceNow instance it will then use for accessing the table schema API. If the access token expires, it will use the refresh token to request a new access token. If the refresh token is expired, it will start the process all over again, using your credentials configured to request a new access token.
Prerequisites
- Configure your ServiceNow instance as an OAuth API endpoint for external clients. You can also see here and here for additional details on setting this up in your ServiceNow instance.
- Create a ServiceNow user. This user must have the perspectium role in order to access the table schemas through the ServiceNow APIs. You can specify the user to have the Web service access only option selected if this user should only be used for the integration and not be able to login to your ServiceNow instance.
ServiceNow OAuth Configuration
For a meshlet to connect to your ServiceNow instance using OAuth, you will need to include the following configurations under perspectium.auth:
Key | Default Value | Description | |||||
---|---|---|---|---|---|---|---|
type | basicauth | The type of authentication/authorization to use for connecting to your ServiceNow instance to get table schemas. To use ServiceNow's OAuth 2.0 implementation, enter the value servicenowoauth. If no value is specified, this will default to basicauth and use Basic Authentication.
| |||||
username | Username for connecting to your ServiceNow instance. These credentials are used for the first request of an access token from your instance and if necessary, to request the access token again when your refresh token is expired. NOTE: This user must have the perspectium role. You can select the Web service access only option for this user if this user should only be used for the integration and not be able to login to your ServiceNow instance.
| ||||||
password | Password for connecting to your ServiceNow instance. These credentials are used for the first request of an access token from your instance and if necessary, to request the access token again when your refresh token is expired. NOTE: This user must have the perspectium role. You can select the Web service access only option for this user if this user should only be used for the integration and not be able to login to your ServiceNow instance.
| ||||||
clientId | The Client ID when you created the OAuth API endpoint for external clients in your ServiceNow instance. These credentials are used to request the access token from your instance and refresh the token when it expires.
| ||||||
clientSecret | The Client Secret when you created the OAuth API endpoint for external clients in your ServiceNow instance. These credentials are used to request the access token from your instance and refresh the token when it expires.
|
Example of a meshlet configuration yaml file
The example below shows a basic configuration of the meshlet configuration yaml file (i.e. application.yml or application-dev.yml)
Code Block | ||
---|---|---|
| ||
perspectium: auth: url: https://acmedev.service-now.com type: servicenowoauth username: user1 password: password123 clientId: abcabcabcabc clientSecret: def456^) |