Expose forge credentials in repository settings #385
Notifications
Due Date
No due date set.
Blocks
Depends on
Reference: sam/archie#385
Reference in new issue
Block a user
Private repository clones have no dashboard configuration path. Implement organisation-owned forge connections with secret references, repository bindings and explicit execution-identity operation permissions. Apply changes live, verify through the daemon actual access path, report structured failures, and keep daemon credentials outside containers. Supersedes exposing root forge configuration as the product model.
Acceptance criteria
An organisation admin can configure a forge connection with a secret reference and verified external account, bind repositories, and permit an execution identity specified operations. Commit author is separate from authentication. Save applies without server login/restart; show saved, applied, verified and failed truthfully. Test access exercises the daemon actual repository access path. Credential rotation reaches subsequent operations. Failures are structured by the responsible service, not classified from UI error strings. Verify an authenticated private-repository equivalent, cross-org isolation and that secrets never enter containers/logs. Production changes require separate explicit authorization.
Notes
Include repository selection from configured repository policies in new-task creation, not just historical task repositories. Recheck existing repository form issue archie-core-4vzda within this flow; do not duplicate or close it without current evidence.
Implementation 2026-10-17 (third agent, taken over after the previous session expired with no work).
Landed:
5f998122feat(controlplane): organisation forge connections. New org-owned resource kind forge-connections whose document is []config.ForgeConnection: id, name, type, host, account, a SecretRef credential and, per execution identity ID, the operations that identity may perform (clone, push, pr). Validation refuses a half credential reference, an unknown or duplicated operation, an identity permitted nothing, a duplicate or slash-bearing ID and any unknown document field, so a token value cannot be stored in place of a reference. Seeded from the file: [forge] becomes the root connection default, and each identity that declared its own forge becomes a connection permitted to that identity alone. config.Repo gained a Connection reference.c56caa45feat(controlplane): the instance forge is its root connection. RuntimeConfig layers the kind and takes the root connection as cfg.Forge, keeping the file's webhook intake and secret. A document with no root connection disables the forge rather than falling back to a file credential the operator may have withdrawn. Every organisation now holds its own empty forge-connections document instead of not-found.Verified: table-driven validation and migration tests in forge_connections_test.go; layering tests in forge_connection_layering_test.go; go build ./... and go test -short on controlplane, config and archied.
Remaining, in order:
Identity prerequisite completed in
5d6d24c1. GET org agents over gRPC returns assignment records; HTTP GET org agents returns full identity records including display_name and lifecycle for the selector. Runtime execution and task broker use canonical identity IDs. New database identities intentionally have no implicit forge client/repository access; complete authorised per-task connection resolution and operation routing rather than reintroducing root fallback. Starter-attribution ingress bug is tracked separately in 3z4fd.10.Progress 2026-10-17 (same session, after the runtime and dashboard slices landed).
Landed since the last note:
0315057d(the connections kind joins the live resource watches; a changed or rotated connection re-resolves without a restart and replaces the boot forge, the worktree token, the daemon root forge and the root task RPC servers) andef0bb0f3(a Connections page under Settings: host, forge type, credential reference, external account and per-identity operations, saved through the normal draft/save/review path). task check passed on that tree; ui/dist was rebuilt and verified against a fresh build.Live evidence gathered on an isolated state store, dashboard and daemon built from the tree, against a throwaway database:
Still open, in order:
Implemented in
e624a373: organisation repository bindings are consumed during clone and each credential-backed push/forge RPC. Connection permissions, active assigned execution identity and organisation scope are checked at the operation boundary. Credentials are resolved per operation; Git authentication uses the connection account separately from commit attribution, and pushes pin the authorised remote URL. Organisation Repositories now provides connection selection and read-only account/repository/base-branch verification through the daemon contract; new-task choices come from configured repositories. Full task check passed. Authenticated Git fixture tests cover clone, push, missing base branch, revoked permissions, rotation, organisation isolation, redirect refusal and credential absence from Git config. Live dashboard/API/daemon verification and immediate permission revocation passed. A real local task prepared the private clone but then parked on unrelated model credential requirements, tracked in 0tb7z. Startup issue discovery and legacy file credentials remain tracked in bfd9o; do not count discovery as migrated.Close reason
Implemented in
e624a373. Gated organisation connection routing, per-operation permissions, credential rotation and read-only daemon verification. Verified authenticated private Git clone/push fixtures, actual local task clone, live dashboard account/repository/branch checks and immediate permission revocation. Separate remaining discovery migration is bfd9o; unrelated model gating is 0tb7z.Imported from beads
archie-core-oygqd· GitHub #1693 · type bug · priority P1 · created 2026-10-16 · closed 2026-10-16