|
OAuth 2.0 with JSON Web Token \(JWT\)
|
To connect using OAuth 2.0 with a JWT, you must first perform the following:
- [Create and configure a GitHub App](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-change-velocity/dev-ops-github-apps-oath-jwt.md)
- [Generate the Java KeyStore certificate for GitHub](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-change-velocity/dev-ops-github-apps-oath-jwt.md)
- [Attach the GitHub Java KeyStore certificate to your instance](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-change-velocity/dev-ops-github-apps-oath-jwt.md)
After completing the prerequisites, you can continue with the DevOps Change Velocity Connect playbook activity:
1. Select the **Use an existing JWT credential record** option if you want to use an already existing JWT credential record. If this option is not selected, the fields to create a new JWT credential record are displayed. Proceed to the next step.
2. In the **JKS certificate** field, select an existing JKS certificate. This is the name you entered to uniquely identify the JWT provider. JKS certificates are created using shell commands to create a sys\_certificate record.
For more information, see [Create a JWT signing key for the GitHub JKS certificate](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-change-velocity/dev-ops-github-apps-oath-jwt.md).
3. In the **Signing key** field, enter the signing key to be assigned to your JKS certificate. This is the export password entered while [generating the JKS certificate](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-change-velocity/dev-ops-github-apps-oath-jwt.md).
4. In the **GitHub App ID** field, select the app ID of your GitHub App \(available in the About section of your GitHub App configuration in GitHub\). The following image displays an example of the About section of a GitHub App configuration from where you can access the GitHub App ID, Client ID, and Client secret.
\[Omitted image "github-jwt-about-screen.png"\] Alt text: About page of GitHub App.
5. In the **Client ID** field, select the client ID of your GitHub App \(available in the About section of your GitHub App configuration in GitHub\).
6. In the **Client secret** field, select the client secret of your GitHub App \(available in the About section of your GitHub App configuration in GitHub\).
7. In the **Token URL** field, select the location of the token endpoint that the instance uses to retrieve and refresh tokens.
For cloud version, enter: `https://api.github.com/app/installations//access_tokens`.
For enterprise version, enter: `https:///api/v3/app/installations//access_tokens`.
For the installation id, go to Install App section in your GitHub App configuration in GitHub and select the gear icon to configure your app. The installation id will be in the webpage URL. For example, https://github.com/settings/installations/<installation\_id>.
\[Omitted image "github-oauth-jwt.png"\] Alt text: GitHub Oauth 2.0 with JWT credential type.
If the OAuth credential is created using GitHub Apps - JWT, the **Configure with GitHub App** option will be available on the tool record page.
|