Integrate with GitHub Enterprise Server
Integrating your Software Asset Management application with the GitHub Enterprise Server application help you track your software subscriptions and reclaim unused licenses.
Important: Minimize security risks and protect information by granting access only to the necessary user or API permissions.
| Process | Required user role in the GitHub Enterprise Server application | Authentication scopes |
|---|---|---|
| Download subscriptions | site admininistrator | site_admin |
| Reclaim subscription | site admininistrator | site_admin |
Generate an API access token for GitHub Enterprise Server
Generate a token that you can use to access the GitHub Enterprise Server API.
Before you begin
GitHub Role required: site administrator
About this task
The GitHub repository hosting service uses personal access tokens to grant users access to the GitHub API. Personal access tokens function similarly to OAuth access tokens by authorizing API requests. By generating a personal access token to authorize your GitHub Enterprise Server API requests, you can gain access to the GitHub Enterprise Server API.
Procedure
From a web browser, open your GitHub Enterprise Server instance.
Sign in to your GitHub account.
On the GitHub page header, select your profile photo and then select Settings.
Your profile settings open.
From the left navigation pane, select Developer Settings.
Your developer settings open.
From the left navigation pane, select Personal access tokens.
On the Personal access tokens page, select Generate new token.
If you’re prompted to confirm your password before proceeding, enter your GitHub password and then select Confirm password.
On the New personal access token form, describe the purpose of the token in the Note field.
In the Select scopes form section, enable the site_admin OAuth scope by selecting the site_admin check box.
OAuth scopes limit the level of access that the application has to your protected resources. The site_admin OAuth scope enables you to manage your enterprise users, organizations, and repositories.
Select Generate token.
Your personal access token generates.
Copy the access token and save it in a secure location for later use.
Create a GitHub Enterprise Server integration profile
Create a GitHub Enterprise Server integration profile to track software subscriptions and optimize licensing for your GitHub Enterprise Server applications.
Before you begin
To create a GitHub Enterprise Server integration profile, request the Software Asset Management - SaaS License Management plugin (sn_sam_saas_int) from the ServiceNow Store.
ServiceNow Role required: sam_integrator
Important: You must select the GitHub Spoke check box for this integration while installing optional features on the Application Manager page. For more information about choosing the required SaaS applications, see Request SaaS License Management.
About this task
If you’re using Software Asset Workspace, the option to create the GitHub Server integration profile in Core UI is inactive.
Procedure
- Navigate to the integration profile.
| Interface | Action |
|---|---|
| Core UI |
|
| Software Asset Workspace |
|
- On the form, fill in the fields.
| Field | Description |
|---|---|
| Display Name | Name of the integration profile. For example, `GitHub Server Integration`. |
| Status | Status of the integration profile.- If you have not published the integration profile, this field is automatically set to Draft. - If you have already published the integration profile, this field is automatically set to Published. |
| Profile type | Type of integration profile. This field is automatically set to github_server_subscription. |
In the Process configuration section, review the required user roles or API permissions specified in the Vendor configuration field for each process to minimize security risks and optimize SaaS licenses.
Note: For more information about the required roles and scopes, see Minimal user permissions table.
The Download subscriptions check box is selected by default and you can't clear it.
Note: The Download Activity check box is selected by default. If you clear it, the activity scheduled job SAM - Refresh <displayname> Activity isn't created.
In the Analyze user activity field, you can also select the date and time starting from when you want to analyze the user activity. By default, you can analyze user activity up to 60 days prior to the current date and view events performed by individual users from the time you create this profile.
Note: Software Asset Management pulls the events from the time that you start analyzing user activity irrespective of the profile creation date.
You can modify this value in the Last activity threshold field of your software reclamation rules. For more information, see Review a software reclamation rule.
The Reclaim subscriptions check box is selected by default. If you don't want to reclaim subscriptions, you can clear this check box. If you clear it, the removal candidates are created but the reclaim subscription subflow isn't triggered or the reclamation process isn't initiated.
Select Save.
Your ServiceNow instance creates a draft integration profile.
The Connection & Credential field appears and is automatically set to sn_github_spoke.GitHub_Server.
Open the connection & credential aliases record by selecting the preview icon
No alternative text supplied
next to the Connection & Credential field and then selecting Open Record in the record preview.
On the Connection & Credential Aliases form, select the Create New Connection & Credential related link.
In the Create Connection and Credential dialog box, fill in the fields.
| Field | Description |
|---|---|
| Connection Name | Name of the GitHub connection. |
| Connection URL | URL of the GitHub API endpoint. Enter `https://api.github.com`. |
| Use MID Server | Option that enables your ServiceNow instance to use a MID Server for communication with your GitHub Enterprise Cloud applications.- If your instance requires a MID Server, set this field to true. - If your instance doesn’t require a MID Server, leave this field empty. Important: To enable this option, you must already have a MID Server set up on your instance. See MID Server for detailed instructions. |
| API Key | Personal access token that enables you to access the GitHub Enterprise Cloud API. - If the GitHub spoke version installed is 2.2.5 or higher, enter `
What to do nextAfter the integration connects, your ServiceNow instance automatically creates software models, reclamation rules, and software subscriptions that are refreshed daily. After creating an integration profile, view information about the profile in the Software Asset Workspace by navigating to License operations > User subscription > Direct integration profiles. You can select an integration profile to view the following related lists. If all of the following related lists aren't visible for an integration profile in the default view, you can select the custom integration view from the Details tab:
After creating an integration profile, you can define subscription exclusion rules to keep certain subscriptions from license cost calculations. For more information, see Subscription exclusions for SaaS and SSO applications. If you want to set up multiple integration profiles with unique connections, create child aliases to manage different configurations and settings for each integration profile. For more information, see Create a child alias to set up multiple integration profiles. Review all automatically generated reclamation rules to reclaim user subscriptions. For more information, see Review a software reclamation rule. Create software entitlements for the automatically generated software models to track used software against owned software.
Reconciliation also runs on your subscriptions as a scheduled job or on-demand. You can view your reconciliation results in the License Workbench (Software Asset Management classic application) or the License usage view (Software Asset Workspace). Use these results to determine your license compliance position and to remediate any non-compliance.
|