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
The initial backport elastic#117738 did not contain the change for
AwsStsHttpHandler from elastic#117675. This PR adds it.

Backport of elastic#117675
  • Loading branch information
ywangd committed Dec 3, 2024
1 parent 2205461 commit dc61160
Showing 1 changed file with 2 additions and 1 deletion.
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 dc61160

Please sign in to comment.