Built-in single sign-on

P4 Server has a built-in way to configure single sign-on (SSO). Built-in SSO is an authentication method, like storing passwords in the P4 Server database, integrating with LDAP, or using P4 Authentication Service.

With built-in SSO, users sign in to P4 Server through a web browser with their organization's credentials, including the organization's multi-factor authentication (MFA). Built-in SSO uses Keycloak as the identity provider. Keycloak can connect (broker) to identity providers such as Microsoft Entra ID, Okta, and Ping Identity over OpenID Connect (OIDC) or Security Assertion Markup Language (SAML). Built-in SSO is available from P4 Server 2026.2.

Components

Built-in SSO has the following components:

  • The idp service in the P4 Web Server (p4 webserver). This service acts as the OIDC relying party, which is the application that sends users to Keycloak to sign in and then accepts the result. The service is part of P4 Server, so you install nothing separately.

  • Keycloak, which you install and manage.

  • Optionally, your organization's identity provider.

How it works

When a user logs in, the following steps take place:

  1. The user runs p4 login.

  2. A browser opens and shows the Keycloak sign-in page.

  3. The user signs in with their organization's credentials, including MFA if the organization requires it.

  4. P4 Server receives tokens from Keycloak.

  5. P4 Server issues a P4 ticket to the client.

  6. On each command, P4 Server checks the token and renews the token when it expires.

Existing clients work unchanged because they receive a ticket, as they do with other authentication methods.

Logging out clears the ticket but doesn't end the Keycloak session. After a logout, the next p4 login might complete without asking the user to sign in again.

A revoked token stays valid until it expires, because P4 Server checks tokens locally instead of asking Keycloak.

Compare built-in SSO and P4 Authentication Service

The following table compares built-in SSO with P4 Authentication Service.

Feature Built-in SSO P4 AS

Components to install

Keycloak. The idp service is part of P4 Server.

The P4 AS service.

Extension required

No

Yes

Supported upstream providers

Identity providers that Keycloak can broker to over OIDC or SAML, such as Microsoft Entra ID, Okta, and Ping Identity.

Identity providers that P4 AS supports.

Select users by group

No

Yes

MFA

Handled by the identity provider.

Handled by the identity provider.

Client support

Clients that support browser-based login, such as P4V and the p4 client.

Clients that support browser-based login, such as P4V and the p4 client.

P4 AS remains supported.

To run both services on the same server, add built-in SSO users to the non-SSO group of the P4 AS extension. For more information, see P4 Authentication Service.

Limitations

Built-in SSO has the following limitations:

  • A user with super access can't log in as a built-in SSO user.

  • Users aren't created automatically. You create them before their first login.

  • AuthMethod: idp can't be combined with P4 Server two-factor authentication. Use MFA in the identity provider instead.

  • Built-in SSO doesn't support forwarding replicas, P4 Proxy, or P4 Broker.

In this section: