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

Chef embedded ruby is not linked with system openssl FIPS mode #8620

Open
pkazi opened this issue May 30, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@pkazi
Copy link

commented May 30, 2019

Description

On Kernel level FIPS enabled server, chef embedded ruby is not linked with system openssl, it gives OpenSSL.fips_mode as false.

$ /opt/chef/embedded/bin/ruby -ropenssl -e "puts OpenSSL.fips_mode"
false

Whereas same thing for system ruby, it checks system openssl and gives OpenSSL.fips_mode as true.

$ /opt/ruby/bin/ruby -ropenssl -e "puts OpenSSL.fips_mode"
true

We are concern about this, because even though chef-client runs in FIPS mode ON, some shell/ruby scripts which are run using chef embedded ruby, it sets FIPS mode to false as default.

Chef Version

Chef: 14.7.17

Platform Version

CentOS Linux release 7.6.1810 (Core)

Replication Case

$ cat /proc/sys/crypto/fips_enabled 
1

$ cat /proc/cmdline 
BOOT_IMAGE=/boot/vmlinuz-3.10.0-957.12.1.el7.x86_64 root=UUID=8c1540fa-e2b4-407d-bcd1-59848a73e463 ro console=tty0 crashkernel=auto console=ttyS0,115200 fips=1
 
$ /opt/chef/embedded/bin/ruby -ropenssl -e "puts OpenSSL.fips_mode"
false

$ /opt/chef/embedded/bin/ruby --version
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]

$ /opt/ruby/bin/ruby -ropenssl -e "puts OpenSSL.fips_mode"
true

$ /opt/ruby/bin/ruby --version
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]

$ openssl version
OpenSSL 1.0.2k-fips  26 Jan 2017

$ /opt/chef/embedded/bin/ruby -ropenssl -e "puts OpenSSL::OPENSSL_LIBRARY_VERSION"
OpenSSL 1.0.2q-fips  20 Nov 2018

$ /opt/ruby/bin/ruby -ropenssl -e "puts OpenSSL::OPENSSL_LIBRARY_VERSION"
OpenSSL 1.0.2k-fips  26 Jan 2017

Client Output


Stacktrace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.