Repository navigation
feat(credentials): set up keyless credentials from the v2 API, CLI and Sim MCP - #9875
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
[High impact] The PR appears safe to merge; no actionable issues remain. SummaryAdds keyless credential setup through the v2 API, CLI, and Sim MCP.
|
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
…d Sim MCP Keyless (workload identity) credentials could only be set up in the web connect dialog. Platform teams scripting their cloud trust now get the same two steps as an API: 1. POST /api/v2/credentials/workload-identity/subjects (`sim credentials keyless-subject <providerId>`) issues a random, per-credential subject and a 24-hour proof bound to the caller, plus the keylessConfig to fill in and the provider's required fields. 2. The existing create (`sim credentials create … --credentials @keyless.json`) submits the completed config; Sim verifies the trust before saving. - The existing prepare use case now also admits personal API keys and OAuth tokens with api:write. Workspace keys and delegated callers stay refused, because the subject must belong to a person. - Every keyless refusal carries one stable `error.details.code` (WORKLOAD_IDENTITY_NOT_CONFIGURED, _PROOF_EXPIRED, _PROOF_INVALID, _SUBJECT_REQUIRED, _SUBJECT_IN_USE, _SUBJECT_UNVERIFIABLE) on a single refusal error, from create, reconnect and the subjects route alike. - The provider catalog advertises a `keyless` object (authType and required/optional config fields) only when the deployment can sign, and the CLI reads it instead of keeping its own provider table. Snowflake's keyless config is now accepted by the CLI. - Provider hints, OpenAPI, MCP tool descriptions, CLI help and the five credential docs pages describe the flow the same way. - AWS and Databricks keyless create and reconnect also refuse with WORKLOAD_IDENTITY_NOT_CONFIGURED when the deployment cannot sign, and their verification steps pass keyless refusals through unchanged. Each provider's refusal names a fallback credential type. - The Google Cloud keyless hint says it covers Cloud services (BigQuery, Vertex AI), not Google Workspace.
06850ac to
804f968
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
Keyless (workload identity) credentials for AWS, Databricks, Snowflake, Microsoft and Google could only be set up in the web connect dialog. Platform teams that script their cloud trust can now do it from the v2 API, the CLI and the Sim MCP server. It is the same two-step pattern as Datadog's AWS external-ID flow: issue an identifier, configure trust, then create.
POST /api/v2/credentials/workload-identity/subjects(sim credentials keyless-subject <providerId> --output json).keylessConfigto fill in, and the provider'srequiredConfigFields.sim credentials create <providerId> --credentials @keyless.json).serviceAccountJsonon its own. It does this only when the input carries a subject and proof, or the provider's keylessauthType, so a mistyped field still gets "unsupported field".api:write. Workspace API keys and delegated (Copilot) callers stay refused, because the subject has to belong to a person. The checks are unchanged: write role andintegrations.manage,publicApirate limit, and workspace concealment.error.details.code:WORKLOAD_IDENTITY_NOT_CONFIGURED,_PROOF_EXPIRED,_PROOF_INVALIDand_SUBJECT_REQUIREDreturn 400._SUBJECT_IN_USEand_SUBJECT_UNVERIFIABLEreturn 409.KeylessCredentialRefusedError. Refusals that aren't keyless keepdetails.providerErrorCodeas before.keylessobject (authType, required and optional config fields) only when the deployment can sign tokens. Agents are never told keyless is available where it isn't. The CLI reads this from the catalog instead of keeping its own provider table, which also makes Snowflake's keyless config work from the CLI.--helpand the five credential docs pages all describe the flow the same way, with one generic example. The CLI retry hint names the command to run for a new subject.Type of Change
Testing
api:write. An unknown or inaccessible workspace returns 404. A caller over the rate limit gets 429. An unconfigured deployment returnsNOT_CONFIGURED.bun run lint; type-check forapps/simandpackages/sim-cli.check:openapi,check:cli-api,check:mcp-operations,check:cli-docs,check:v2-route-table,check:api-validation:strict,check:boundaries,check:test-patterns,check:comment-hygiene,check:client-boundary,check:explicit-any,check:docs./simplifyand/cleanup.Checklist
test-auditauthoring gate)