-
Notifications
You must be signed in to change notification settings - Fork 361
make test-suite runnable under FIPS #5866
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
Draft
beanuwave
wants to merge
4
commits into
opensearch-project:main
Choose a base branch
from
sternadsoftware:fips_compliance4
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all 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,58 @@ | ||
| # Security properties for FIPS test runs. | ||
| # Used with == (complete override): only the providers listed here are available. | ||
| # SunJCE is intentionally absent — this removes DES, MD5-based PBE, and other | ||
| # non-FIPS algorithms without requiring programmatic Security.removeProvider() calls. | ||
|
|
||
| security.provider.1=org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider C:HYBRID;ENABLE{All}; | ||
| security.provider.2=org.bouncycastle.jsse.provider.BouncyCastleJsseProvider fips:BCFIPS | ||
| security.provider.3=SunPKCS11 | ||
| security.provider.4=SUN | ||
| security.provider.5=SunJGSS | ||
| security.provider.6=JdkLDAP | ||
|
|
||
| login.configuration.provider=sun.security.provider.ConfigFile | ||
|
|
||
| policy.expandProperties=true | ||
| policy.allowSystemProperty=true | ||
|
|
||
| keystore.type=BCFKS | ||
| keystore.type.compat=true | ||
|
|
||
| ssl.KeyManagerFactory.algorithm=PKIX | ||
| ssl.TrustManagerFactory.algorithm=PKIX | ||
|
|
||
| jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & usage TLSServer, \ | ||
| RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224, \ | ||
| SHA1 usage SignedJAR & denyAfter 2019-01-01 | ||
|
|
||
| jdk.security.legacyAlgorithms=SHA1, \ | ||
| RSA keySize < 2048, DSA keySize < 2048, \ | ||
| DES, DESede, MD5, RC2, ARCFOUR | ||
|
|
||
| jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \ | ||
| DSA keySize < 1024, SHA1 denyAfter 2019-01-01 | ||
|
|
||
| jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, DTLSv1.0, RC4, DES, \ | ||
| MD5withRSA, DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \ | ||
| ECDH, TLS_RSA_* | ||
|
|
||
| jdk.tls.legacyAlgorithms=NULL, anon, RC4, DES, 3DES_EDE_CBC | ||
|
|
||
| jdk.tls.keyLimits=AES/GCM/NoPadding KeyUpdate 2^37, \ | ||
| ChaCha20-Poly1305 KeyUpdate 2^37 | ||
|
|
||
| crypto.policy=unlimited | ||
|
|
||
| jdk.security.caDistrustPolicies=SYMANTEC_TLS,ENTRUST_TLS,CAMERFIRMA_TLS | ||
|
|
||
| jdk.tls.alpnCharset=ISO_8859_1 | ||
|
|
||
| # Revocation via BCTLS TrustManager (covers all TLS including LDAPS) | ||
| com.sun.net.ssl.checkRevocation=true | ||
|
|
||
| # BC FIPS CertPath revocation mechanisms | ||
| ocsp.enable=true | ||
| org.bouncycastle.x509.enableCRLDP=true | ||
|
|
||
| # OCSP stapling — request stapled response from server | ||
| jdk.tls.client.enableStatusRequestExtension=true |
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,55 @@ | ||
| # Security properties for non-FIPS test runs. | ||
| # Used with == (complete override) so all desired providers must be listed explicitly. | ||
| # Standard JDK providers are preserved in their default order; BCFIPS is appended last | ||
| # so it is available for tests that rely on BC-specific features without displacing JDK providers. | ||
|
|
||
| security.provider.1=SUN | ||
| security.provider.2=SunRsaSign | ||
| security.provider.3=SunEC | ||
| security.provider.4=SunJSSE | ||
| security.provider.5=SunJCE | ||
| security.provider.6=SunJGSS | ||
| security.provider.7=SunSASL | ||
| security.provider.8=XMLDSig | ||
| security.provider.9=SunPCSC | ||
| security.provider.10=JdkLDAP | ||
| security.provider.11=JdkSASL | ||
| security.provider.12=SunPKCS11 | ||
| security.provider.13=org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider C:HYBRID;ENABLE{All}; | ||
|
|
||
| login.configuration.provider=sun.security.provider.ConfigFile | ||
|
|
||
| policy.expandProperties=true | ||
| policy.allowSystemProperty=true | ||
|
|
||
| keystore.type=pkcs12 | ||
| keystore.type.compat=true | ||
|
|
||
| ssl.KeyManagerFactory.algorithm=SunX509 | ||
| ssl.TrustManagerFactory.algorithm=PKIX | ||
|
|
||
| jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & usage TLSServer, \ | ||
| RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224, \ | ||
| SHA1 usage SignedJAR & denyAfter 2019-01-01 | ||
|
|
||
| jdk.security.legacyAlgorithms=SHA1, \ | ||
| RSA keySize < 2048, DSA keySize < 2048, \ | ||
| DES, DESede, MD5, RC2, ARCFOUR | ||
|
|
||
| jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \ | ||
| DSA keySize < 1024, SHA1 denyAfter 2019-01-01 | ||
|
|
||
| jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, DTLSv1.0, RC4, DES, \ | ||
| MD5withRSA, DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \ | ||
| ECDH, TLS_RSA_* | ||
|
|
||
| jdk.tls.legacyAlgorithms=NULL, anon, RC4, DES, 3DES_EDE_CBC | ||
|
|
||
| jdk.tls.keyLimits=AES/GCM/NoPadding KeyUpdate 2^37, \ | ||
| ChaCha20-Poly1305 KeyUpdate 2^37 | ||
|
|
||
| crypto.policy=unlimited | ||
|
|
||
| jdk.security.caDistrustPolicies=SYMANTEC_TLS,ENTRUST_TLS,CAMERFIRMA_TLS | ||
|
|
||
| jdk.tls.alpnCharset=ISO_8859_1 |
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 |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| crypto.standard=FIPS-140-3 | ||
| tests.fips.only=true |
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
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
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
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.
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.
This modifies an attribute that was formely static final but was changed to just static in this PR.
I think this needs to be done in a different way, this is very prone to concurrency issues; and it is modifying static members of other classes is very surprising behavior which is usually not expected.
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.
I agree - this is just a dirty hack to make it work. Thanks for pointing it out, it should be reworked before moving out of WIP