Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUACAMOLE-2004: Fix KSM integration for RHEL systems with FIPS mode enabled #1038

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

package org.apache.guacamole.vault.ksm;

import java.security.Security;

import org.apache.guacamole.GuacamoleException;
import org.apache.guacamole.vault.VaultAuthenticationProviderModule;
import org.apache.guacamole.vault.ksm.conf.KsmAttributeService;
Expand All @@ -36,6 +38,8 @@
import org.apache.guacamole.vault.secret.VaultSecretService;
import org.apache.guacamole.vault.user.VaultDirectoryService;

import org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider;

import com.google.inject.assistedinject.FactoryModuleBuilder;

/**
Expand All @@ -53,7 +57,14 @@ public class KsmAuthenticationProviderModule
* @throws GuacamoleException
* If configuration details in guacamole.properties cannot be parsed.
*/
public KsmAuthenticationProviderModule() throws GuacamoleException {}
public KsmAuthenticationProviderModule() throws GuacamoleException {
// KSM recommends using BouncyCastleFipsProvider to avoid potential
// issues (for example with FIPS enabled RHEL).
// https://docs.keeper.io/en/secrets-manager/secrets-manager/developer-sdk-library/java-sdk
// The addProvider method checks for duplications internally,
// so it is safe to add the same provider multiple times.
Security.addProvider(new BouncyCastleFipsProvider());
}

@Override
protected void configureVault() {
Expand Down