Class BouncyCastleApprovedModeTest
java.lang.Object
org.apache.kafka.common.security.fips.BouncyCastleApprovedModeTest
Tests for BouncyCastle FIPS approved-only mode.
Based on lobo-packages/cflt-java-fips-test/TestBouncyCastleFIPS.java
This test simulates a FIPS-compliant environment by: - Setting org.bouncycastle.fips.approved_only=true - Removing non-FIPS providers (especially SunJCE) - Loading only BC FIPS, BC JSSE, SUN, and SunSASL providers
Uses the same security.providers mechanism as production Kafka. Tests skip automatically if BC FIPS is not on the classpath.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetUpAll()static voidvoidTest 2: Verify that non-FIPS algorithms are blocked and FIPS algorithms are available.voidTest 1: Verify FIPS status is ready.voidTest 3: Verify SSL cipher suites and BCJSSE provider.
-
Constructor Details
-
BouncyCastleApprovedModeTest
public BouncyCastleApprovedModeTest()
-
-
Method Details
-
setUpAll
@BeforeAll public static void setUpAll() -
tearDownAll
@AfterAll public static void tearDownAll() -
testFipsStatusReady
-
testDigestCiphers
Test 2: Verify that non-FIPS algorithms are blocked and FIPS algorithms are available. Reference: lobo-packages TestBouncyCastleFIPS.java#L47-L104Note: MD5 digest is always available per BC FIPS specification (Table 7 of BC-FJA-SecurityPolicy-1.0.2.pdf)
- Throws:
Exception
-
testSSLCiphers
-