File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,14 @@ export interface CredentialsClientProps {
1212 region ?: string ;
1313 proxyServer ?: string ;
1414 noProxy ?: string ;
15+ roleChaining : boolean ;
1516}
1617
1718export class CredentialsClient {
1819 public region ?: string ;
1920 private _stsClient ?: STSClient ;
2021 private readonly requestHandler ?: NodeHttpHandler ;
22+ private roleChaining ?: boolean ;
2123
2224 constructor ( props : CredentialsClientProps ) {
2325 if ( props . region !== undefined ) {
@@ -39,10 +41,11 @@ export class CredentialsClient {
3941 httpAgent : handler ,
4042 } ) ;
4143 }
44+ this . roleChaining = props . roleChaining ;
4245 }
4346
4447 public get stsClient ( ) : STSClient {
45- if ( ! this . _stsClient ) {
48+ if ( ! this . _stsClient || this . roleChaining ) {
4649 const config = { customUserAgent : USER_AGENT } as {
4750 customUserAgent : string ;
4851 region ?: string ;
Original file line number Diff line number Diff line change @@ -121,7 +121,10 @@ export async function run() {
121121 exportRegion ( region , outputEnvCredentials ) ;
122122
123123 // Instantiate credentials client
124- const clientProps : { region : string ; proxyServer ?: string ; noProxy ?: string } = { region } ;
124+ const clientProps : { region : string ; proxyServer ?: string ; noProxy ?: string ; roleChaining : boolean } = {
125+ region,
126+ roleChaining,
127+ } ;
125128 if ( proxyServer ) clientProps . proxyServer = proxyServer ;
126129 if ( noProxy ) clientProps . noProxy = noProxy ;
127130 const credentialsClient = new CredentialsClient ( clientProps ) ;
You can’t perform that action at this time.
0 commit comments