Repository navigation
Commit 21e32d7
authored
feat(credentials): second auth modes for ServiceNow, Snowflake, Infisical, and Google Ads (#9928)
* feat(google-ads): accept a Google service account JSON key
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.
* feat(infisical): log machine identities in with Universal Auth
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.
* feat(servicenow): connect with an OAuth client's client credentials
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.
* feat(snowflake): connect with an RSA key pair
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.
* refactor(servicenow): keep the Basic header builder private to its utils
serviceNowAuthorization is now the only caller, so the export was unused.
* fix(snowflake): name an underscore account the same from either of its 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.
* refactor(credentials): share the token response reader with the Infisical 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.
* refactor(servicenow): tighten the saved-credential params and auth types
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.
* fix(snowflake): list the key-pair connection in the credential provider catalog
* refactor(servicenow): mark the username with requiredForAuthMethods so the catalog scopes it to the password sign-in
* fix(snowflake): verify key pairs through the egress guard and leave an 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.
* fix(snowflake): mask the key-pair private key when unfocused and type the key-pair header test
The key-pair private key textarea hides its value off focus, matching the
Google JSON key field, and the new getSnowflakeHeaders case passes the
oauthCredential its params type requires.
* fix(snowflake): accept underscore account hosts in the connect form and state the key-size ceiling
* fix(credentials): expire a coordinated token an internal operation's provider refuses1 parent e5af324 commit 21e32d7
57 files changed
Lines changed: 2000 additions & 239 deletions
File tree
- apps
- docs/content/docs/integrations
- sim
- app/workspace/[workspaceId]/integrations/components/connect-service-account-modal
- lib
- api/contracts
- credentials
- application
- token-service-accounts
- grants
- validators
- workload-identity
- integrations
- internal/servicenow
- oauth
- tools
- generated
- servicenow
- snowflake
- packages/deployment-config/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
126 | 148 | | |
127 | 149 | | |
128 | 150 | | |
| |||
154 | 176 | | |
155 | 177 | | |
156 | 178 | | |
157 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
158 | 182 | | |
159 | 183 | | |
160 | | - | |
| 184 | + | |
161 | 185 | | |
162 | 186 | | |
163 | 187 | | |
| |||
0 commit comments