-
Couldn't load subscription status.
- Fork 61
Closed
Labels
Description
The Microsoft GitHub org is restricting PAT lifetimes and will eventually require the usage of fine-grained PATs. Current guidance is to migrate all interactions with the Microsoft GitHub org to use a GitHub App by the end of FY25.
How to create the app
- Create the app on personal github account
- Permissions are defined at app creation time - this app probably just needs repo content write access
- Record the App's Client ID somewhere - probably a pipeline variable group (it can be found on the App's management page)
- Transfer ownership to the
dotnetorg - Add .NET containers team members as managers/admins of the App
- Get the app installed on the
microsoftorg - Create a private key for the app and store it in our KeyVault
How to authenticate as an app
- Use the app's private key and Client ID to generate a JWT
- Exchange the JWT for an installation-specific token
- Use the token to authenticate to GitHub as the app
Step 1 is not handled by OctoKit or Dotnet.VersionTools.Automation. For step 2, we could add support for the installation token endpoint to VersionTools, or use OctoKit as a helper to exchange tokens. For step 3, we should be able to use the app installation token just like any other token with the VersionTools client. Migrating entirely to OctoKit is not necessary at this time.
Related
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done