Authentication & Security Architecture
Last updated
Was this helpful?
Last updated
Was this helpful?
The authentication system in sfp pro server addresses several complex challenges in Salesforce DevOps security. At its core, the system must secure not only user access but also manage machine-to-machine authentication for CI/CD systems, handle Salesforce credentials securely, and maintain complete isolation between different organizations.
The system implements authentication through multiple coordinated layers, each handling specific aspects of security:
Let's examine how authentication works for different types of users and systems:
Interactive User Authentication (FLXBL-Managed Instances):
This flow leverages FLXBL's registered OAuth applications, simplifying the setup for organizations. When a user authenticates:
The CLI initiates the OAuth process
FLXBL's global authentication service handles the OAuth callback
The user's identity is verified and passed to their instance
The instance creates and manages the user's session
CI/CD System Authentication:
CI/CD systems use application tokens that provide limited, scoped access:
Tokens are bound to specific instance and tenant
Each token has defined permission boundaries
Access is logged and auditable
Tokens can be revoked at any time
Self-Hosted Instance Authentication: In self-hosted environments, organizations manage their own OAuth applications:
One of the most critical aspects of the system is how it handles various credentials, particularly Salesforce organization credentials:
The system implements several key security principles:
Just-in-Time Secret Access: Credentials are only loaded when needed:
Workers fetch secrets at task start
Secrets remain only in memory
Credentials are cleared after task completion
No disk storage of sensitive data
Secure Secret Storage: All credentials are stored securely:
Encrypted at rest using tenant-specific keys
Accessible only through secure secret managers
Support for multiple secret management solutions
Regular secret rotation
Access Control: The system implements fine-grained access control:
Role-based access to credentials
Audit logging of all credential access
Restricted access to production credentials
Automated credential rotation support
Each instance maintains its own role and permission system:
The permission system ensures:
Clear separation of duties
Principle of least privilege
Granular access control
Audit trail of all actions
The authentication system addresses several key security requirements:
Tenant Isolation: Complete separation between organizations:
Independent authentication states
Separate credential storage
Isolated session management
No cross-tenant data access
Secure Communication: All communication is encrypted:
TLS for all API calls
Secure WebSocket connections
Encrypted credential transmission
Protected OAuth flows
Audit and Compliance: Comprehensive audit trails:
Authentication attempts logged
Credential access recorded
Session activity tracked
Security events monitored
Failure Handling: Secure failure modes:
Failed authentication logging
Credential access monitoring
Session timeout enforcement
Automated threat detection\