Skip to content

feat(credentials): configurable audience for keyless AWS, Databricks, Snowflake, Microsoft, and Google credentials - #9962

Merged
waleedlatif1 merged 3 commits into
stagingfrom
fix/databricks-keyless-audience
Nov 13, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
fix/databricks-keyless-audience

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Keyless saved credentials can set their own audience (the aud claim of the token Sim signs). A trust configuration can then pin a value specific to the customer instead of the shared default, so a Sim token isn't accepted somewhere it wasn't meant for. This covers all five keyless providers:
    • AWS: the IAM OIDC provider client ID and the trust policy aud condition
    • Databricks: federation policy audiences. Databricks' own default is the account ID.
    • Snowflake: OIDC_AUDIENCE_LIST. Snowflake's docs warn that the shared snowflakecomputing.com allows cross-account reuse.
    • Microsoft Entra: the federated credential's single audience
    • Google: the provider's allowedAudiences. STS still exchanges at the provider resource name.
  • One shared mechanism in workload-identity/audiences.ts:
    • a submit schema: at most 255 characters (AWS's client ID cap), limited to URI/ID characters so every setup snippet pastes without escaping, and refusing another cloud's default audience;
    • a stored field schema;
    • storedAudienceField, which stores nothing for the default.
  • Same audience everywhere: every mint uses the stored audience, including the connect-time subject-pin probe, so the probe tests what runs will present.
  • Reconnect: reopens on the stored audience. Each provider now has one stored<X>ReconnectFields reader (one parse) instead of separate auth-type and audience readers.
  • Connect dialogs: an editable Audience field, defaulting to the current value. The trust snippets update to match: AWS trust policy, Databricks policy command, Snowflake CREATE USER, gcloud --allowed-audiences.
  • Docs, API and CLI: each provider page has a "use your own audience" section. The API and CLI document keylessConfig.audience.
  • Backward compatibility: credentials saved without an audience mint exactly the old default and keep the same stored shape, so the old strict schemas still read them. A custom-audience credential is refused by older pods during a mixed-version window; it is never sent with the wrong audience.

Type of Change

  • New feature

Testing

  • Each provider's server tests cover:
    • a custom audience in verification, the pin probe and runs;
    • default stored shape unchanged;
    • cross-cloud refusal before any network call;
    • the error copy naming the audience;
    • the Microsoft token cache, which never serves a token minted for an old audience.
  • prepare-workload-identity covers reconnect reopening on a custom audience for all five providers. audiences.test.ts covers the shared schema.
  • Revert proofs: each guard was reverted and its test went red.
  • 1,841 tests pass across lib/credentials, app/api/v2/credentials and lib/api/contracts, plus 554 sim-cli tests.
  • bun run lint and check-block-registry.ts origin/staging pass.
  • These audits pass: check:openapi, check:cli-api, check:cli-docs, check:mcp-operations, check:api-validation:strict, check:test-patterns, check:comment-hygiene, check:explicit-any, check:client-boundary, check:boundaries, check:utils, check:file-names and check:docs.
  • Type-check and the full suite run in CI.
  • I checked each provider's official docs for custom-audience support and syntax (IAM CreateOpenIDConnectProvider, Databricks federation policy API, Snowflake workload identity federation, Entra federated identity credentials, Google workload identity pool providers).

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

… Snowflake, Microsoft, and Google credentials
@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 13, 2026 12:05am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge; no new actionable issues remain.

Summary

Adds custom audiences to keyless credentials for AWS, Databricks, Snowflake, Microsoft, and Google.

  • Keyless credentials can sign tokens for a custom audience.
  • Connect dialogs let people set the audience their cloud should trust.
  • Reconnects and API setup keep the selected custom audience.
  • Provider guides explain how to trust a custom audience.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Default or custom audience] --> B[Check submitted value]
  B --> C[Save custom audience only]
  C --> D[Sign tokens with saved audience or default]
  D --> E[Cloud checks issuer, audience, and subject]
  D --> F[Google STS still targets the provider resource]
Loading

Reviews (3) · Last reviewed commit: "fix(credentials): name Google's default ..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 37 files

Confidence score: 3/5

  • In google-keyless-fields.tsx, the displayed Google resource name can be persisted as a custom audience instead of being treated as the provider default. Normalize it against providerAudience before building the value.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/app/workspace/[workspaceId]/integrations/components/connect-service-account-modal/google-keyless-fields.tsx">

<violation number="1" location="apps/sim/app/workspace/[workspaceId]/integrations/components/connect-service-account-modal/google-keyless-fields.tsx:114">
P2: Typing the displayed Google provider resource name is persisted as a custom `audience`, because the shared setup has no Google-specific default to compare against. Normalize it against `providerAudience` before building the config so the default remains omitted and mixed-version pods continue accepting it.</violation>
</file>

Turn on auto-fix | Re-trigger cubic

Comment thread apps/docs/openapi-v2-resources.json Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 38 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

This branch was previously deployed

1 inactive deployment
Preview — 473ddbb2 Deployed Nov 13, 2026 by vercel[bot]
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.

1 participant