Skip to content

fix: set bc in approved only#375

Draft
mkleene wants to merge 3 commits into
mainfrom
enhance-fips-tests
Draft

fix: set bc in approved only#375
mkleene wants to merge 3 commits into
mainfrom
enhance-fips-tests

Conversation

@mkleene

@mkleene mkleene commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

add a test to make sure that we are actually running with the correct providers

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f8ab4b7b-13b9-4c15-9fbd-011d4faff154

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch enhance-fips-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces FipsProviderVerificationTest.java to verify that the FIPS security provider configuration is correctly loaded. A review comment points out that the system property org.bouncycastle.fips.approved_only is not configured in the fips profile in sdk/pom.xml, which would cause the test to be silently skipped, and provides a configuration fix.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

* under the fips Maven profile. Without this check, a misconfigured argLine would silently run
* all other tests against the default (non-FIPS) provider stack.
*/
@EnabledIfSystemProperty(named = "org.bouncycastle.fips.approved_only", matches = "true")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The system property org.bouncycastle.fips.approved_only is not configured in the fips profile within sdk/pom.xml. Consequently, this test will be silently skipped during test execution, and BouncyCastle FIPS will not run in approved-only mode as intended by the PR title.

To resolve this, please update the fips profile in sdk/pom.xml to include the system property:

<java.security.properties.test>-Djava.security.properties=${project.basedir}/src/test/resources/java.security.fips.test -Dorg.bouncycastle.fips.approved_only=true</java.security.properties.test>

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

mkleene and others added 2 commits June 9, 2026 14:54
Switch AsymEncryption from ENCRYPT_MODE+doFinal to WRAP_MODE+wrap,
and AsymDecryption from DECRYPT_MODE+doFinal to UNWRAP_MODE+unwrap,
treating the key material as AES SecretKeySpec for FIPS compatibility.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant