@@ -48,7 +48,9 @@ let container: HTMLDivElement
4848let root : Root
4949let requests : RecordedRequest [ ]
5050/** The workload-identity setup; Google's has no fixed audience. */
51- let keyless : ( Omit < typeof TRUST , 'audience' > & { audience ?: string } ) | { available : false }
51+ let keyless :
52+ | ( Omit < typeof TRUST , 'audience' > & { audience ?: string ; reconnectAuthType ?: string } )
53+ | { available : false ; reconnectAuthType ?: string }
5254let createFailure : { status : number ; body : unknown } | null
5355let createdIds : string [ ]
5456
@@ -381,6 +383,7 @@ it("shows the server's verification failure in the dialog", async () => {
381383} )
382384
383385it ( 'reconnects in place, keeps the trusted subject by default and prefills no secret' , async ( ) => {
386+ keyless = { ...TRUST , reconnectAuthType : 'oidc_role' }
384387 const dialog = await open ( 'aws-service-account' , 'AWS' , {
385388 replacedAccount : { credentialId : 'cred-old' , displayName : 'Prod role' } ,
386389 } )
@@ -402,6 +405,16 @@ it('reconnects in place, keeps the trusted subject by default and prefills no se
402405 expect ( createdIds ) . toEqual ( [ 'cred-old' ] )
403406} )
404407
408+ it ( 'reopens a reconnect on the stored keyed mode even where keyless is offered' , async ( ) => {
409+ keyless = { ...TRUST , reconnectAuthType : 'access_keys' }
410+ const dialog = await open ( 'aws-service-account' , 'AWS' , {
411+ replacedAccount : { credentialId : 'cred-old' , displayName : 'Prod keys' } ,
412+ } )
413+
414+ expect ( authTypeTrigger ( dialog ) . textContent ) . toContain ( 'Access keys' )
415+ expect ( labelled ( dialog , 'Role ARN' ) ) . toBeNull ( )
416+ } )
417+
405418it ( 'adds a keyless Snowflake service user: shows the CREATE USER statement and submits a bare host' , async ( ) => {
406419 keyless = { ...TRUST , audience : 'snowflakecomputing.com' }
407420 const dialog = await open ( 'snowflake-service-account' , 'Snowflake' )
0 commit comments