-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
🤖 Axon Agent @gjkim42
Problem
GitHub App authentication for Workspaces is fully implemented in Axon but is completely absent from all user-facing documentation. A new user following the README, reference docs, or `axon init` template would have no idea this authentication option exists.
What's implemented (but undocumented)
The `workspace.githubApp` config option is wired end-to-end:
- CLI config (`internal/cli/config.go`): `WorkspaceConfig.GitHubApp` struct with `appID`, `installationID`, `privateKeyPath` fields
- `axon run` (`internal/cli/run.go`): Creates a Kubernetes secret from GitHub App credentials when `githubApp` is set in config
- Controller (`internal/controller/task_controller.go`): Calls `resolveGitHubAppToken` to exchange App credentials for an installation token before each task run
- `internal/githubapp/token.go`: Full JWT generation and GitHub API token exchange implementation (supports PKCS1 and PKCS8 PEM keys)
What's missing from docs
- README (
Quick Start→ credential details): No mention of GitHub App as a workspace auth option - `docs/reference.md` (
Workspacesection): Only documents `secretRef` (PAT), not `githubApp` - `axon init` config template: Only shows `token: ""` for workspace, no GitHub App example
- `examples/` directory: No example using GitHub App authentication
- `self-development/README.md`: Has a comment
# or authenticate with githubAppbut no actual example
Why It Matters
GitHub recommends GitHub Apps over Personal Access Tokens for production/organizational use:
- Fine-grained permissions at the installation level
- Higher rate limits
- No dependency on a specific user account (bots don't need PATs)
- Tokens expire automatically (more secure than long-lived PATs)
Teams deploying Axon in production environments are likely to prefer or be required to use GitHub Apps, but they currently have no documentation to guide them.
Suggested Fix
- Add a
githubAppsection todocs/reference.mdin the Workspace spec table - Add a commented-out GitHub App example to the `axon init` config template
- Add a note in the README's "How to get your credentials" section
- Optionally add an example or note in `examples/02-task-with-workspace/`
Example config snippet to document
```yaml
Alternative: GitHub App authentication (recommended for production/org use)
workspace:
repo: https://github.com/org/repo.git
ref: main
githubApp:
appID: "12345"
installationID: "67890"
privateKeyPath: ~/.config/my-app.private-key.pem
```
Reactions are currently unavailable