Repository navigation
Support GitHub App authentication - #26
Merged
Merged
Conversation
- start.sh: with APP_ID and APP_PRIVATE_KEY_FILE, make an RS256 JWT with openssl, get an installation token (1 hour), and use it like the PAT. APP_INSTALLATION_ID is optional. The PAT (ACCESS_TOKEN_FILE) still works. - tests/app-jwt.sh: checks the JWT claims and signature. Runs in CI. - README: GitHub App setup and a Compose override example. - Dockerfile: install openssl explicitly. .gitignore: *.pem. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The runners can use a GitHub App instead of a PAT. An App belongs to the org, has no expiration date, and does not stop working when a user leaves.
start.sh: whenAPP_IDandAPP_PRIVATE_KEY_FILEare set, it makes a JWT (RS256, valid for 9 minutes) withopenssl, gets an installation token (valid for 1 hour) and uses it like the PAT for the registration and removal tokens.APP_INSTALLATION_IDis optional: if it is not set, the runner gets it fromGET /orgs/{org}/installation.ACCESS_TOKEN_FILE) still works. If both are set, the App has priority. With neither, the script stops with a clear message.sudo, like the PAT, so a0600Compose secret works.tests/app-jwt.sh: checks the header, the claims (iss,iat,exp, max. 10 minutes) and the RS256 signature with a new key. Runs in thesysboxjob.docker-compose.override.ymlexample withsecrets: !override.Dockerfile:opensslin theapt-getlist (already in the base image)..gitignore:*.pem.Test plan
shellcheck: no findings.0600, other owner): GitHub refuses it, and the runner stops with the clear error.docker compose configmounts onlygithub_app-key.sysboxjob passes.🤖 Generated with Claude Code