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

Fix openssl pkcs12 export in pre-start.erb when in FIPS mode #407

Merged
merged 2 commits into from
Sep 21, 2022

Conversation

toabctl
Copy link
Contributor

@toabctl toabctl commented Sep 19, 2022

On a Ubuntu Bionic FIPS enabled stemcell, pre-start.erb fails. In FIPS Mode, the PKCS#12 format must use compatible encryption and hashing algorithms.

Fixes: #358

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/183313300

The labels on this github issue will be updated when the story is started.

@toabctl
Copy link
Contributor Author

toabctl commented Sep 19, 2022

@here I can't open the concourse-ci status. it's loading forever for me.

@strehle
Copy link
Member

strehle commented Sep 19, 2022

I can't open the concourse-ci status. it's loading forever for me.

Error from CI is

Action Failed get_task: Task 4d100a7f-da3b-4fb2-77c4-c17692fefaf7 result: 1 of 4 pre-start scripts failed. Failed Jobs: uaa.

I retriggered the jobs, but fail constantly, so I dont see why but related to you change

@toabctl toabctl force-pushed the develop-fix-fips-mode branch 2 times, most recently from 3e37730 to 441ff0f Compare September 20, 2022 08:53
On a Ubuntu Bionic FIPS enabled stemcell, pre-start.erb fails.
In FIPS Mode, the PKCS#12 format must use compatible encryption and
hashing algorithms.

Fixes: cloudfoundry#358
Copy link
Member

@strehle strehle left a comment

Choose a reason for hiding this comment

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

From my side ok because this option is only active in FIPS mode
If assumption is true, that for FIPS systems there is always a file /proc/sys/crypto/fips_enabled with content 1, I cannot say if this is always the case for such systems, I only know, others do NOT have this file and therefore, default behaviour stays

@torsten-sap does this fix also you case within SAP ?

@bruce-ricard do you have other concerns ?

@toabctl
Copy link
Contributor Author

toabctl commented Sep 21, 2022

@rkoster you did review #366 so maybe you could have a look here, too?

@strehle strehle requested a review from rkoster September 21, 2022 11:12
@strehle strehle merged commit c1af365 into cloudfoundry:develop Sep 21, 2022
@strehle
Copy link
Member

strehle commented Sep 21, 2022

discussion with @bruce-ricard , added log with #408
but merged so we can close the issue, Thanks @toabctl

Copy link
Contributor

@bruce-ricard bruce-ricard left a comment

Choose a reason for hiding this comment

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

Other than the log, LGTM

if [ -f "/proc/sys/crypto/fips_enabled" ]; then
local FIPS_ENABLED="$(cat /proc/sys/crypto/fips_enabled)"
if [ "${FIPS_ENABLED}" = 1 ]; then
FIPS_OPTS="-certpbe PBE-SHA1-3DES"
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed during our meeting, please add a log here saying something like

The fips parameters were activated

or similar.

@toabctl toabctl deleted the develop-fix-fips-mode branch September 28, 2023 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to specify PKCS12 algorithm in pre-start.erb
5 participants