-
Notifications
You must be signed in to change notification settings - Fork 118
server, agent: github app installation clone support #1242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
benbroadaway
wants to merge
9
commits into
master
Choose a base branch
from
github-app-clone-basic
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
brig
reviewed
Nov 17, 2025
...lation/src/main/java/com/walmartlabs/concord/github/appinstallation/AccessTokenProvider.java
Outdated
Show resolved
Hide resolved
brig
reviewed
Nov 17, 2025
agent/src/main/java/com/walmartlabs/concord/agent/AgentAuthTokenProvider.java
Show resolved
Hide resolved
mtkunkel
previously approved these changes
Dec 2, 2025
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.
Minimal support for cloning repos from GitHub app installation credentials (use private key to generate JWT -> access token).
System-provided auth is defined in server and agent configs in the
github.appInstallationsection. See default conf for description.User-provided app installation info (e.g. client id, private key) must be in a single-value secret containing JSON-formatted data like:
{ "githubAppInstallation": { "apiUrl": "https://api.github.com", "clientId": "the-client-id", "privateKey": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowI..." "username": "x-access-token", "urlPattern": "(?<baseUrl>github.com)/owner/.*" } }apiUrlandusernameare optional and default tohttps://api.github.comandx-access-token, respectively.Caching
In order to keep traffic to the GItHub API down, tokens are cache (Default 50 minutes) in memory for re-use on subsequent clones/fetches for the same repo. While clones don't count against the rate limit, there's benefits to caching the tokens. It may take 250-500ms typically to generate a token before cloning which adds up in a busy environment, and cached tokens take <1ms to access.
sequenceDiagram participant GitHub participant concord-server participant server-token-cache participant concord-agent participant agent-token-cache concord-server->>+server-token-cache: get token for repo server-token-cache-->>server-token-cache: cached installation token for repo server-token-cache-->>server-token-cache: validate token expiration server-token-cache-->>+GitHub: or Generate new token GitHub-->>-server-token-cache: new 1-hour installation client token server-token-cache->>-concord-server: installation token concord-server->>+concord-server: clone repo concord-server->>+concord-agent: dispatch workflow concord-agent->>+agent-token-cache: cached installation token for repo agent-token-cache-->>agent-token-cache: validate token expiration agent-token-cache-->>+GitHub: or Generate new token GitHub-->>-agent-token-cache: new 1-hour installation client token agent-token-cache->>-concord-agent: installation token concord-agent->>+concord-agent: clone repo concord-agent->>+concord-agent: start workflow runner