Overview
suSHi takes security seriously. All sensitive credentials are encrypted at rest, authentication is handled securely, and connections use industry-standard encryption protocols. Core Security Principles:- Encryption at Rest: All credentials encrypted with AES-256
- Zero Knowledge: Your master password is never stored
- Secure Transmission: All connections use TLS/SSL
- Minimal Privileges: Access controls based on JWT authentication
Encryption Architecture
suSHi uses a multi-layered encryption approach:Credential Encryption
What Gets Encrypted
The following sensitive data is encrypted before storage:Private Keys
SSH private key content (RSA, ECDSA, Ed25519)
Passphrases
Private key passphrases for encrypted keys
Not encrypted: Machine names, hostnames, ports, usernames, and organization names. These are considered non-sensitive metadata.
Encryption Algorithm
suSHi uses AES-256-CFB (Advanced Encryption Standard, 256-bit, Cipher Feedback mode):Why These Choices?
Why These Choices?
AES-256: Industry-standard symmetric encryption, proven secureCFB Mode: Stream cipher mode, works well with variable-length dataPBKDF2: Password-based key derivation, slows down brute force attacksRandom IV: Each encrypted value uses unique IV, prevents pattern recognitionBase64 Encoding: Safe text encoding for database storage
Key Derivation with PBKDF2
PBKDF2 (Password-Based Key Derivation Function 2) converts your master password into an encryption key: Parameters:- Password: Your master password (provided at connection time)
- Salt: Unique per-user salt (stored in database)
- Iterations: 10,000 rounds
- Key Length: 32 bytes (256 bits)
- Hash Function: SHA-256
- Security: Slows down attackers significantly
- Performance: Fast enough for real-time decryption
- Compatibility: Well-tested iteration count
Initialization Vectors (IV)
Each encrypted field gets a unique, random IV:- Encrypting the same data twice produces different ciphertext
- Prevents pattern analysis attacks
- Each private key and passphrase has its own IV
Decryption Process
When you connect to a machine:Decryption only happens when you explicitly connect to a machine. Credentials are never decrypted for listing or viewing machines.
Password Security
Master Password
Your master password is critical for security:- Never Stored
- Per-Connection
- Strong Passwords
- Salt Storage
suSHi never stores your master password anywhere:
- Not in database
- Not in logs
- Not in session storage
- Not in cookies
Password Best Practices
Use Password Manager
Store your master password in a reputable password manager like 1Password, Bitwarden, or LastPass.
Enable 2FA on OAuth
Use two-factor authentication on your Google/GitHub accounts for additional security.
Rotate Regularly
Change your master password periodically (every 3-6 months).
Unique Per Service
Don’t reuse your master password on any other service.
Authentication Security
JWT Tokens
After OAuth login, suSHi issues JWT (JSON Web Tokens):- Stateless: No server-side session storage
- Signed: HMAC-SHA256 signature prevents tampering
- Expiring: Tokens expire after set duration
- Bearer: Sent in
Authorization: Bearer <token>header
JWT tokens are signed with a server secret. Tampering with the token invalidates the signature, causing authentication to fail.
Authorization Checks
Every API request validates:- JWT Validity: Token signature and expiration
- User Extraction: Username from token payload
- Ownership: User owns the requested resource
Connection Security
TLS/SSL Encryption
All connections to suSHi use TLS 1.2+ encryption:- HTTPS
- WSS (WebSocket Secure)
- SSH
Web dashboard and API:
- Encrypted with TLS 1.2 or higher
- Certificate validation
- Forward secrecy (ECDHE key exchange)
Network Security
All three connection segments are encrypted:- Browser ↔ suSHi: TLS 1.2+ (HTTPS/WSS)
- suSHi ↔ Machine: SSH protocol encryption
- End-to-end: No plaintext transmission at any point
Database Security
Encrypted Fields
Credential storage in database:Access Controls
- Database Credentials: Stored in environment variables, never in code
- Connection Pooling: Limited concurrent connections
- Prepared Statements: Prevents SQL injection
- Row-level Security: Queries filter by owner
Threat Model & Mitigations
Database Compromise
Database Compromise
Threat: Attacker gains access to databaseImpact: Attacker gets encrypted credentials but cannot decrypt without master passwordsMitigation:
- All sensitive data encrypted at rest
- Master passwords never stored
- PBKDF2 slows brute force attacks
- Unique salt per user
Man-in-the-Middle (MITM)
Man-in-the-Middle (MITM)
Threat: Attacker intercepts network trafficImpact: Cannot decrypt TLS-encrypted trafficMitigation:
- All connections use TLS 1.2+
- Certificate validation enforced
- HSTS headers recommended
- No plaintext transmission
Session Hijacking
Session Hijacking
Threat: Attacker steals JWT tokenImpact: Temporary access until token expiresMitigation:
- Short-lived tokens (configurable)
- Secure cookie flags (HttpOnly, Secure)
- Token rotation on sensitive operations
- IP-based anomaly detection (recommended)
Brute Force Attacks
Brute Force Attacks
Threat: Attacker tries many passwordsImpact: Limited by PBKDF2 iterations and rate limitingMitigation:
- PBKDF2 with 10,000 iterations
- Rate limiting on authentication endpoints
- Account lockout after failed attempts
- Captcha on login (recommended)
Insider Threats
Insider Threats
Threat: Malicious administratorImpact: Cannot decrypt credentials without master passwordsMitigation:
- Zero-knowledge architecture
- Audit logging of all operations
- Multi-person access controls
- Regular security audits
Security Best Practices
For Users
For Administrators
Keep Updated
Regularly update suSHi to get security patches
Secure Database
Use strong database passwords and restrict network access
Enable Logging
Log all authentication and access attempts
Backup Encrypted
Encrypt database backups and store securely
Rate Limiting
Implement rate limiting on all public endpoints
Network Isolation
Run suSHi in isolated network with firewall rules
Compliance & Standards
suSHi’s security measures align with:- OWASP Top 10: Protections against common web vulnerabilities
- NIST Guidelines: Password storage and key derivation
- PCI DSS: Encryption at rest and in transit (where applicable)
- GDPR: User data protection and privacy
For compliance documentation or security audit reports, contact your suSHi administrator or vendor.
Reporting Security Issues
If you discover a security vulnerability:- Do not open a public GitHub issue
- Email security concerns to the maintainers privately
- Provide detailed reproduction steps
- Allow reasonable time for fixes before disclosure
Security Roadmap
Planned security enhancements:- Hardware security module (HSM) integration
- Certificate pinning for mobile apps
- Audit log dashboard
- IP allowlisting per machine
- Biometric authentication options
- Zero-trust architecture components
Next Steps
OAuth Authentication
Learn how to sign in securely with Google or GitHub
Machine Management
Understand how credentials are stored when adding machines