Skip to content

Conversation

DaveCTurner
Copy link
Contributor

These tests only don't work in a FIPS JVM because they use a secret key
that is unacceptably short. This commit replaces the relevant uses of
randomIdentifier with randomSecretKey so they work whether in FIPS
mode or not.

These tests only don't work in a FIPS JVM because they use a secret key
that is unacceptably short. This commit replaces the relevant uses of
`randomIdentifier` with `randomSecretKey` so they work whether in FIPS
mode or not.
@DaveCTurner DaveCTurner added >test Issues or PRs that are addressing/adding tests :Security/FIPS Running ES in FIPS 140-2 mode v8.19.0 v9.1.0 :Distributed Indexing/Searchable Snapshots Searchable snapshots / frozen indices. labels Apr 2, 2025
@elasticsearchmachine elasticsearchmachine added Team:Security Meta label for security team Team:Distributed Indexing Meta label for Distributed Indexing team labels Apr 2, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-security (Team:Security)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing)

@DaveCTurner DaveCTurner requested a review from ywangd April 2, 2025 20:08
keystoreSettings.put("s3.client." + alternativeClient + ".secret_key", randomIdentifier());
keystoreSettings.put("s3.client." + alternativeClient + ".secret_key", randomSecretKey());
cluster.updateStoredSecureSettings();
assertOK(client().performRequest(new Request("POST", "/_nodes/reload_secure_settings")));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reload call needs to provide keystore password when in FIPS mode similar to this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry for the noise I thought this had passed the FIPS tests when I asked for your review. Fixed that now.

@DaveCTurner DaveCTurner requested a review from ywangd April 3, 2025 07:10
Copy link
Member

@ywangd ywangd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DaveCTurner DaveCTurner added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) auto-backport Automatically create backport pull requests when merged labels Apr 3, 2025
@elasticsearchmachine elasticsearchmachine merged commit 8965985 into elastic:main Apr 4, 2025
22 checks passed
@DaveCTurner DaveCTurner deleted the 2025/04/02/S3SearchableSnapshotsCredentialsReloadIT-fips branch April 4, 2025 07:42
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 126109

DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Apr 4, 2025
…astic#126109)

These tests only don't work in a FIPS JVM because they use a secret key
that is unacceptably short. This commit replaces the relevant uses of
`randomIdentifier` with `randomSecretKey` so they work whether in FIPS
mode or not.
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Apr 4, 2025
…astic#126109)

These tests only don't work in a FIPS JVM because they use a secret key
that is unacceptably short. This commit replaces the relevant uses of
`randomIdentifier` with `randomSecretKey` so they work whether in FIPS
mode or not.

Backport of elastic#126109 to `8.x`
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Apr 4, 2025
These tests only don't work in a FIPS JVM because they use a secret key
that is unacceptably short. This commit replaces the relevant uses of
`randomIdentifier` with `randomSecretKey` so they work whether in FIPS
mode or not.

Backport of elastic#126109 to `8.x`
@DaveCTurner
Copy link
Contributor Author

Backport is #126324

elasticsearchmachine pushed a commit that referenced this pull request Apr 4, 2025
…26324)

* Reinstate `S3SearchableSnapshotsCredentialsReloadIT` in FIPS JVMs

These tests only don't work in a FIPS JVM because they use a secret key
that is unacceptably short. This commit replaces the relevant uses of
`randomIdentifier` with `randomSecretKey` so they work whether in FIPS
mode or not.

Backport of #126109 to `8.x`

* CI poke
andreidan pushed a commit to andreidan/elasticsearch that referenced this pull request Apr 9, 2025
…astic#126109)

These tests only don't work in a FIPS JVM because they use a secret key
that is unacceptably short. This commit replaces the relevant uses of
`randomIdentifier` with `randomSecretKey` so they work whether in FIPS
mode or not.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Distributed Indexing/Searchable Snapshots Searchable snapshots / frozen indices. :Security/FIPS Running ES in FIPS 140-2 mode Team:Distributed Indexing Meta label for Distributed Indexing team Team:Security Meta label for security team >test Issues or PRs that are addressing/adding tests v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants