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

SNOW-926149 Fix issues while using snowflake-jdbc-fips #596

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

sfc-gh-lsembera
Copy link
Contributor

@sfc-gh-lsembera sfc-gh-lsembera commented Oct 4, 2023

This PR implements support for FIPS-compliant JDBC driver snowflake-jdbc-fips, which some users are using instead of the default snowflake-jdbc. The difference is that the snowflake-jdbc shades bouncy castle, but snowflake-jdbc-fips declares FIPS compliant bouncy castle JARs in its pom.xml.

The existing SDK versions are not working with snowflake-jdbc-fips because they assume that bouncy castle is bundled in the JDBC driver and that BouncyCastleProvider exists on classpath, but in case of the FIPS version, the provider class name is BouncyCastleFipsProvider.

Documentation has been updated with instructions how to use the SDK in a FIPS-compliant way.

This PR also introduces a new external testing suite - a dedicated maven project, which does not test the SDK from "within" the SDK maven project, like our existing unit and integrations tests do, but runs a simple integration test with the SDK declared as a standard Maven dependency, installed into the local Maven repository. This suite can detect issues with JAR builds, for example. There is a wrapper script, which builds the SDK and orchestrates the end-to-end JAR tests. The following JAR variants are tested: shaded, unshaded and FIPS-compliant setups.

@sfc-gh-lsembera sfc-gh-lsembera force-pushed the lsembera/fics-jar branch 5 times, most recently from 2d2ad5e to 1ab2a9c Compare October 6, 2023 16:15
@sfc-gh-lsembera sfc-gh-lsembera marked this pull request as ready for review October 6, 2023 16:37
@sfc-gh-lsembera sfc-gh-lsembera requested review from sfc-gh-tzhang and a team as code owners October 6, 2023 16:37
README.md Outdated
whereas the unshaded version declares its dependencies in `pom.xml`, which are fetched as standard transitive dependencies by the build system like Maven or Gradle.
The shaded JAR can help avoid potential dependency conflicts, but the unshaded version provides finer graned control over transitive dependencies.

## Using with snowflake-jdbc-fics
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: jdbc-fips

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Collaborator

@sfc-gh-japatel sfc-gh-japatel left a comment

Choose a reason for hiding this comment

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

super cool, thanks for adding these tests!

@sfc-gh-lsembera sfc-gh-lsembera merged commit 17d029e into master Oct 10, 2023
10 checks passed
@sfc-gh-lsembera sfc-gh-lsembera deleted the lsembera/fics-jar branch October 10, 2023 12:40
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.

2 participants