feat(api): REST API for repository onboarding and management
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- aws, typescript
Research direction
Start with docs/design/REPO_ONBOARDING.md and the existing repo policy route, GET /repos/{repo_id}/policies, to trace the API handler, authorization, and persistence patterns. Then read cdk/src/blueprints/definitions.ts, cdk/src/handlers/shared/types.ts, and cli/src/types.ts for the current config and validation boundaries. Done means implementing and documenting authenticated repo CRUD, shared validation, secret handling, and CLI integration; this issue leaves several design choices open, so coordinate them with maintainers first.
Written by the indexing model from the issue text.
Description
Component
API or orchestration
Describe the feature
Add a REST API for onboarding and managing repositories at runtime, so operators can register, update, and offboard repos without editing CDK and redeploying, and without holding AWS credentials with direct DynamoDB access.
Today repository management has three disjoint paths:
- CDK
Blueprintconstruct (canonical) — add an entry tocdk/src/blueprints/definitions.tsand redeploy; the custom resource writes aRepoConfigrow toRepoTable. bgagent repo list | show | onboard | offboard(from #378) — writesRepoTabledirectly using the operator's AWS credentials, bypassing the API, its auth, and its validation.- REST — the only repo-scoped route is
GET /repos/{repo_id}/policies. There is no repo CRUD.
docs/design/REPO_ONBOARDING.md states this directly: "There is no runtime API for repo CRUD."
Use case
- Platform teams embedding ABCA into an internal developer portal or software factory want to onboard repos programmatically (e.g. when a new service repo is created) via an authenticated HTTP API, not a CDK change + deploy or a CLI that needs IAM write access to DynamoDB.
- Workshop / multi-team deployments need to add repos in minutes without a ~10 minute
cdk deploy. - The operator web console cannot offer repo management without a backend API.
- Distributing IAM credentials with
RepoTablewrite access to every repo admin is a wider blast radius than a scoped, audited API.
Proposed solution
Endpoints (Cognito-authenticated, admin-gated):
| Method | Path | Purpose |
|---|---|---|
GET |
/v1/repos |
List onboarded repos (status, model, compute type, updated_at); paginated |
POST |
/v1/repos |
Onboard / re-activate a repo (owner/repo, model, token secret ref, optional overrides) |
GET |
/v1/repos/{repo_id} |
Full RepoConfig (secret ARNs redacted) |
PATCH |
/v1/repos/{repo_id} |
Update mutable fields |
DELETE |
/v1/repos/{repo_id} |
Soft delete (status=removed + TTL, same as Blueprint removal) |
Design points:
- Same schema and validation as
Blueprint. Reuse the construct's validation (repo pattern, model allowlist, budget bounds fromcontracts/constants.json, egress domain pattern) in a shared module so API- and CDK-onboarded repos are indistinguishable to the orchestrator. Reject models that are not granted to the runtime (see #805) and verify the token can reach the repo at onboard time rather than failing at turn 0. - Authorization. Require membership in an admin Cognito group (e.g.
abca-repo-admins) for writes, and/or a scoped platform API key (repos:manage) via the existing unified Cognito-or-API-keyRequestAuthorizerused for webhook management. Reads could be open to authenticated users or gated similarly. - CDK vs API precedence. Record the provenance of each row (
source: cdk | api) and document precedence — e.g. CDK-managed rows are read-only via the API (409 with guidance), or last-writer-wins with a warning. CDK users who want repo config in Git keep the Blueprint path. - Secrets. Accept a Secrets Manager ARN reference for per-repo tokens; never accept or return raw token values. Orchestrator IAM must be able to read referenced secrets (today this requires
additionalSecretArnsat deploy time — the API path needs a scoped pattern or tag-based grant). - CLI. Move
bgagent repo onboard | offboard | list | showonto the API so they no longer need AWS credentials (keep the direct path behind a flag for break-glass if desired). - Types/docs. Update
cdk/src/handlers/shared/types.ts+cli/src/types.ts,docs/design/API_CONTRACT.md, andREPO_ONBOARDING.md.
Other information
-
This is section 2 ("Runtime repository onboarding API") of RFC #377, split out so it can ship independently of the larger infra/runtime deploy split. See the split request on #377.
-
Related: #378 (CLI operator commands, closed), #476 (principal-to-repo authorization — natural follow-on once repos are API-managed), #805 (
repo onboard --modelvalidation), #369 (mapping repos with no Blueprint), #443 (re-onboarding on default-branch drift), #453 (OpenAPI publication), #1022 (user and team management API). -
I may be able to implement this feature
-
This might be a breaking change
- Dominant language
- TypeScript
- Stars
- 185
- Forks
- 54
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 27
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws-samples/sample-autonomous-cloud-coding-agents
-
docs(security): record the fail-open content-screening posture as an ADR (extend ADR-009 or add ADR-023)Possibly taken @krokoko claimed this 3 days ago. Opendocumentation P2 security
Difficulty 2/5 1-2 days Newbie friendliness 74/100
aws-samples/sample-autonomous-cloud-coding-agents#793 ·
Maintainers usually reply within 1 day
-
Docs: How to clear previously set attributes for a blueprintPossibly taken @krokoko claimed this 3 days ago. Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
aws-samples/sample-autonomous-cloud-coding-agents#767 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aws-samples/sample-autonomous-cloud-coding-agents#749 · 1 comment ·
Maintainers usually reply within 1 day
-
Harden /review_prs Stage-2 sketch against `args` arriving as a JSON stringPossibly taken @krokoko claimed this 3 days ago. Openenhancement P2
Difficulty 1/5 Under an hour Newbie friendliness 92/100
aws-samples/sample-autonomous-cloud-coding-agents#670 ·
Maintainers usually reply within 1 day
-
documentation security
Difficulty 2/5 1-2 days Newbie friendliness 75/100
aws-samples/sample-autonomous-cloud-coding-agents#493 ·
Maintainers usually reply within 1 day
All issues in aws-samples/sample-autonomous-cloud-coding-agents
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pingdotgg/t3code#42253 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
vercel-labs/ui#1108 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 Half a day Newbie friendliness 62/100
garethgeorge/backrest#1451 ·
Maintainers usually reply within 1 day
-
fix(core): \.pluck() returns values in key insertion order instead of requested argument orderPossibly taken @ManyaS-Git claimed this 1 day ago. Openstatus:in-linear
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
n8n-io/n8n#45027 · 1 comment ·
Maintainers usually reply within 1 day
-
Activity indicator ignores prefers-reduced-motionPossibly taken @CapThunder19 claimed this today. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
joinmarket-webui/jam#1675 ·
Maintainers usually reply within 3 days