Skip to content

Commit 73f8c16

Browse files
committed
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.
1 parent ae2b2a9 commit 73f8c16

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎apps/sim/app/workspace/[workspaceId]/integrations/components/connect-service-account-modal/snowflake-account-modal.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
ChipModalFooter,
1010
ChipModalHeader,
1111
ChipTextarea,
12+
cn,
1213
SecretInput,
1314
} from '@sim/emcn'
1415
import { isApiClientError } from '@/lib/api/client/errors'
@@ -342,7 +343,10 @@ function SnowflakeAccountForm({
342343
value={privateKey}
343344
onChange={(event) => edit(setPrivateKey)(event.target.value)}
344345
placeholder='-----BEGIN PRIVATE KEY-----'
345-
className='min-h-[120px] font-mono'
346+
className={cn(
347+
'min-h-[120px] font-mono',
348+
privateKey && '[&:not(:focus)]:[-webkit-text-security:disc]'
349+
)}
346350
spellCheck={false}
347351
autoComplete='off'
348352
autoCorrect='off'

‎apps/sim/tools/snowflake/utils.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ describe('Snowflake SQL API transport', () => {
132132
})
133133
expect(
134134
getSnowflakeHeaders({
135+
oauthCredential: 'cred-1',
135136
domain: 'acme.snowflakecomputing.com',
136137
accessToken: 'signed.jwt.value',
137138
authStyle: 'snowflake-key-pair',

0 commit comments

Comments
 (0)