Table of contents
1.
Introduction
2.
Authentication Process
2.1.
Chef-validator
3.
What Exactly is FIPS?
3.1.
Who Must Enable FIPS?
3.2.
Who Should Not Enable FIPS?
4.
How to Make the Operating System Support FIPS Mode
4.1.
Kernel settings for FIPS
5.
How to Set the Chef Infra Server to FIPS Mode
5.1.
Prerequisites
5.2.
Configuration
6.
How to Make the Chef Infra Client Use FIPS Mode
6.1.
Prerequisites
6.2.
Configuration
7.
Frequently Asked Questions
7.1.
What exactly is Chef infrastructure?
7.2.
What is the purpose of Chef infra?
7.3.
Is chef a code for infrastructure?
7.4.
Is the DevOps tool chef?
7.5.
How can I send the Frontend node's (Automate or ChefInfraServer) specific configuration?
8.
Conclusion
Last Updated: Aug 13, 2025

Security in Chef Infra

Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

The Chef Infra Server API handles all communication between the Chef Infra Client and the Chef Workstation. Since the Chef Infra Server API is an authenticated REST API, authentication and authorization are required for each call. You utilize the Chef Infra Server API by tools like knives and the chef-server command.

Security In Chef Infra

Authentication Process

The authentication procedure ensures that only legitimate users or clients are granted access to the Chef Infra Server. The Chef Infra Server uses public key encryption. When you set up Chef Workstation or configure the Chef Infra Client, you create the public and private keys.

  • The public key is kept on the Chef Infra Server.
  • Chef Workstation keeps the secret key in ~/.chef/
  • The private key is kept in /etc/chef by the Chef Infra Client.

 

The Chef Infra Server API is used for communication between the Chef Infra Client and Chef Workstation and the Chef Infra Server. When sending requests to the Chef Infra Server, the Chef Infra Client and Chef Workstation employ a specific set of HTTP headers and sign the remaining ones using their private keys. The Chef Infra Server then uses the public key to validate the headers and the contents.

Chef-validator

Chef Infra Client must use the Chef Infra Server API and a private key to authenticate each request it makes to the Chef Infra Server. Chef Infra Client uses a private key stored in /etc/chef/client.pem to authenticate each request before sending it to the Chef Infra Server.

Chef Validator

The first time Chef Infra Client is launched from a new node, the private key does not yet exist.

During the initial run of the Chef Infra Client:

  • To sign up with the Chef Infra Server, the Chef Infra Client uses the chef-validator private key, which is stored in /etc/chef/validation.pem 
     
  • For all upcoming requests for authentication to the Chef Infra Server, the Chef Infra Server issues a private key to the Chef Infra Client.
     
  • The chef Infra Client stores the private key as  /etc/chef/client.pem on the node.

 

The entire initial Chef Infra Client run will fail if the request to communicate with the Chef Infra Server using the chef-validator key is unsuccessful.

Delete the chef-validator private key from /etc/chef/validation.pem following the completion of the first successful Chef Infra Client run.

What Exactly is FIPS?

Federal Information Processing Standards (FIPS) are national specifications for computer systems used by military and civilian government contractors.

To approve cryptographic modules, the federal government uses the security standard known as FIPS 140-2. Chef Automate uses the OpenSSL FIPS Object Module, which complies with FIPS 140-2's specifications for software cryptography modules. The OpenSSL Object Module provides an API for calling FIPS-approved cryptographic functions from calling apps.

Who Must Enable FIPS?

If you work for or with a non-military government agency in the United States, you might be compelled by law to activate FIPS. Ask your compliance department if you're unsure whether you need to enable FIPS.

Who Should Not Enable FIPS?

Suppose you work for a US non-military government agency or are under contract with one, and you are required by your agreement to adhere to federal government security standards. In that case, you will just need to activate FIPS. Do not enable FIPS if you are not a US non-military governmental agency or if you do not have a contract with one, and you are not required by your agreement to adhere to federal government security standards. We only advise using FIPS if it is legally required because Chef products have strong security standards even without it. FIPS limits the usage of several hashing techniques you might want to employ.

How to Make the Operating System Support FIPS Mode

Kernel settings for FIPS

A kernel-level setting can set up FIPS mode on Windows and Red Hat Enterprise Linux. The operating system will only employ FIPS-approved algorithms and keys during operation once FIPS mode has been enabled at the kernel level.

Except for the workstation, which necessitates selecting a port in the fips_git_port port option of the cli.toml, all of the tools Chef provides that have FIPS support read this kernel setting and default their mode of operation to match it. For the other Chef Infra tools, such as the Chef Infra Client, if you run it on an operating system set to FIPS mode and the user doesn't disable it, Chef Infra will run automatically in FIPS mode.

How to Set the Chef Infra Server to FIPS Mode

Prerequisites

Systems that are Supported: CentOS or Red Hat Enterprise Linux 6 or higher

at least version 12.13 of the Chef Infra Server

Configuration

If you install or adjust the Chef Infra Server while FIPS compliance is enabled at the kernel level, it will run in FIPS mode by default.

Add fips true to the /etc/opscode/chef-server.rb file to manually enable FIPS on the Chef Infra Server.

How to Make the Chef Infra Client Use FIPS Mode

Prerequisites

Supported Operating Systems: Red Hat Enterprise Linux 6 or later, CentOS, Oracle Linux, and Ubuntu systems with Chef Infra Client 16.13 or later.

Configuration

Chef Infra Client will, by default, execute in FIPS mode if FIPS compliance is enabled at the kernel level. If not, add fips true to either/etc/chef/client.rb or C:\\chef\\client.rb

Frequently Asked Questions

What exactly is Chef infrastructure?

A potent agent, the Chef Infra Client applies your configurations to distant Linux, macOS, Windows, and cloud-based systems. It handles the challenging task of system configuration and enables you to scale Chef up or down as necessary.

What is the purpose of Chef infra?

A potent automation platform called Chef Infra turns infrastructure into code. Regardless of the size of your network, Chef Infra automates the configuration, deployment, and management of infrastructure across it, whether you're operating in the cloud, on-premises, or in a hybrid environment.

Is chef a code for infrastructure?

Infrastructure can be defined as code using the automation tool chef.

Is the DevOps tool chef?

A tool for quickening the delivery of applications and DevOps collaboration is Chef DevOps. By treating infrastructure like code, Chef aids in problem-solving.

How can I send the Frontend node's (Automate or ChefInfraServer) specific configuration?

When creating a file, use the syntax config_file=/ABSOLUTE_PATH/customconfig.toml and give it the absolute path.

Conclusion

On top of Ruby, Chef is a thin DSL (domain-specific language). With this method, Chef can offer just the right amount of abstraction to make it simple to reason about your infrastructure. In addition to a stated way to expand that taxonomy using the full power of the Ruby language, Chef contains a built-in taxonomy of all the essential resources one might configure on a system. Chef Infra chose Ruby because it allows you to use the detailed built-in taxonomy and whatever customization your business needs.

Recommended Readings:

Refer to our Test Seriesproblems listsproblems, participate in contests and take a look at our courses that will help you become proficient in DSA in PythonC++Java, and Competitive programming. These Interview experiences will give you a heads-up on what you must prepare for!

Live masterclass