GitHub Authorization
Scope
GitHub authorization in Claustrum is workspace-scoped and project-oriented.
- One workspace connects one GitHub App installation (default model).
- Repo metadata is synced into workspace-local cache.
- Project roles are derived from GitHub permissions.
Workspace-Level GitHub App Installation
Flow:
- Connect GitHub App for a workspace.
- Store installation metadata.
- Sync repositories into
github_repo_links. - Link repositories to Claustrum projects.
Repo -> Project Auto Creation
Claustrum supports repo-driven project provisioning.
- Default repo key form:
github:owner/repo - Shared mode: use repo-level project only.
- Split modes: optional subproject expansion policy.
Permission Calculation
Project-level GitHub permission is computed as:
final_perm = max(direct_collaborator_perm, team_derived_perm)
Permission order:
admin > maintain > write > triage > read
Team Mapping
Team relationships are integrated through:
- repo -> teams
- team -> members
- member -> Claustrum user link
Claustrum resolves project role from GitHub permission through configurable role mapping.
Partial Recompute via Webhooks
Webhook processing targets only impacted repositories.
installation_repositories: sync changed repos and recompute changed scope.team/membership: recompute repos affected by the team.repositoryrename: metadata refresh; permission recompute is optional.team_add/team_remove: invalidate affected cache and recompute affected repo.
Cache Strategy
Claustrum caches GitHub graph slices for performance.
github_repo_teams_cachegithub_team_members_cachegithub_permission_cache
Rules:
- Use TTL for normal reads.
- Invalidate by event scope on webhook updates.
- Overwrite or rebuild permission cache on recompute.
Sync Modes
| Mode | Behavior |
|---|---|
add_only | Adds/upgrades roles. Does not remove stale access. |
add_and_remove | Adds, upgrades, or removes roles to match GitHub, while keeping protection rules. |
Operations Tips
Large Organizations and Rate Limits
- Use partial recompute instead of full recompute whenever possible.
- Use cache TTL tuned to event volume.
- Batch manual sync by repo subsets.
Permission Debugging Checklist
- Confirm installation is connected to the target workspace.
- Confirm repo is synced and linked to a project.
- Confirm GitHub user link exists for the Claustrum user.
- Inspect permission preview for direct/team max result.
- Inspect webhook delivery status and recompute audit logs.