-
Notifications
You must be signed in to change notification settings - Fork 28
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
Remove openssl.SetFIPS(true)
call
#1513
Conversation
Looks like Mariner 2 hasn't ported forward-ported the code to enable FIPS mode from the config file. OpenSSL only officially supports FIPS mode in v1.0.2, so the relevant code was removed in OpenSSL 1.1. Will have to find another way. |
To make sure I have this right: for a user to run a test with forced FIPS mode, this will work:
For the user to have an issue with passthrough, they'd have to be using yet another custom test runner that passes through |
Co-authored-by: Davis Goodin <[email protected]>
Yep, that's accurate. |
As agreed in https://github.com/microsoft/go-lab/blob/main/docs/adr/0012-remove-gofips.md, we shouldn't try to modify the OpenSSL FIPS mode.
This PR removes the
openssl.SetFIPS(true)
call and update our build scripts to enable FIPS mode system-wide.Our CI Mariner 2 image is not FIPS-enabled by default, so we need to force FIPS mode by setting
OPENSSL_FORCE_FIPS_MODE
. That flag should be passes to theTestScript
child processes as they only inherit a filtered set of environment variables, which includesGODEBUG
.Note that since we switched from
GOFIPS
toGODEBUG=fips140
, our test FIPS test coverage has increased, asGOFIPS
was not being passed toTestScript
child processes, making them not aware of the required FIPS mode.Also, this is unlikely that users need to update their code to also pass
OPENSSL_FORCE_FIPS_MODE
to child processes that don't inherit all environment variables. Mainly because they should be running a FIPS-enabled Mariner image on production. If they don't, possible for testing purposes, then child processes won't inherit theGODEBUG
env var neither.For #1445.