Modify based on code review comments.
Signed-off-by: Jussi Hallila <jussi@hallila.com>
This commit is contained in:
@@ -172,15 +172,12 @@ export class AwsS3UrlReader implements UrlReader {
|
||||
|
||||
const roleArn = integration.config.roleArn;
|
||||
if (roleArn) {
|
||||
const externalIdParam = integration.config.externalId
|
||||
? { ExternalId: integration.config.externalId }
|
||||
: {};
|
||||
return new aws.ChainableTemporaryCredentials({
|
||||
masterCredentials: explicitCredentials,
|
||||
params: {
|
||||
RoleSessionName: 'backstage-aws-s3-url-reader',
|
||||
RoleArn: roleArn,
|
||||
...externalIdParam,
|
||||
ExternalId: integration.config.externalId,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ export type AwsS3IntegrationConfig = {
|
||||
roleArn?: string;
|
||||
|
||||
/**
|
||||
* (optional) External ID to use when assuming role
|
||||
* (Optional) External ID to use when assuming role
|
||||
*/
|
||||
externalId?: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user