File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/java/com/cloudbees/jenkins/plugins/awscredentials Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -167,17 +167,17 @@ public boolean requiresToken() {
167167
168168 @ Override
169169 public AwsCredentials resolveCredentials () {
170- AwsCredentials initialCredentials = AwsBasicCredentials .create (accessKey , secretKey .getPlainText ());
171170
172171 if (StringUtils .isBlank (iamRoleArn )) {
173- return initialCredentials ;
172+ return AwsBasicCredentials . create ( accessKey , secretKey . getPlainText ()) ;
174173 } else {
175174 AwsCredentialsProvider baseProvider ;
176175 // Handle the case of delegation to instance profile
177176 if (StringUtils .isBlank (accessKey ) && StringUtils .isBlank (secretKey .getPlainText ())) {
178177 baseProvider = null ;
179178 } else {
180- baseProvider = StaticCredentialsProvider .create (initialCredentials );
179+ baseProvider = StaticCredentialsProvider .create (
180+ AwsBasicCredentials .create (accessKey , secretKey .getPlainText ()));
181181 }
182182
183183 StsClient client = buildStsClient (baseProvider );
You can’t perform that action at this time.
0 commit comments