Skip to content

docs(spec): Credential Kind — design spec for RHOAIENG-55817#1110

Merged
markturansky merged 4 commits intoalphafrom
feat/RHOAIENG-55817-credentials-api
Apr 1, 2026
Merged

docs(spec): Credential Kind — design spec for RHOAIENG-55817#1110
markturansky merged 4 commits intoalphafrom
feat/RHOAIENG-55817-credentials-api

Conversation

@markturansky
Copy link
Copy Markdown
Contributor

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 31, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a1d14a6e-53e4-49ae-8cab-6dd2b34ef3bd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/RHOAIENG-55817-credentials-api

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ambient-code ambient-code bot added this to the Review Queue milestone Mar 31, 2026
Copy link
Copy Markdown
Contributor

@jwm4 jwm4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The basic idea here seems sound: it feels like credentials should be an important part of a data model. The enumerated types of credentials seem well aligned with the particular services that are of high priority for the platform. I'm not clear on how the "other" type credentials are intended to work or what purpose they are at this point so I have comments, but I'm not marking this as "request changes" because maybe everything here is fine and I just don't understand it.

@markturansky markturansky force-pushed the feat/RHOAIENG-55817-credentials-api branch 3 times, most recently from e0b9005 to ddec196 Compare April 1, 2026 00:17
@markturansky
Copy link
Copy Markdown
Contributor Author

@jwm4 per our convo in slack, removing 'other'. that use case will be covered with BYOMCP.

Ambient Code Bot and others added 4 commits March 31, 2026 20:31
…ne (RHOAIENG-55817)

Defines the Credential Kind data model, provider enum (github < /dev/null | gitlab|jira|google),
RBAC roles (credential:owner/reader/token-reader), API endpoints, and CLI mapping.
Removes 'other' provider per review feedback.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…BLED dev note (RHOAIENG-55817)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…n (RHOAIENG-55817)

Adds full Credential CRUD plugin with GET /credentials/{id}/token endpoint.
Removes 'other' provider from OpenAPI enum. Adds ResourceCredential, PermCredential*,
and RoleCredential* constants to permissions.go. Adds integration tests verifying
token is never returned in GET/LIST responses, /token endpoint works and requires auth.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…ubcommands (RHOAIENG-55817)

Adds CredentialAPI to go-sdk with Create/Get/List/Update/Delete/GetToken/ListAll.
Adds acpctl credential subcommands (list, get, create, update, delete, token).
Removes 'other' provider from CLI flag help strings per review.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@markturansky markturansky force-pushed the feat/RHOAIENG-55817-credentials-api branch from ddec196 to 5043177 Compare April 1, 2026 00:32
@markturansky
Copy link
Copy Markdown
Contributor Author

'other' removed. tests are green. validated locally. merging.

@markturansky markturansky merged commit d259f02 into alpha Apr 1, 2026
20 checks passed
@markturansky markturansky deleted the feat/RHOAIENG-55817-credentials-api branch April 1, 2026 13:10
@ambient-code ambient-code bot removed this from the Review Queue milestone Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants