-
Notifications
You must be signed in to change notification settings - Fork 614
[GLUTEN-8232][VL] Followup to update doc for VCPKG dynamic openssl feature #12178
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
Merged
+76
−3
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| --- | ||
| layout: page | ||
| title: Dynamic OpenSSL with FIPS Support in vcpkg Build | ||
| nav_order: 8 | ||
| parent: Getting-Started | ||
| --- | ||
|
|
||
| # Dynamic OpenSSL with FIPS Support in vcpkg Build | ||
|
|
||
| ## Overview | ||
|
|
||
| By default, Gluten's vcpkg build statically links OpenSSL into the native libraries (`libvelox.so` and `libgluten.so`). However, in environments requiring FIPS (Federal Information Processing Standards) compliance or dynamic OpenSSL linking, Gluten now supports building with dynamically linked OpenSSL. | ||
|
|
||
| This feature is particularly useful for: | ||
| - **FIPS compliance**: Organizations requiring FIPS 140-2/140-3 validated cryptographic modules | ||
| - **Security updates**: Easier OpenSSL security patching without rebuilding Gluten | ||
| - **System integration**: Using system-provided OpenSSL libraries | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - vcpkg-based build system (requires `enable_vcpkg=ON`) | ||
| - OpenSSL development libraries installed on the system | ||
| - Supported platforms: x86_64 and aarch64 Linux | ||
|
|
||
| ## Building with Dynamic OpenSSL | ||
|
|
||
| ### Basic Build Command | ||
|
|
||
| To enable dynamic OpenSSL linking with FIPS support, set the `VCPKG_DYNAMIC_OPENSSL` environment variable: | ||
|
|
||
| ```bash | ||
| export VCPKG_DYNAMIC_OPENSSL=ON | ||
| ./dev/buildbundle-veloxbe.sh --enable_vcpkg=ON | ||
| ``` | ||
|
|
||
| ## How It Works | ||
|
|
||
| When `VCPKG_DYNAMIC_OPENSSL=ON` is set: | ||
|
|
||
| 1. **vcpkg Configuration**: The `dynamic-openssl` feature is enabled in `vcpkg.json`, which includes OpenSSL with FIPS support | ||
| 2. **Triplet Override**: Custom vcpkg triplets (`x64-linux-avx.cmake` and `arm64-linux-neon.cmake`) detect the environment variable and switch OpenSSL from static to dynamic linkage | ||
| 3. **Build Process**: The `init.sh` script adds the `--x-feature=dynamic-openssl` flag to vcpkg install | ||
| 4. **Library Packaging**: OpenSSL shared libraries are excluded from static linking but must be available at runtime | ||
|
|
||
| ## References | ||
|
|
||
| - [OpenSSL FIPS Module](https://www.openssl.org/docs/fips.html) | ||
| - [FIPS 140-2 Standard](https://csrc.nist.gov/publications/detail/fips/140/2/final) | ||
| - [vcpkg Documentation](https://vcpkg.io/) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add the following explicit clarification for users?
At runtime, LD_LIBRARY_PATH should point to the OS-provided OpenSSL package, which includes libssl.so, libcrypto.so, and the FIPS-certified fips.so, so that these libraries are loaded instead of the ones built at compile time by vcpkg.
Users should ensure compatibility between the OpenSSL libraries (libssl.so and libcrypto.so) used at link time and those available at runtime. We recommend using the same major version to avoid potential compatibility issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhouyuan can you also add the openssl version in vcpkg here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@philo-he @FelixYBW Thanks, I add more notes to callout the version and usage