Skip to content

feat(providers): add a Snowflake example provider profile (token substituted at sign-in) #6067

Backlog

Description

@zozo123

User Story

I use OpenShell to run Snowflake's Cortex Code CLI (cortex) as a sandbox's main process, against a Snowflake account. I need the sandbox to hold no Snowflake credential while the agent can still sign in to exactly one account. I have run this on OpenShell 0.1.9 with a provider profile I wrote by hand. This affects anyone who gives an agent access to a Snowflake account.

Problem Statement

providers/ has no example for a service whose API host is different for every customer and whose credential travels in the JSON body of a sign-in request, not in an Authorization header. A user has to work out three things unaided:

  • the host must be pinned to one account: a wildcard such as *.snowflakecomputing.com lets the proxy send the token to any account;
  • body rewriting must cover only the sign-in request (request_body_credential_rewrite on one POST path);
  • the rest of the host needs its own entry with no rewrite, because every endpoint in a profile that declares credentials is treated as credentialed and must be inspected.

Impact / Why This Matters

Without a reviewed example, users put the token in the sandbox environment, where the agent can read it, or write a profile that sends it to every path or every account. The existing files (github.yaml, openrouter.yaml, oci-genai.yaml and others) cover header-borne credentials and inference endpoints; none uses request_body_credential_rewrite or a per-customer host. The per-deployment host problem was described in #2547.

Proposed Design

Add providers/snowflake.yaml, a reviewable example in the format of the existing files:

  • a header comment with the client binary and image layout, credential scope, endpoint access, limits and a smoke test;
  • one credential, SNOWFLAKE_TOKEN (a Snowflake programmatic access token); the sandbox holds a placeholder;
  • one endpoint entry for the account host, port 443, POST /session/v1/login-request only, with request_body_credential_rewrite: true;
  • a second entry for the same host with access: full and no rewrite, so queries and API calls pass inspected;
  • binaries naming the CLI path, with a comment on the ancestry match;
  • the account host written as myorg-myaccount.snowflakecomputing.com, which the user replaces, as providers/README.md already tells users to edit hosts.

Notional use:

openshell profile import -f providers/snowflake.yaml
openshell provider create --name snowflake --type snowflake --from-existing   # reads SNOWFLAKE_TOKEN
openshell sandbox create --provider snowflake -- cortex

Acceptance Criteria

  • openshell profile lint -f providers/snowflake.yaml passes on the current release.
  • With the profile imported and a provider attached, a process in the sandbox sees only the placeholder for SNOWFLAKE_TOKEN.
  • The sign-in POST reaches the account host with the token substituted; the token is not sent on any other path or host.
  • A request to a different Snowflake account host is denied.
  • The header comment names binaries, image layout, credential scope, endpoint access, limits and a smoke test, like the other files.

Alternatives Considered

  • Keep the profile in the user's own repository. It works today, but it is not reviewed alongside the others, and each user rediscovers host pinning and one-path rewriting.
  • A documentation page instead of a file. Less testable: profile lint cannot check it.
  • The --host override proposed in feat(providers): ship built-in Jira and MLflow provider profiles #2547 would let one generic profile serve every account. This example does not depend on it; like the other examples, users copy it, edit the host and import it.
  • Middleware or a gateway interceptor. Not needed: the provider and the proxy already do what is required.

Agent Investigation

Read providers/README.md, providers/github.yaml, the provider-profile documentation (request_body_credential_rewrite is per endpoint; profile endpoints are all treated as credentialed) and crates/openshell-supervisor-network/src/l7/relay.rs (body rewrite is per endpoint and buffered). A hand-written profile of this shape signed the CLI in to one account while the sandbox held only a placeholder, on OpenShell 0.1.9. I will re-run it on the current release and attach the lint output and the smoke test before opening a PR.

Checklist

  • I've reviewed existing issues and the published docs
  • This is a design proposal, not a "please build this" request

Activity

  1. added
    state:triage-needed
    on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:triage-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions