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

[ER-444] Enable FIPS configuration at runtime via chef-server.rb #1061

Merged
merged 3 commits into from
Feb 2, 2017

Conversation

tyler-ball
Copy link
Contributor

@tyler-ball tyler-ball commented Jan 25, 2017

Instead of at build time. Setting 'fips true' in your chef-server.rb and
reconfiguring will run the existing fips recipe. If FIPS is enabled at
the Kernel level this value is defaulted to true and can be overridden
with 'fips false'.

Signed-off-by: tyler-ball [email protected]
Signed-off-by: rmoshier [email protected]

For the chef-server-12 pipeline this should not cause any differences. The fips_mode? method was returning false and will keep returning false. It does default the fips_enabled attribute to true if FIPS is enabled in your Kernel. This could potentially break customers until we start including the OpenSSL-FIPS module (the next card in our backlog).

  • Update README or docs to show the new fips true flag available in chef-server.rb
  • Update tests

@@ -244,6 +246,7 @@ def generate_hash
results["private_chef"]["oc-chef-pedant"] = PrivateChef["oc_chef_pedant"]
results["private_chef"]["notification_email"] = PrivateChef["notification_email"]
results["private_chef"]["from_email"] = PrivateChef["from_email"]
results["private_chef"]["fips_enabled"] = PrivateChef["fips"] || PrivateChef["fips_enabled"]
Copy link
Member

Choose a reason for hiding this comment

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

Why two exposed flags for a single toggle?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Our Chef configuration expects fips true so I wanted to provide the same interface to all our products that are going to allow fips enabling at runtime. But because Chef Server internally references fips_enabled I thought we could fall back to that.

The more I think about this though, the worse that is. Lets define the interface (fips true) and just stick to that.

@@ -43,7 +43,7 @@
# This requires the chef-server-fips package. If you do not have this,
Copy link
Member

Choose a reason for hiding this comment

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

Is this comment still true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, we'll update this comment

@marcparadise
Copy link
Member

What's the time frame for the fips build card? If we're looking at a long gap it might be best to hold off until that is also ready for merge.

@rmoshier rmoshier force-pushed the ER-444/enable-fips-runtime branch from 773785a to 7f04d10 Compare January 25, 2017 21:58
Copy link
Contributor

@stevendanna stevendanna left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me. Great to have this moving towards run-time vs build time!

@stevendanna
Copy link
Contributor

gif-keyboard-9842703361763374856

@stevendanna
Copy link
Contributor

cc @chef/chef-server-maintainers

rmoshier and others added 2 commits February 1, 2017 11:10
Instead of at build time. Setting 'fips true' in your chef-server.rb and
reconfiguring will run the existing fips recipe. If FIPS is enabled at
the Kernel level this value is defaulted to true and can be overridden
with 'fips false'.

Signed-off-by: tyler-ball <[email protected]>
Signed-off-by: rmoshier <[email protected]>
@tyler-ball tyler-ball force-pushed the ER-444/enable-fips-runtime branch from 7f04d10 to efd0fc0 Compare February 1, 2017 17:18
@tyler-ball tyler-ball force-pushed the ER-444/enable-fips-runtime branch from efd0fc0 to 6b2371f Compare February 1, 2017 17:20
server in FIPS mode. The default value of this flag is `false` except
on systems where FIPS is enabled at the Kernel where it defaults to `true`.

The only supported systems at this time for FIPS mode are RHEL. Package for
Copy link

Choose a reason for hiding this comment

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

Do we need to specify which versions of RHEL we support?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No - Chef Server is built for RHEL 5, 6 and 7. We support FIPS in all those versions.

# your chef-server will probably not work. If you have to manually
# change this, you're doing it wrong.
default['private_chef']['fips_enabled'] = false
default['private_chef']['fips_enabled'] = ChefConfig.fips?
Copy link
Member

Choose a reason for hiding this comment

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

When you come back for cleanup tasks, it would be good to add a preflight check that we're on a box that supports fips if it has been enabled in the config.

Copy link
Member

@marcparadise marcparadise left a comment

Choose a reason for hiding this comment

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

👍 , just the one follow up comment for when you circle back for cleanup work

@tyler-ball tyler-ball merged commit ae0f9bb into master Feb 2, 2017
@tyler-ball tyler-ball deleted the ER-444/enable-fips-runtime branch February 2, 2017 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants