You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure intended key is selected in SamlAuthenticatorTests (elastic#30993)
* Ensure that a purposefully wrong key is used
Uses a specific keypair for tests that require a purposefully wrong
keypair instead of selecting one randomly from the same pull from
which the correct one is selected. Entropy is low because of the
small space and the same key can be randomly selected as both the
correct one and the wrong one, causing the tests to fail.
The purposefully wrong key is also used in
testSigningKeyIsReloadedForEachRequest and needs to be cleaned
up afterwards so the rest of the tests don't use that for signing.
Resolveselastic#30970
Copy file name to clipboardExpand all lines: x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlAuthenticatorTests.java
+5-3
Original file line number
Diff line number
Diff line change
@@ -374,7 +374,7 @@ public void testFailWhenAssertionsCannotBeDecrypted() throws Exception {
374
374
final String xml = getSimpleResponse(now);
375
375
376
376
// Encrypting with different cert instead of sp cert will mean that the SP cannot decrypt
377
-
final String encrypted = encryptAssertions(xml, readKeyPair("RSA_1024"));
377
+
final String encrypted = encryptAssertions(xml, readKeyPair("RSA_4096_updated"));
378
378
assertThat(encrypted, not(equalTo(xml)));
379
379
380
380
final String signed = signDoc(encrypted);
@@ -937,7 +937,7 @@ public void testIncorrectSigningKeyIsRejected() throws Exception {
0 commit comments