ServiceNow and GitHub integration using GitHub App for authentication.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
I want to configure an integration between ServiceNow and GitHub such that, an issue gets created in GitHub after a RITM is approved in ServiceNow. I am using the "GitHub Spoke" for achieving this.
The client has a "GitHub App" configured on their end in GitHub. I am currently authenticating with the GitHub App as a User, meaning we are authenticating on behalf of the functional account that we have in place. This leads to the creation of issues under that account on GitHub.
The issue is that these functional accounts have their access revoked on GitHub periodically, which breaks the integration until we request access again. So, we would like to prevent this dependency on an account by switching to - Authenticating with the GitHub App as the App itself and not on the behalf of a user. This prevents the need of having a functional or a service account.
Please let me know if anyone has performed a similar integration with GitHub.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
To switch from user-level authentication to authenticating as the GitHub App itself, you need to replace your static user credentials with dynamic GitHub Installation Access Tokens, which post issues under your-app[bot] and bypass user account lifecycles entirely. To set this up in ServiceNow, get your App ID, Installation ID, and Private Key (.pem) from your GitHub admin, then create a custom Flow Designer Action (or Script Include) that signs a temporary JWT using RS256 and posts it to [https://api.github.com/app/installations/](https://api.github.com/app/installations/){installation_i.... GitHub will return an installation token valid for one hour, which your RITM approval flow can fetch on demand and pass dynamically into the Authorization: Bearer <token> header of your GitHub Spoke "Create Issue" action.