Skip to content

Commit

Permalink
[8.x] [Test] Increase test secret key length for AwsStsHttpHandler (#…
Browse files Browse the repository at this point in the history
…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 <elasticmachine@users.noreply.github.com>
  • Loading branch information
ywangd and elasticmachine authored Dec 5, 2024
1 parent c5d3799 commit 1b185b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -414,5 +414,3 @@ tests:
- class: org.elasticsearch.xpack.esql.plugin.ClusterRequestTests
method: testFallbackIndicesOptions
issue: https://github.com/elastic/elasticsearch/issues/117937
- class: org.elasticsearch.repositories.s3.RepositoryS3StsCredentialsRestIT
issue: https://github.com/elastic/elasticsearch/issues/117897
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.stream.Collectors;

import static org.elasticsearch.test.ESTestCase.randomIdentifier;
import static org.elasticsearch.test.ESTestCase.randomSecretKey;

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

0 comments on commit 1b185b7

Please sign in to comment.