Skip to content

ReloadSecureSettingsWithPasswordProtectedKeystoreRestIT failures in fips mode #66880

@jkakavas

Description

@jkakavas

Build scan:

https://gradle-enterprise.elastic.co/s/27nxkh3jeyqzm/console-log?task=:x-pack:qa:password-protected-keystore:integTest

Repro line:

./gradlew ':x-pack:qa:password-protected-keystore:integTest' --tests "org.elasticsearch.password_protected_keystore.ReloadSecureSettingsWithPasswordProtectedKeystoreRestIT.testReloadSecureSettingsWithEmptyPassword" -Dtests.seed=779930CF4BC9CD9C -Dtests.security.manager=true -Dtests.locale=sl-SI -Dtests.timezone=America/Hermosillo -Druntime.java=11 -Dtests.fips.enabled=true |  

Reproduces locally?: yes

Applicable branches:

Failure history:

Failure excerpt:

org.elasticsearch.password_protected_keystore.ReloadSecureSettingsWithPasswordProtectedKeystoreRestIT > testReloadSecureSettingsWithEmptyPassword FAILED
    java.lang.AssertionError: 
    Expected: ("Provided keystore password was incorrect" or "Keystore has been corrupted or tampered with")
         but: was "Error generating an encryption key from the provided password"
        at __randomizedtesting.SeedInfo.seed([779930CF4BC9CD9C:39F40225962A5FBB]:0)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
        at org.junit.Assert.assertThat(Assert.java:956)
        at org.junit.Assert.assertThat(Assert.java:923)
        at org.elasticsearch.password_protected_keystore.ReloadSecureSettingsWithPasswordProtectedKeystoreRestIT.testReloadSecureSettingsWithEmptyPassword(ReloadSecureSettingsWithPasswordProtectedKeystoreRestIT.java:80)

An exception with "Error generating an encryption key from the provided password" message can now be thrown in fips mode when a password is short so we need to adjust the matcher when in fips mode

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Security/FIPSRunning ES in FIPS 140-2 mode>test-failureTriaged test failures from CITeam:SecurityMeta label for security team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions