Single Sign-On (SSO) & Windows Authentication
Cockpit supports Single Sign-On (SSO) and passwordless authentication to integrate with corporate Identity Providers (IdPs) and domain environments.
Authentication Protocols
Cockpit integrates with standard SSO frameworks to validate user sessions:
- SAML 2.0: Integrates with enterprise Identity Providers such as Okta, Keycloak, Ping Identity, and Microsoft Entra ID.
- OpenID Connect (OIDC): A lightweight authentication layer built on top of OAuth 2.0 for cloud directory integrations.
- Integrated Windows Authentication (Kerberos / GSSAPI): Allows domain-joined clients to authenticate automatically using their active Windows security ticket, removing the requirement to input credentials manually.
1. Configuring Windows Session Authentication (Kerberos)
Deploying Kerberos authentication requires generating a keytab file on the Active Directory Domain Controller and registering the GSSAPI module on Cockpit.
Step A: Active Directory Server Preparation
Run the following administrative commands on the Domain Controller to register the Service Principal Name (SPN) and generate the keytab:
cmd
# 1. Register the Cockpit service principal name under the service account
setspn -a HTTP/cockpit.corp.awan.io svc-cockpit
# 2. Export the cryptographic keytab file to "cockpit.keytab"
ktpass /out cockpit.keytab /princ HTTP/cockpit.corp.awan.io@CORP.AWAN.IO /mapuser svc-cockpit /pass Password123 /crypto AES256-SHA1 /ptype KRB5_NT_PRINCIPALStep B: Cockpit Service Configuration
- Securely copy the generated
cockpit.keytabfile to/etc/cockpit/cockpit.keytabon the Cockpit server. - Add the following parameters to the
[auth]section of/etc/cockpit/cockpit.conf:
ini
[auth]
sso_enabled = true
sso_method = "kerberos"
sso_keytab_path = "/etc/cockpit/cockpit.keytab"
sso_realm = "CORP.AWAN.IO"
sso_service_principal = "HTTP/cockpit.corp.awan.io@CORP.AWAN.IO"2. Configuring SAML 2.0 Integration
To connect Cockpit to external Identity Providers like Okta or Azure AD:
- Log into Cockpit as an administrator.
- Navigate to Settings > Identity Management > SAML.
- Select Metadata Import and upload the Identity Provider Metadata XML file.
- Extract the Cockpit configurations to register the application on the Identity Provider:
- Entity ID:
https://cockpit.corp.awan.io/api/v1/auth/saml/metadata - Assertion Consumer Service (ACS) URL:
https://cockpit.corp.awan.io/api/v1/auth/saml/acs
- Entity ID:
- Configure the attribute mapping in the Identity Provider:
- Username Attribute: Map to the user's primary email address or unique ID (
NameIDoruid). - Groups Attribute: Map to the group assertion field (
memberOforgroups) to enable automatic permission mapping.
- Username Attribute: Map to the user's primary email address or unique ID (