The SSO Client module transparently proxies ALL user operations to an SSO server when anchored. This enables Doh instances to operate with zero local users while seamlessly accessing a centralized user system.
This module provides 100% transparent user database sharing by intercepting all user operations and proxying them to a central SSO server. Users, admins, and applications never know authentication is remote.
Configure SSO Client in your pod.yaml:
sso_client:
endpoint: "https://your-sso-server.com"
fallback_to_local: true
debug_logging: false
| Option | Type | Default | Description |
|---|---|---|---|
endpoint |
String | null |
SSO server URL |
token_storage_path |
String | /.doh/static/sso_auth_token |
Path for auth token storage |
anchor_path |
String | /.doh/static/sso-anchor.json |
Path for anchor data storage |
connection_timeout |
Number | 30000 |
Connection timeout in milliseconds |
reconnect_interval |
Number | 5000 |
Reconnection interval in milliseconds |
heartbeat_interval |
Number | 60000 |
Heartbeat interval in milliseconds |
fallback_to_local |
Boolean | true |
Fallback to local users if SSO unavailable |
debug_logging |
Boolean | false |
Enable debug logging |
The module provides a complete CLI interface mirroring cloud anchoring patterns:
# Set SSO endpoint
doh sso endpoint <sso-server-url>
# Anchor to SSO server with your credentials
doh sso anchor
# Set endpoint and anchor in one command
doh sso anchor <sso-server-url>
# Anchor on behalf of another user (requires permissions)
doh sso anchor-as <user@sso-server.com>
# Show anchoring status
doh sso status
# Clear anchoring (revert to local users)
doh sso clear
# Show available commands
doh sso
# Configure and anchor to SSO server
doh sso endpoint https://sso.company.com
doh sso anchor
# Check status
doh sso status
# Clear anchoring if needed
doh sso clear
When anchored, the following user operations are transparently proxied:
Users.authenticateUser() → SSO server authenticationUsers.getUserByUsername() → SSO server user lookupUsers.createUser() → SSO server user creationUsers.updateUser() → SSO server user updatesUsers.deleteUser() → SSO server user deletionUsers.getAllUsers() → SSO server user listingDoh.permit() → SSO server permission checksWhen fallback_to_local is enabled (default), the client will:
This ensures resilience and allows graceful degradation.
The SSO Client implements a sophisticated multi-level caching system to optimize performance:
// Programmatic cache control
Doh.SSOAnchoring.clearUserCache(); // Clear user data cache
Doh.SSOAnchoring.refreshUserCache(user); // Refresh specific user
Cache is automatically managed but can be controlled when needed.
Access the admin interface at /admin/sso_anchoring to:
The interface provides the same functionality as the CLI but through a web UI.
The module defines the following permission group:
sso_user GroupPermissions:
manage:sso_anchoring - Can anchor/unanchor instancesview:sso_anchoring - Can view SSO connection interfaceTo assign SSO user permissions:
// Via code
Doh.assignUserToPermissionGroup(user, 'sso_user');
Or via pod configuration:
Users:
groups:
sso_user:
inherits: ['authenticated_user']
permissions:
- 'manage:sso_anchoring'
- 'view:sso_anchoring'
This module enables "cold" instance deployment:
doh sso anchor https://sso.company.comNo user migration, database setup, or configuration required!
Organization Setup:
Benefits:
The module provides comprehensive error handling and diagnostic capabilities:
"Endpoint not supported via socket" Error
/api/sso/user/profile/ endpointExcessive Validation Calls
"Cannot read properties of undefined (reading 'replace')" Error
Enable comprehensive debugging in pod.yaml:
sso_client:
debug_logging: true
browser_pod:
Users:
auth_debug: true # Enable authentication debug messages
Network Errors
Authentication Errors
Configuration Errors
The module includes automatic recovery mechanisms:
The module exposes functions via Doh.SSOAnchoring:
performSSOAnchoring(username, password) - Anchor to SSO serverperformSSOAnchoringAs(requestingUser, requestingPassword, targetUser) - Anchor-asisInstanceSSOAnchored() - Check if anchoredclearSSOAuthToken() - Clear authenticationgetSSOFingerprint() - Get instance fingerprintThese functions are used by the CLI and admin interface but can also be called programmatically.