Skip to content

Commit d259f02

Browse files
markturanskyAmbient Code Botclaude
authored
docs(spec): Credential Kind — design spec for RHOAIENG-55817 (#1110)
## Summary - Introduces `Credential` as a first-class Ambient Kind in the platform data model spec - Adds `docs/internal/design/credentials-session.md` — full design spec with ERD, ownership model, API/CLI reference, usage examples, and open questions - Updates `docs/internal/design/ambient-model.spec.md` to reflect the desired state: new Credential entity, `RoleBinding.scope` extended with `credential`, new roles (`credential:owner`, `credential:reader`), Credentials API and CLI sections ## What this is This is a **spec-only PR** — no code changes. The goal is design review before implementation begins. The reconciler will use this spec as the desired state to surface implementation gaps. Key design decisions captured: - `Credential` is platform-scoped (not project/agent-scoped) to support shared Robot Accounts - Ownership via `RoleBinding(scope=credential, role=credential:owner)` — consistent with Agent ownership pattern - Token is write-only; never returned via standard REST API - Scope hierarchy (agent → project → global) for credential resolution at session ignition - Runner token endpoint shape is marked TBD (open question in the design doc) ## Test plan - [ ] Design review — read `docs/internal/design/credentials-session.md` - [ ] Verify ERD changes in `ambient-model.spec.md` are consistent with the design doc - [ ] Answer open questions in `credentials-session.md` before implementation begins Closes RHOAIENG-55817 (design phase) 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Ambient Code Bot <bot@ambient-code.local> Co-authored-by: Claude <noreply@anthropic.com>
1 parent d07332f commit d259f02

44 files changed

Lines changed: 7460 additions & 959 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/context/api-server-development.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ Migration rules:
195195
- `AMBIENT_ENV=integration_testing` spins up ephemeral Postgres via testcontainers-go
196196
- Requires podman socket: `systemctl --user start podman.socket`
197197
- `DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock`
198+
- **Always set `TESTCONTAINERS_RYUK_DISABLED=true`** — ryuk tries to connect to `/var/run/docker.sock` which is unavailable; without this flag tests abort before running
198199
- Mock DAOs (`mock_dao.go`) for unit tests without DB
199200
- Presenter nil safety: nil-guard each nullable field independently — `UpdatedAt` and `CreatedAt` can be nil independently; treating them as a pair causes panics
200201

@@ -208,6 +209,7 @@ cd components/ambient-api-server
208209
make generate # Regenerate OpenAPI Go client from openapi/*.yaml
209210
make binary # Compile the ambient-api-server binary
210211
make test # Integration tests — spins up testcontainer PostgreSQL
212+
# Full invocation: DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock TESTCONTAINERS_RYUK_DISABLED=true AMBIENT_ENV=integration_testing go test -p 1 -v ./...
211213
make test-integration # Run only ./test/integration/... package
212214
make proto # Regenerate gRPC stubs from proto/
213215
make proto-lint # Lint proto definitions

components/ambient-api-server/cmd/ambient-api-server/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515

1616
// Backend-compatible plugins only
1717
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/agents"
18+
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/credentials"
1819
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/inbox"
1920
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/projectSettings"
2021
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/projects"

0 commit comments

Comments
 (0)