Forráskód Böngészése

[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 <elasticmachine@users.noreply.github.com>
Yang Wang 10 hónapja
szülő
commit
1b185b7ba1

+ 0 - 2
muted-tests.yml

@@ -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

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

@@ -28,6 +28,7 @@ import java.util.function.BiConsumer;
 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
@@ -102,7 +103,7 @@ public class AwsStsHttpHandler implements HttpHandler {
                     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);