Repository navigation
Conversation
Keep native issuance unadvertised until Snowflake inventory can identify renamed tokens without confusing existing raw credentials. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Use the existing discoverable PAT resource and revocation handle for both raw TOKEN and api_key_v2 API_KEY issuance. Keep TOKEN preferred and verify SDK encrypted output and old-descriptor refusal. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Disable Go HTML escaping and remove Encoder framing newline. Verify exact bytes from both the helper and SDK-encrypted Issue path with JSON-sensitive fixture characters. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Use neutral sample variable names for synthetic values used only by exact-byte fixture assertions. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Run go mod tidy and go mod vendor; only the existing age requirement moves from indirect to direct. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Publish a named SDK resource action that reuses native PAT issuance, returns a public discoverable resource and an encrypted api_key_v2 value, and validates action arguments before provider calls. Reject stale name-based revocation instead of reporting a successful no-op. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Use a neutral constant identifier for the public api_key_v2 return-field name. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Verify rejected identities and missing request IDs make no provider call, and a readback-only privilege denial does not revoke a valid issued PAT. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Describe the action arguments, public resource and encrypted return, registration gate, and rename reconciliation limit. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Run go mod tidy and go mod vendor; only the existing HPKE requirement moves from indirect to direct. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Snowflake removes PATs by mutable name and cannot compare the originally issued credential with a reused name. Refuse automatic Delete before provider mutation and surface manual reconciliation after ambiguous post-mint outcomes; keep successful raw and native issuance unchanged. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Use strict provider REMOVE for normal revocation and fail visibly on missing names. Refuse a mismatched recorded parent before mutation, restore cleanup after a located post-mint failure, and retain outcome-unknown guidance for ambiguous identity. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Keep missing-name guidance conditional on the provider error, preserve privilege failures, and avoid a name-only cleanup when action conversion lacks readback proof. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Keep conditional missing-name guidance while satisfying the repository line-length rule. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com> # Conflicts: # go.mod
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Superseded — see the current review report for commit
|
| } | ||
| if !found { | ||
| return nil, fmt.Errorf("baton-snowflake: created programmatic access token was not returned by Snowflake") | ||
| return nil, fmt.Errorf("baton-snowflake: created programmatic access token was not returned by Snowflake; outcome unknown, verify/reconcile in Snowflake before retry") |
There was a problem hiding this comment.
🟡 Suggestion (confidence: medium): Before this change, the deferred REMOVE ... IF EXISTS cleaned up a token when readback didn't return it. Now located stays false on this path, so the PAT is left live, the plaintext is thrown away, and nothing records a handle that could revoke it. The default: branch (any non-privilege SHOW error) has the same problem. If the name-reuse risk is the reason, consider keeping a best-effort IF EXISTS removal here, since the name was minted from this request a moment ago. Otherwise, emit a structured signal (e.g. a Warn with user and token name) so the orphan can be found.
| // missing/renamed name fails visibly rather than reporting a no-op revoke. | ||
| // A different PAT created later with the same name cannot be distinguished | ||
| // by this API; external rename/name reuse remains a documented limitation. | ||
| if err := o.client.RemoveProgrammaticAccessTokenStrict(ctx, userName, tokenName); err != nil { |
There was a problem hiding this comment.
🟡 Suggestion (confidence: medium): Removing IF EXISTS means revoke is no longer idempotent (connector rule P3). Suppose a first REMOVE succeeds but the response is lost, or the PAT was already deleted in Snowflake. Every C1 retry of revoke then fails, and the record can't converge until the next sync drops it. The trade-off is documented, but consider mapping Snowflake's "does not exist" error to success, or to codes.NotFound, so callers can tell "already gone" apart from a real failure.
| github.com/conductorone/baton-sdk v0.42.3 | ||
| filippo.io/age v1.3.1 | ||
| filippo.io/hpke v0.4.0 | ||
| github.com/conductorone/baton-sdk v0.42.4-0.20261023000147-899cb2f0457c |
There was a problem hiding this comment.
🟡 Suggestion (confidence: high): baton-sdk is pinned to an unreleased pseudo-version from an unmerged SDK PR (#1192). The typed-output API (SecretContentType, PlaintextData.SetSchema, AAD validation) could still change before release. Please re-pin to a tagged SDK release before merging. The filippo.io/age/hpke promotion to direct deps is test-only and justified.
Connector PR Review: Declare canonical Snowflake secret action output typeBlocking Issues: 0 | Suggestions: 3 | Threads Resolved: 0 Review SummaryWhat it adds:
What it changes:
Dependencies: baton-sdk moves to an unreleased pseudo-version. Coverage:
Security IssuesNone found. SQL identifiers go through Correctness IssuesNone found. Suggestions
Prompt for AI agentsReviewed commit: |
There was a problem hiding this comment.
No blocking issues found — see the full review report
Squire (openai/gpt-6.1-sol):
Declare canonical
api_key_v2before dispatch on the real Snowflake programmatic-access-token action. The action retains its matching JSON payload and provider handle. Native TOKEN still returns raw PAT bytes; the accepted name-based revoke limits remain explicit.This unit reuses the existing action implementation #160 and integrates current main's newer SQL/client/dependency fixes. It consumes SDK #1192 at an immutable unreleased pseudo-version. Canonical definitions are exported in Multipass #975 and consumed by C1 #28031. These are source dependencies, not release or activation claims.
TestSnowflakeDeclaredSecretProofruns actual connector registration/schema lookup, action handler, SQL HTTP client, canonical encoder and SDK JWE. A controlled random-loopback provider handles DESCRIBE, GRANTS, ADD and SHOW. Old opaque/generic context and wrong purpose/version refuse before any provider SQL; success creates once and returns encrypted canonical bytes. The demo performs no revoke/use. A test-only file port accepts actual C1-prepared requests and exports the actual schema/JWE for the cross-repository proof.Validation: full
go test -p 2 -v ./... -count=1passes, including native API_KEY/raw TOKEN, SQL pagination and name-based revoke controls. The live TestUserBuilderList is intentionally skipped because no provider credentials or calls are authorized. Source and vendored SDK output are separate commits.Remaining draft acceptance: actual handler bytes through the replacement C1 frozen-type/member/Store/reveal stack and real Multipass codec/renderer. Existing synthetic-handler proof is baseline only. This change adds no new provider lifecycle or live operation.