Introduction
Chef Automate can combine with several services to authenticate users and use their existing members to decide on Chef Automate permissions. This blog will teach us about Chef Authentication Concepts. The Security Assertion Markup Language and the Lightweight Directory Access Protocol will be the primary topics covered here.

Security Assertion Markup Language
Chef Automate can work with existing Security Assertion Markup Language, also known as SAML services, to certify users and determine their Chef Automate permissions based on their current group memberships.
Existing Identity Management Systems Authentication
Chef Automate supports both externally managed users from an IdP and local users. In the same instance, you can configure one LDAP service or MSAD for a more straightforward configuration of Active Directory configurations and one SAML IdP. You do not need to configure an external IdP if you solely use Chef Automate's local users and teams.
Configuring Identity Providers
We should make two actions to configure chef authentication for your Chef Automate installation:
- We would need to build a TOML file with your partial SAML settings.
- On the command line, use chef-automate config patch "/path/to/your-file.toml>" to apply your update.
Change Identity Providers
To modify your configured IdP, follow these steps:
- Step 1: "Run chef-automate config show config.toml".
- Step 2: "Edit config.toml" to replace the "dex.v1.sys.connectors" section with the config values for your new identity provider.
- Step 3: Run "chef-automate config set config.toml" to set your updated config.
We should note that users that sign in using SAML will have a session period of 24 hours before having to sign in again.

Supported Identity Management Systems
Chef Automate supports SAML interactions using the Dex library. Dex for IdP-initiated SAML logins does not endorse these IdPs. As a result, Chef Automate will not be able to enable IdP-initiated SAML logins with specific IdPs.
The "unsupported auth mode" error occurs when you attempt to sign in with an unsupported IdP-supported SAML login. Return to the standard SP-initiated login mode and continue configuring Chef Automate SAML.
Below we have lists of some supported systems:
- Tivoli Federated Identity Manager
- OneLogin
- Ping
- Office365
- OKTA
- Azure AD
SAML Configuration Settings
The SAML configuration options are as follows:
[dex.v1.sys.connectors.saml]
ca_contents = "<here we put our ca contents>" #must needed
sso_url = "<the SSO URL is put here>" #must needed
email_attr = "<email attribute is put here>" #must needed
username_attr = "<the username attribute is put here>" #must needed
groups_attr = "<the groups attribute is put here>" # choice
allowed_groups = ["group1", "group 2"] # choice
entity_issuer = "<the entity issuer is added here>" # choice
name_id_policy_format = "<put here based on accepted format>" # choice
We should ensure that "ca_contents" contain a copy of the certificate used to sign the SAML claims. The certificate should be a PEM-encoded string.
Setting "allowed_groups" enable SAML sign-in for members of the listed groups while discarding all user groups that are not on the list. We must add groups to the "allowed_groups" list for Chef Automate.
In the configuration example above, users belonging to "group1" or "group2" may sign in to Chef Automate, and those groups will appear as "team:saml:group1" and "team:saml:group2," respectively. Unlisted "group3" users would not have access to Chef Automate. Chef Automate supports utilising SAML to authenticate users and assign access to SAML groups.
Troubleshooting
Error: "Unsupported auth mode"
When using an unsupported IdP-supported SAML login, the "unsupported auth mode" error occurs.
To address this issue, return to the standard SP-initiated login mode.
Chef Automate uses the Dex library to support SAML connections. Dex does not support IdP-initiated SAML logins with these IdPs. Chef Automate does not allow IdP-initiated SAML logins utilising the previously mentioned IdPs.




