Skip to content

Commit 1b185b7

Browse files
[8.x] [Test] Increase test secret key length for AwsStsHttpHandler (#117944)
* [8.x] [Test] Increase test secret key length for AwsStsHttpHandler The initial backport #117738 did not contain the change for AwsStsHttpHandler from #117675. This PR adds it. Backport of #117675 * unmute --------- Co-authored-by: Elastic Machine <[email protected]>
1 parent c5d3799 commit 1b185b7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

muted-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,5 +414,3 @@ tests:
414414
- class: org.elasticsearch.xpack.esql.plugin.ClusterRequestTests
415415
method: testFallbackIndicesOptions
416416
issue: https://github.com/elastic/elasticsearch/issues/117937
417-
- class: org.elasticsearch.repositories.s3.RepositoryS3StsCredentialsRestIT
418-
issue: https://github.com/elastic/elasticsearch/issues/117897

test/fixtures/aws-sts-fixture/src/main/java/fixture/aws/sts/AwsStsHttpHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import java.util.stream.Collectors;
2929

3030
import static org.elasticsearch.test.ESTestCase.randomIdentifier;
31+
import static org.elasticsearch.test.ESTestCase.randomSecretKey;
3132

3233
/**
3334
* Minimal HTTP handler that emulates the AWS STS server
@@ -102,7 +103,7 @@ public void handle(final HttpExchange exchange) throws IOException {
102103
ROLE_ARN,
103104
ROLE_NAME,
104105
sessionToken,
105-
randomIdentifier(),
106+
randomSecretKey(),
106107
ZonedDateTime.now().plusDays(1L).format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssZ")),
107108
accessKey
108109
).getBytes(StandardCharsets.UTF_8);

0 commit comments

Comments
 (0)