Skip to content

Commit 2b85907

Browse files
committed
Fix repository-gcs KeyStore.getInstance type/provider order
GoogleCloudStorageService.createFipsCompliantGoogleTrustStore called KeyStore.getInstance("BCFIPS", "BCFIPS"), but "BCFIPS" is the provider name; the corresponding keystore type is "BCFKS" (already documented in the in-method comment one line above). Every GCS snapshot operation on a FIPS-enabled OpenSearch 3.7.0 distribution therefore fails with: KeyStoreException: BCFIPS not found caused by: NoSuchAlgorithmException: no such algorithm: BCFIPS for provider BCFIPS Fixes #22287. Signed-off-by: Guillaume SZKOPINSKI <guillaume.szkopinski@altirnao.com>
1 parent 223d2a7 commit 2b85907

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plugins/repository-gcs/src/main/java/org/opensearch/repositories/gcs/GoogleCloudStorageService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ static Integer toTimeout(final TimeValue timeout) {
304304

305305
private KeyStore createFipsCompliantGoogleTrustStore() throws GeneralSecurityException, IOException {
306306
// Use BCFKS KeyStore type which is required for FIPS mode
307-
KeyStore trustStore = KeyStore.getInstance("BCFIPS", "BCFIPS");
307+
KeyStore trustStore = KeyStore.getInstance("BCFKS", "BCFIPS");
308308
// Initialize empty BCFKS trust store
309309
trustStore.load(null, null);
310310

@@ -323,3 +323,4 @@ private KeyStore createFipsCompliantGoogleTrustStore() throws GeneralSecurityExc
323323
return trustStore;
324324
}
325325
}
326+

0 commit comments

Comments
 (0)