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

check legacy IS_FIPS_ENABLED #2470

Merged
merged 1 commit into from
Dec 12, 2024
Merged
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 @@ -38,6 +38,7 @@
public class OracleJdbcConnectionFactory extends GenericJdbcConnectionFactory
{
public static final String IS_FIPS_ENABLED = "is_fips_enabled";
public static final String IS_FIPS_ENABLED_LEGACY = "is_FIPS_Enabled";
private final DatabaseConnectionInfo databaseConnectionInfo;
private final DatabaseConnectionConfig databaseConnectionConfig;
private static final Logger LOGGER = LoggerFactory.getLogger(OracleJdbcConnectionFactory.class);
Expand All @@ -46,8 +47,8 @@ public class OracleJdbcConnectionFactory extends GenericJdbcConnectionFactory

/**
* @param databaseConnectionConfig database connection configuration {@link DatabaseConnectionConfig}
* @param databaseConnectionInfo
*/
* @param databaseConnectionInfo
*/
public OracleJdbcConnectionFactory(DatabaseConnectionConfig databaseConnectionConfig, DatabaseConnectionInfo databaseConnectionInfo)
{
super(databaseConnectionConfig, null, databaseConnectionInfo);
Expand All @@ -68,7 +69,7 @@ public Connection getConnection(final JdbcCredentialProvider jdbcCredentialProvi
properties.put("javax.net.ssl.trustStoreType", "JKS");
properties.put("javax.net.ssl.trustStorePassword", "changeit");
properties.put("oracle.net.ssl_server_dn_match", "true");
if (System.getenv().getOrDefault(IS_FIPS_ENABLED, "false").equalsIgnoreCase("true")) {
if (System.getenv().getOrDefault(IS_FIPS_ENABLED, "false").equalsIgnoreCase("true") || System.getenv().getOrDefault(IS_FIPS_ENABLED_LEGACY, "false").equalsIgnoreCase("true")) {
properties.put("oracle.net.ssl_cipher_suites", "(TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA)");
}
}
Expand Down
Loading