GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(credentials): second auth modes for ServiceNow, Snowflake, Infisical, and Google Ads by waleedlatif1 · Pull Request #9928 · simstudioai/sim Conversation
Collaborator
SummaryAdds a second (or third) sign-in mode to integrations that already support saved credentials. Each one is a new
Vendor references: ServiceNow client credentials and grant workflow; Snowflake SQL API authentication and account identifiers; Infisical Universal Auth login, attach (TTL ranges) and Universal Auth; Google Ads service accounts and developer token sunset. Not included: Infisical OIDC keyless. Infisical matches subjects as glob patterns, so Sim cannot pin a credential's subject, and this needs a security decision and a live proof first. Product update (if relevant)
Type of Change
Testing
Checklist
Screenshots/VideosConnect dialogs: ServiceNow and Infisical gain an auth method picker; Snowflake gains a "Key pair (RSA private key)" option.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
[Medium impact] The PR appears safe to merge; no new actionable issues were established. SummaryAdds saved sign-in options for ServiceNow, Snowflake, Infisical, and Google Ads.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
All reported issues were addressed across 56 files
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Google Ads now offers the google-service-account credential: a service account added as a user of the Ads account signs in as itself with the adwords scope (developer tokens were retired). Keyless Google credentials stay refused because Google documents no Workload Identity path for Ads.
Infisical credentials gain a Universal Auth mode: the machine identity's client ID and secret are stored instead of a pasted access token, and Sim logs in at the credential's instance through the configured-endpoint egress guard whenever its token expires. One coordinated token serves every credential for an identity, so logins don't multiply per worker. Pasted access-token credentials are unchanged. Adds postToConfiguredTokenEndpoint, the guarded token request for hosts taken from a validated credential field.
ServiceNow credentials gain an OAuth client credentials mode beside the username and password login. The client ID and secret are stored, and Sim mints a token at the instance's /oauth_token.do through the configured-endpoint egress guard, shared across workers. The minted token resolves with authStyle 'bearer', which the ServiceNow tools and the attachment upload operation send as a bearer token. Saved logins store and resolve exactly as before. Shared changes, each additive: exchangeClientCredentialsGrant takes an egress option for configured hosts; a tool policy can name mapped params a credential mode lacks (optionalCredentialParams), which are cleared rather than failing; a token descriptor field can belong to the pasted-token mode only; a token check's account id may be absent for a sign-in mode.
Snowflake connections gain a key-pair mode beside keyless workload identity and programmatic access tokens. Sim stores the user's unencrypted RSA private key and signs a JWT for every run (iss ACCOUNT.USER.SHA256:<fp>, sub ACCOUNT.USER, uppercased, 59-minute lifetime) that tools and selectors send with the KEYPAIR_JWT token type. The account comes from the host the way Snowflake's drivers derive it. Key pairs need no workload identity, so organization connections and deployments without a signing key can use them; the connect dialog now always offers them. Token and keyless credentials store and resolve exactly as before. Host hints now name .snowflakecomputing.cn, which the validator, tools, and selectors already accept.
serviceNowAuthorization is now the only caller, so the export was unused.
…s hostnames Snowflake also serves an account whose name has underscores at a hostname with hyphens in their place. Organization names hold only letters and numbers and account names never hold a hyphen, so every hyphen after the first in an org-account host label is a replaced underscore and is restored before the key-pair JWT names the account. The derivation moves next to normalizeSnowflakeHost and its suffix list. The connection secret type is renamed for the three modes, and the modal shares one saved- connection submit hook.
…ical login readAccessTokenResponse holds the refusal classification, capped JSON read, token and lifetime checks, and lifetime cap that exchangeClientCredentialsGrant and the Infisical Universal Auth login both need. An Infisical expiresIn of 0 (an access token TTL of 0) is served for the daily cap instead of failing as an outage. egress and fetchOptions become a discriminated union, and the configured-endpoint guard's own cases are tested where it lives.
The hidden credential params become a constant like Zendesk's, the upload schema accepts only the bearer authStyle, and serviceNowAuthorization takes an optional username so the upload client no longer fakes one. A pasted-token-only descriptor field stays hidden until that mode is chosen and is never required in client-credentials mode.
…o the catalog scopes it to the password sign-in
…n organization reconnect's mode unchosen Key-pair validation now sends its signed JWT through the same guarded egress path as keyless, so an account host that resolves to a private address is refused as host_not_allowed. An organization credential's stored mode is not reported, so its reconnect starts with no mode chosen instead of defaulting to a programmatic access token. The Infisical and ServiceNow grant tests use the shared jsonResponse helper.
c0c4650 to
e3e7242
Compare
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@cubic-dev-ai review this PR |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
2 issues found across 57 files
Confidence score: 3/5
oauth.ts, the shared provider alias lets keyless Google credentials be selected for Google Ads even though the token resolver rejects them. Exclude keyless credentials from that selection.snowflake-account-modal.tsx, the private key stays visible after the field loses focus, exposing it to shoulder-surfing or screen captures. Mask it when unfocused, matching the existing private-key input pattern.
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/snowflake-account-modal.tsx">
<violation number="1" location="apps/sim/app/workspace/[workspaceId]/integrations/components/connect-service-account-modal/snowflake-account-modal.tsx:345">
P2: This private-key field leaves the full RSA key visible after focus leaves, exposing a credential to shoulder-surfing or screen captures. Mask the value when unfocused, matching the existing private-key input pattern.</violation>
</file>
<file name="apps/sim/lib/oauth/oauth.ts">
<violation number="1" location="apps/sim/lib/oauth/oauth.ts:503">
P2: This shared provider alias also makes existing keyless Google credentials eligible for Google Ads credential selection, but the token resolver explicitly rejects `google-ads` for keyless credentials. Filter keyless credentials out for this service (or add service-aware eligibility) so users cannot select a credential that every Ads run will reject.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| value={privateKey} | ||
| onChange={(event) => edit(setPrivateKey)(event.target.value)} | ||
| placeholder='-----BEGIN PRIVATE KEY-----' | ||
| className='min-h-[120px] font-mono' |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
P2: This private-key field leaves the full RSA key visible after focus leaves, exposing a credential to shoulder-surfing or screen captures. Mask the value when unfocused, matching the existing private-key input pattern.
Check if this issue is valid — if so, understand the root cause and fix it. 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. At apps/sim/app/workspace/[workspaceId]/integrations/components/connect-service-account-modal/snowflake-account-modal.tsx, line 345:
<comment>This private-key field leaves the full RSA key visible after focus leaves, exposing a credential to shoulder-surfing or screen captures. Mask the value when unfocused, matching the existing private-key input pattern.</comment>
<file context>
@@ -292,6 +319,42 @@ function SnowflakeAccountForm({
+ value={privateKey}
+ onChange={(event) => edit(setPrivateKey)(event.target.value)}
+ placeholder='-----BEGIN PRIVATE KEY-----'
+ className='min-h-[120px] font-mono'
+ spellCheck={false}
+ autoComplete='off'
</file context>
| className='min-h-[120px] font-mono' | |
| className={`min-h-[120px] font-mono ${privateKey ? '[&:not(:focus)]:[-webkit-text-security:disc]' : ''}`} |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| * Google credentials stay refused here: Ads is not in `GOOGLE_KEYLESS_SERVICES`, since | ||
| * Google documents no Workload Identity Federation path for it. | ||
| */ | ||
| serviceAccountProviderId: 'google-service-account', |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
P2: This shared provider alias also makes existing keyless Google credentials eligible for Google Ads credential selection, but the token resolver explicitly rejects google-ads for keyless credentials. Filter keyless credentials out for this service (or add service-aware eligibility) so users cannot select a credential that every Ads run will reject.
Check if this issue is valid — if so, understand the root cause and fix it. 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. At apps/sim/lib/oauth/oauth.ts, line 503:
<comment>This shared provider alias also makes existing keyless Google credentials eligible for Google Ads credential selection, but the token resolver explicitly rejects `google-ads` for keyless credentials. Filter keyless credentials out for this service (or add service-aware eligibility) so users cannot select a credential that every Ads run will reject.</comment>
<file context>
@@ -494,6 +494,13 @@ export const OAUTH_PROVIDERS: Record<string, OAuthProviderConfig> = {
+ * Google credentials stay refused here: Ads is not in `GOOGLE_KEYLESS_SERVICES`, since
+ * Google documents no Workload Identity Federation path for it.
+ */
+ serviceAccountProviderId: 'google-service-account',
},
'google-bigquery': {
</file context>
Sorry, something went wrong.
There was an error while loading. Please reload this page.
e3e72421
Deployed
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.