Single Sign-On (SSO) Integration¶
PixelView supports enterprise Single Sign-On (SSO) using industry-standard OpenID Connect (OIDC) and OAuth 2.0 protocols. By integrating with Dex—an enterprise-grade federated identity broker—PixelView enables organization members to authenticate seamlessly using their existing corporate identity providers (IdPs), including Keycloak, Okta, Microsoft Entra ID (Azure AD), Google Workspace, GitHub, and corporate LDAP / Active Directory.
Architecture & Authentication Flow¶
PixelView delegates federated authentication to Dex, ensuring secure, token-based authorization code flow with backend-level verification and session management:
+---------------+ 1. Click SSO Login (POST /api/ssologin) +-------------------+
| | ---------------------------------------------------------------> | |
| | | PixelView Backend |
| End User | <--------------------------------------------------------------- | (API & Session) |
| (Browser) | 2. HTTP 302 Redirect to IdP / Dex +-------------------+
| | ^
+---------------+ |
| |
| 3. Authenticate with Corporate Credentials & MFA |
v |
+---------------+ |
| Identity | |
| Provider | |
| (Dex / IdP) | |
+---------------+ |
| |
| 4. Redirect with Auth Code (GET /api/auth/callback?code=...&state=...) |
+------------------------------------------------------------------------------------+
|
5. Backend validates code with Dex/IdP,
creates/syncs user in MongoDB, and
issues secure HttpOnly session cookie
|
+---------------------------------------+
|
| 6. HTTP 302 Redirect to /sso-login-success
v
+-------------------+ +-------------------+
| PixelView Web | 7. GET /api/profile | PixelView Backend |
| Frontend | -----------------------------------------------------------> | (API & Session) |
| (/sso-login-succ) | <----------------------------------------------------------- | |
+-------------------+ 8. Session Validated +-------------------+
|
| 9. Redirect to Dashboard (/openstack)
v
+-------------------+
| Active Session |
+-------------------+
Key Flow Characteristics¶
- Direct Backend Handshake: Clicking SSO Login initiates an HTTP POST to
/api/ssologin. The browser is redirected directly to Dex/IdP. - Secure Callback Endpoint: The identity provider redirects back to the backend's dedicated callback endpoint (
/api/auth/callback). Authorization codes and tokens are exchanged on the backend network, never exposed to client-side scripts. - Automated Session Handoff: Once verified, the backend issues an authenticated HTTP session cookie and forwards the browser to
/sso-login-success. The frontend confirms the session via/api/profileand routes the user directly to the primary operational dashboard.
Prerequisites¶
Before setting up SSO in PixelView, ensure you have:
* A running Dex instance deployed and operated by your organization (acting as the federated identity broker to your upstream corporate IdPs).
* Administrator privileges on your Identity Provider to register applications and configure redirect URIs.
* A fully qualified domain name (FQDN) secured with HTTPS for your PixelView deployment (e.g., https://cloud.pixelvirt.com).
* The mandatory PixelView OAuth Callback URL:
Dex Federated Identity Broker Setup¶
PixelView is engineered to authenticate against Dex, which translates upstream identity credentials from any provider into standardized OIDC identity tokens.
Sample Dex Configuration (dex.yaml)¶
Below is a representative Dex configuration illustrating how upstream identity providers map to PixelView:
Important
- The
redirectURIsregistered understaticClientsin Dex must point to PixelView's backend callback endpoint:https://<your-pixelview-domain>/api/auth/callback. - Retain
id: pixelviewas the client identifier matching PixelView's internal OIDC client configuration.
Configuring PixelView Backend¶
To link PixelView to your Dex or OIDC identity provider, update the environment variables for the pixelview-backend container in your deployment configuration (docker-compose.yml or .env file):
Configuration Parameters¶
| Environment Variable | Requirement | Description |
|---|---|---|
DEX_ISSUER_URL |
Required | The base issuer URL of the Dex instance hosted by your organization (must serve /.well-known/openid-configuration, e.g., https://dex.yourdomain.com/dex). |
DEX_REDIRECT_URI |
Required | The fully qualified callback endpoint where the browser returns after authentication (https://<your-pixelview-domain>/api/auth/callback). |
AUTH_KEY |
Required | Internal microservice communication authentication token. |
DOMAIN / SUBDOMAIN |
Optional | Contextual domain definitions used for cookie scoping and multi-tenant URL generation. |
Restart the backend container to apply the new configuration:
User Provisioning & Permissions¶
PixelView implements Just-In-Time (JIT) user provisioning for SSO logins:
- Automatic Account Creation: When an authenticated user signs in via SSO for the first time, PixelView automatically provisions a new account record in the database using the verified
emailand identity claims. - Default Role Assignment: Newly provisioned SSO accounts are initially granted the standard
Userrole with scoped baseline access. - Access Elevation & Governance: System administrators can elevate any SSO user to
Adminor grant fine-grained module privileges (OpenStack, Kubernetes, Inventory, Patch Management, Automation) via the Granular Permissions Matrix located in Management → Users.
End-User Login Experience¶
Once SSO is configured, users authenticate using their standard corporate workflow:
- Open your browser and navigate to the PixelView login portal (
/login). - Locate the Continue with SSO section beneath the primary login form and click SSO Login.
- You will be redirected to your corporate identity provider portal (or Dex connector selector).
- Enter your corporate credentials and complete any mandatory Multi-Factor Authentication (MFA) challenges.
- Upon successful authentication, your browser is redirected back through
/api/auth/callbackand/sso-login-success, landing directly on your active operational dashboard.
Troubleshooting¶
| Symptom / Error | Probable Cause | Recommended Resolution |
|---|---|---|
Invalid redirect_uri on IdP |
The redirect URI in Dex or IdP does not match https://<domain>/api/auth/callback. |
Ensure the callback URL in your client configuration matches https://<your-domain>/api/auth/callback with exact spelling, port, and https:// protocol. |
User lands on /sso-login-success but remains unauthenticated |
The session cookie was rejected by the browser due to protocol or domain mismatch. | Ensure your reverse proxy (e.g. Nginx) passes X-Forwarded-Proto: https and X-Forwarded-For headers to pixelview-backend. |
Token verification failed |
Clock skew between the PixelView host and Dex server. | Synchronize system clocks on both servers using NTP (chrony or systemd-timesyncd). |
| Missing user email attribute | Upstream Identity Provider is not releasing the email scope to Dex. |
Verify that the email and profile scopes are enabled in the upstream IdP client configuration. |
| Dex Issuer Discovery Error | PixelView backend cannot reach DEX_ISSUER_URL/.well-known/openid-configuration. |
Test connectivity from inside the pixelview-backend container: docker exec -it pixelview-backend curl -k https://dex.yourdomain.com/dex/.well-known/openid-configuration. |