diff --git a/CHANGELOG.md b/CHANGELOG.md index 024ebc0..124fb56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,11 +21,6 @@ - The nix overlay build is fixed for the SSH module (via [#282](https://github.com/tale/headplane/pull/282)) - Switch our build processes to use TypeScript Go and Rolldown Vite for better build and type-check performance. - Cookies are now encrypted JWTs, preserving API key secrets (*GHSA-wrqq-v7qw-r5w7*) -- OIDC profile pictures are now available from Gravatar by setting `oidc.profile_picture_source` to `gravatar` (closes [#232](https://github.com/tale/headplane/issues/232)). -- OIDC now allows passing many custom parameters: - - `oidc.authorization_endpoint`, `oidc.token_endpoint`, and `oidc.userinfo_endpoint` can be overridden to support non-standard providers or scenarios without discovery (closes [#117](https://github.com/tale/headplane/issues/117)). - - `oidc.scope` can be set to specify custom scopes (defaults to `openid email profile`). - - `oidc.extra_params` can be set to pass arbitrary query parameters to the authorization endpoint (closes [#197](https://github.com/tale/headplane/issues/197)). ### 0.6.0 (May 25, 2025) - Headplane 0.6.0 now requires **Headscale 0.26.0** or newer. diff --git a/GUACAMOLE_REMOTE_ACCESS_DESIGN.md b/GUACAMOLE_REMOTE_ACCESS_DESIGN.md deleted file mode 100644 index f9d2ccb..0000000 --- a/GUACAMOLE_REMOTE_ACCESS_DESIGN.md +++ /dev/null @@ -1,362 +0,0 @@ -# πŸ—οΈ Guacamole + Python ASGI Remote Access Architecture - -## Overview -This document outlines the proposed architecture for replacing the problematic 38MB WASM SSH console with a professional, secure, and maintainable remote access solution using Apache Guacamole, Python ASGI backend, and a custom SPA frontend. - -## 🎯 Architecture Goals - -### Security First -- **Server-side connections**: All SSH/RDP/VNC handled on trusted infrastructure -- **No client-side crypto**: Private keys never leave the server -- **Role-based access control**: Integrate with existing OIDC role mapping -- **Audit trails**: Complete session logging and recording capabilities -- **Standard protocols**: Use proven, auditable technologies - -### Performance & UX -- **Lightweight frontend**: <1MB custom SPA vs 38MB WASM blob -- **Real-time communication**: WebSocket-based terminal streaming -- **Responsive design**: Mobile-friendly remote access interface -- **Fast deployment**: Standard containerization, no Go build complexity - -## 🏒 System Architecture - -``` -β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ Custom SPA │◄──►│ Python ASGI │◄──►│ Guacd Daemon β”‚ -β”‚ (TypeScript) β”‚ β”‚ Backend β”‚ β”‚ (C/Docker) β”‚ -β”‚ β”‚ β”‚ (FastAPI/Sanic) β”‚ β”‚ β”‚ -β”‚ β€’ Terminal UI β”‚ β”‚ β€’ WebSocket β”‚ β”‚ β€’ SSH Client β”‚ -β”‚ β€’ Session Mgmt β”‚ β”‚ β€’ Auth Checks β”‚ β”‚ β€’ RDP Client β”‚ -β”‚ β€’ Role Display β”‚ β”‚ β€’ Protocol Bridgeβ”‚ β”‚ β€’ VNC Client β”‚ -β”‚ β€’ File Transfer β”‚ β”‚ β€’ Session Logs β”‚ β”‚ β€’ Protocol Mux β”‚ -β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ - β”‚ β”‚ β”‚ - β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ - └──────────────►│ Headplane β”‚β—„β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ - β”‚ Main App β”‚ - β”‚ β€’ OIDC Roles β”‚ - β”‚ β€’ User Sessions β”‚ - β”‚ β€’ Node Discovery β”‚ - β”‚ β€’ Audit Logs β”‚ - β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ -``` - -## πŸ”§ Component Design - -### 1. Apache Guacamole Daemon (guacd) -**Role**: Protocol handling and connection management - -```dockerfile -# Lightweight guacd container -FROM guacamole/guacd:latest -EXPOSE 4822 -# Custom configuration for Headplane integration -COPY guacd.conf /etc/guacamole/ -``` - -**Configuration**: -- **SSH connections**: Direct to Tailscale nodes -- **Connection pooling**: Efficient resource usage -- **Protocol support**: SSH, RDP, VNC as needed -- **Security**: Connection isolation and timeout handling - -### 2. Python ASGI Backend -**Role**: WebSocket bridge and authentication/authorization - -```python -# Core FastAPI application -from fastapi import FastAPI, WebSocket, Depends -from fastapi.security import HTTPBearer -import asyncio -import websockets - -app = FastAPI() - -class GuacamoleProxy: - def __init__(self): - self.guacd_host = "guacd" - self.guacd_port = 4822 - - async def create_connection(self, protocol: str, params: dict): - """Create guacamole connection with protocol-specific params""" - pass - - async def stream_session(self, websocket: WebSocket, connection_id: str): - """Proxy guacamole protocol over WebSocket""" - pass - -@app.websocket("/terminal/{node_name}") -async def terminal_endpoint( - websocket: WebSocket, - node_name: str, - user: User = Depends(get_current_user) -): - # Check role-based permissions - permissions = get_terminal_permissions(user.groups) - if not permissions['ssh']: - await websocket.close(4003, "Insufficient permissions") - return - - # Create guacamole connection - proxy = GuacamoleProxy() - connection = await proxy.create_connection("ssh", { - "hostname": node_name, - "username": user.preferred_username, - "port": "22" - }) - - # Stream session - await proxy.stream_session(websocket, connection.id) -``` - -**Key Features**: -- **Authentication**: Validate user sessions from Headplane -- **Authorization**: Role-based access control using OIDC groups -- **WebSocket proxy**: Bridge between SPA and guacd protocol -- **Session management**: Track active connections and resources -- **Audit logging**: Record all connection attempts and activities - -### 3. Custom SPA Frontend -**Role**: User interface and terminal rendering - -```typescript -// Terminal component using xterm.js -import { Terminal } from 'xterm'; -import { FitAddon } from 'xterm-addon-fit'; -import { WebLinksAddon } from 'xterm-addon-web-links'; - -class GuacamoleTerminal { - private terminal: Terminal; - private socket: WebSocket; - - constructor(private nodeHostname: string) { - this.terminal = new Terminal({ - theme: { background: '#1a1a1a' }, - fontSize: 14, - fontFamily: 'JetBrains Mono, monospace' - }); - - this.terminal.loadAddon(new FitAddon()); - this.terminal.loadAddon(new WebLinksAddon()); - } - - async connect() { - const wsUrl = `wss://${location.host}/api/terminal/${this.nodeHostname}`; - this.socket = new WebSocket(wsUrl); - - this.socket.onmessage = (event) => { - this.terminal.write(event.data); - }; - - this.terminal.onData((data) => { - this.socket.send(data); - }); - } -} -``` - -**UI Features**: -- **Modern terminal**: xterm.js with full VT100 compatibility -- **Responsive design**: Works on desktop, tablet, mobile -- **File transfer**: Drag-and-drop file uploads via SFTP -- **Session tabs**: Multiple concurrent connections -- **Role indicators**: Clear display of user permissions - -## πŸ” OIDC Role Integration - -### Permission Matrix -Integration with existing OIDC role mapping system: - -```python -def get_terminal_permissions(user_groups: list[str]) -> dict: - """Get terminal access permissions based on OIDC groups""" - role = map_oidc_groups_to_role(user_groups) # Use existing mapping - - permissions = { - 'owner': { - 'ssh': True, - 'rdp': True, - 'vnc': True, - 'file_transfer': True, - 'session_recording': False, # Owners don't need to be recorded - 'connection_sharing': True, - 'admin_nodes': True - }, - 'admin': { - 'ssh': True, - 'rdp': True, - 'vnc': True, - 'file_transfer': True, - 'session_recording': True, # Record admin sessions - 'connection_sharing': True, - 'admin_nodes': True - }, - 'network_admin': { - 'ssh': True, - 'rdp': False, - 'vnc': False, - 'file_transfer': True, - 'session_recording': True, - 'connection_sharing': False, - 'admin_nodes': False # Only access to regular nodes - }, - 'it_admin': { - 'ssh': True, - 'rdp': True, # IT needs RDP for Windows support - 'vnc': False, - 'file_transfer': True, - 'session_recording': True, - 'connection_sharing': False, - 'admin_nodes': False - }, - 'auditor': { - 'ssh': False, # Read-only access - 'rdp': False, - 'vnc': False, - 'file_transfer': False, - 'session_recording': False, - 'connection_sharing': False, - 'admin_nodes': False, - 'view_sessions': True, # Can view active sessions - 'replay_sessions': True # Can replay recorded sessions - }, - 'member': { - 'ssh': False, - 'rdp': False, - 'vnc': False, - 'file_transfer': False, - 'session_recording': False, - 'connection_sharing': False, - 'admin_nodes': False - } - } - - return permissions.get(role, permissions['member']) -``` - -### Environment Variable Configuration -Extend existing environment variable system for remote access: - -```bash -# Existing OIDC role mapping -HEADPLANE_ADMIN_GROUPS="vp,director,manager" -HEADPLANE_NETWORK_ADMIN_GROUPS="devops,network,sre" - -# New remote access permissions -HEADPLANE_SSH_ALLOWED_GROUPS="admin,network_admin,it_admin" -HEADPLANE_RDP_ALLOWED_GROUPS="admin,it_admin" -HEADPLANE_SESSION_RECORDING_REQUIRED="admin,network_admin,it_admin" -HEADPLANE_FILE_TRANSFER_ALLOWED="admin,network_admin,it_admin" -``` - -## πŸš€ Deployment Strategy - -### Docker Compose Setup -```yaml -services: - headplane: - # Existing Headplane service - environment: - - HEADPLANE_REMOTE_ACCESS_ENABLED=true - - HEADPLANE_GUACD_HOST=guacd - - guacd: - image: guacamole/guacd:latest - container_name: headplane-guacd - restart: unless-stopped - volumes: - - ./guacd.conf:/etc/guacamole/guacd.conf:ro - expose: - - "4822" - - remote-access-backend: - build: ./remote-access - container_name: headplane-remote-access - restart: unless-stopped - environment: - - GUACD_HOST=guacd - - GUACD_PORT=4822 - - HEADPLANE_API_URL=http://headplane:3000 - expose: - - "8000" - depends_on: - - guacd - - headplane -``` - -### Integration Points -- **Authentication**: Validate JWT tokens from Headplane -- **Node discovery**: Query Headplane API for available Tailscale nodes -- **Audit integration**: Send session logs to Headplane audit system -- **Role sync**: Real-time role updates from OIDC changes - -## πŸ“Š Benefits Over WASM Approach - -| **Metric** | **38MB WASM SSH** | **Guacamole Architecture** | -|------------|-------------------|-----------------------------| -| **Bundle Size** | 38MB | <1MB SPA | -| **Security Model** | Client-side crypto | Server-side only | -| **Build Complexity** | Go toolchain + deps | Standard containers | -| **Protocol Support** | SSH only | SSH + RDP + VNC | -| **Audit Capability** | Limited | Full session recording | -| **Mobile Support** | Poor | Responsive design | -| **Enterprise Ready** | No | Yes | -| **Maintenance** | High complexity | Standard stack | - -## 🎯 Implementation Phases - -### Phase 1: Core Infrastructure -- [ ] Deploy guacd container -- [ ] Build Python ASGI WebSocket proxy -- [ ] Create basic terminal SPA interface -- [ ] Integrate with existing OIDC authentication - -### Phase 2: Role Integration -- [ ] Implement permission matrix with OIDC roles -- [ ] Add environment variable configuration -- [ ] Create role-based UI elements -- [ ] Add audit logging for connections - -### Phase 3: Advanced Features -- [ ] Session recording and playback -- [ ] File transfer capabilities -- [ ] Multi-protocol support (RDP/VNC) -- [ ] Connection sharing for collaboration - -### Phase 4: Enterprise Features -- [ ] Session timeout policies -- [ ] Connection quotas per role -- [ ] Advanced audit reporting -- [ ] Integration with external SIEM systems - -## πŸ”’ Security Considerations - -### Network Security -- **TLS encryption**: All WebSocket connections over WSS -- **Network isolation**: guacd in separate container network -- **Firewall rules**: Restrict guacd access to ASGI backend only -- **Connection limits**: Per-user and per-role connection quotas - -### Authentication & Authorization -- **JWT validation**: Verify tokens against Headplane API -- **Role-based access**: Fine-grained permissions per protocol -- **Session management**: Automatic timeout and cleanup -- **Audit trails**: Complete logging of all access attempts - -### Data Protection -- **No credential storage**: Credentials never stored in frontend -- **Session isolation**: Each connection in separate context -- **Memory protection**: Clear sensitive data from memory -- **Log sanitization**: Remove sensitive data from audit logs - -## πŸŽ‰ Conclusion - -This guacamole-based architecture provides a secure, scalable, and maintainable solution for remote access that: - -1. **Eliminates security risks** of client-side crypto and massive WASM downloads -2. **Integrates seamlessly** with existing OIDC role mapping improvements -3. **Provides enterprise-grade** audit, recording, and management capabilities -4. **Uses proven technologies** that security teams understand and trust -5. **Scales efficiently** with standard container orchestration - -The architecture leverages our OIDC improvements to provide fine-grained access control while maintaining the security posture required for VPN infrastructure management. \ No newline at end of file diff --git a/OIDC_IMPROVEMENTS_SUMMARY.md b/OIDC_IMPROVEMENTS_SUMMARY.md deleted file mode 100644 index 1cd319e..0000000 --- a/OIDC_IMPROVEMENTS_SUMMARY.md +++ /dev/null @@ -1,161 +0,0 @@ -# πŸš€ OIDC Improvements Summary - -## Overview -This document summarizes the comprehensive OIDC authentication and role mapping improvements implemented for Headplane. These changes transform OIDC configuration from complex and error-prone to intelligent and self-configuring. - -## 🎯 Key Improvements - -### 1. Convention Over Configuration Role Mapping -- **Smart pattern recognition**: Automatically maps common group names to appropriate roles -- **Case-insensitive matching**: Works with any capitalization (CEO, ceo, Ceo) -- **Role hierarchy**: Highest privilege role wins when users have multiple groups -- **Provider compatibility**: Works with Google Workspace, Azure AD, Keycloak, Okta patterns - -**Example Mappings:** -``` -ceo, founder, executives β†’ owner -admin, administrator, managers β†’ admin -devops, network, sre β†’ network_admin -helpdesk, support, it β†’ it_admin -auditor, compliance, security β†’ auditor -unknown-group β†’ member -``` - -### 2. Environment Variable Configuration -- **Override system**: Environment variables take precedence over conventions -- **Easy customization**: Perfect for enterprise deployments -- **Comma-separated format**: Simple configuration syntax -- **Fallback gracefully**: Unmapped groups fall back to intelligent pattern matching - -**Configuration Examples:** -```bash -HEADPLANE_ADMIN_GROUPS="vp,director,manager" -HEADPLANE_OWNER_GROUPS="ceo,cto,founders" -HEADPLANE_NETWORK_ADMIN_GROUPS="devops,network,sre" -HEADPLANE_IT_ADMIN_GROUPS="helpdesk,support,it" -HEADPLANE_AUDITOR_GROUPS="audit,compliance,security" -``` - -### 3. Configuration Self-Healing -- **Auto-scope detection**: Automatically adds "groups" scope for role mapping -- **Auto-redirect generation**: Creates redirect_uri from PUBLIC_URL or HEADPLANE_URL -- **Provider-specific optimizations**: Different scope recommendations per identity provider -- **Helpful guidance**: Shows environment variable setup suggestions - -**Auto-Enhancements Applied:** -- βœ… Added "groups" to scope for role mapping -- βœ… Auto-generated redirect_uri: http://localhost:3000/admin/oidc/callback -- βœ… Provider-specific insights and configuration tips -- βœ… Environment variable guidance for easier setup - -### 4. Provider-Specific Intelligence -Smart configuration adjustments based on identity provider: - -**Google Workspace:** -- Detects accounts.google.com issuer -- Provides admin console configuration guidance -- Recommends email-based group mapping - -**Azure AD:** -- Detects login.microsoftonline.com issuer -- Adds groups scope automatically -- Warns about required API permissions - -**Keycloak:** -- Detects keycloak in issuer URL -- Adds both groups and roles scopes -- Provides client mapper configuration tips - -**Okta:** -- Detects okta.com issuer -- Optimizes scope for groups claim -- Provides authorization server setup guidance - -## πŸ“ Files Modified - -### Core Implementation -- `app/server/web/roles.ts` - Enhanced role mapping with intelligent conventions -- `app/utils/oidc.ts` - Smart group extraction from multiple claim sources -- `app/routes/auth/oidc-callback.ts` - Enhanced logging and error messages -- `app/server/config/oidc-enhancer.ts` - Configuration self-healing system - -### Configuration -- `config.example.yaml` - Updated with required OIDC fields and simplified examples -- Added environment variable documentation and examples - -### Testing -- `tests/oidc-improvements.test.js` - Comprehensive test suite (32/32 tests passing) -- Coverage includes role mapping, environment variables, and configuration enhancement - -## πŸ§ͺ Test Results - -**All 32 tests passing** covering: -- βœ… Environment variable integration (4 tests) -- βœ… Convention-based role assignment (9 tests) -- βœ… Real-world provider examples (4 tests) -- βœ… Environment variable priority (2 tests) -- βœ… Configuration enhancement (13 tests) - -## 🎯 Benefits - -### For Administrators -- **Zero-config setup**: Works out-of-the-box with most identity providers -- **Easy customization**: Environment variables for complex scenarios -- **Clear documentation**: Comprehensive examples and troubleshooting - -### For Security Teams -- **Auditability**: Clear group-to-role mappings -- **Least privilege**: Default member role for unmapped groups -- **Enterprise integration**: Works with existing identity infrastructure - -### For Developers -- **Maintainable code**: Clean separation of concerns -- **Comprehensive testing**: Full test coverage for production confidence -- **Extensible design**: Easy to add new providers or role patterns - -## πŸ”„ Migration Path - -### Existing Deployments -- **Backward compatible**: No breaking changes to existing configurations -- **Automatic migration**: Old user database automatically migrated to SQL -- **Graceful fallbacks**: Errors provide helpful guidance - -### New Deployments -- **Minimal configuration**: Only issuer, client_id, and client_secret required -- **Auto-enhancement**: Scope and redirect_uri generated automatically -- **Provider guidance**: Specific setup instructions per identity provider - -## πŸš€ Future Integration Opportunities - -### Remote Access Control -The role mapping system is designed to integrate with planned remote access features: - -```python -# Example integration with guacamole-based remote access -def get_terminal_permissions(user_groups: list[str]) -> dict: - role = map_oidc_groups_to_role(user_groups) - - return { - 'owner': {'ssh': True, 'rdp': True, 'vnc': True, 'session_recording': False}, - 'admin': {'ssh': True, 'rdp': True, 'vnc': True, 'session_recording': True}, - 'network_admin': {'ssh': True, 'rdp': False, 'vnc': False, 'session_recording': True}, - 'it_admin': {'ssh': True, 'rdp': True, 'vnc': False, 'session_recording': True}, - 'auditor': {'ssh': False, 'rdp': False, 'vnc': False, 'session_recording': False}, - 'member': {'ssh': False, 'rdp': False, 'vnc': False, 'session_recording': False} - }.get(role, {'ssh': False, 'rdp': False, 'vnc': False, 'session_recording': False}) -``` - -## πŸ“Š Production Readiness - -- βœ… **Comprehensive testing**: 32/32 tests passing -- βœ… **Error handling**: Graceful degradation with helpful messages -- βœ… **Performance optimized**: Efficient pattern matching and caching -- βœ… **Security focused**: Principle of least privilege, audit-friendly -- βœ… **Documentation complete**: Examples, troubleshooting, migration guides -- βœ… **Backward compatible**: No breaking changes for existing deployments - -## πŸŽ‰ Conclusion - -These OIDC improvements transform Headplane's authentication system from a complex configuration challenge into an intelligent, self-configuring solution that works out-of-the-box with major identity providers while providing the flexibility needed for complex enterprise environments. - -The "convention over configuration" approach reduces setup time from hours to minutes while maintaining the security and auditability required for VPN infrastructure management. \ No newline at end of file diff --git a/WASM_SSH_REMOVAL.md b/WASM_SSH_REMOVAL.md deleted file mode 100644 index 1242f67..0000000 --- a/WASM_SSH_REMOVAL.md +++ /dev/null @@ -1,127 +0,0 @@ -# πŸ—‘οΈ WASM SSH Console Removal - -## Summary -The 38MB WASM SSH console has been identified as problematic for VPN infrastructure and removed from the codebase. - -## Issues with WASM SSH Approach - -### Security Concerns -- **38MB attack surface**: Massive binary running in browser with full WASM capabilities -- **Client-side crypto**: Private keys in browser memory/storage = major security risk -- **Browser isolation bypass**: WASM can potentially break sandbox protections -- **Audit nightmare**: How do you security-audit a 38MB binary blob? - -### Performance Issues -- **38MB download**: Unacceptable for web applications (should be <1MB) -- **Build complexity**: Requires Go toolchain and large dependency tree -- **Disk space issues**: Filled up `/tmp` during compilation (31GB consumed) -- **Poor mobile experience**: Heavy download and resource usage - -### Architectural Problems -- **Wrong abstraction**: Browsers aren't meant to be SSH clients -- **Maintenance nightmare**: Go dependencies, build pipeline complexity -- **Supply chain risk**: Massive dependency tree with Tailscale components - -## Actions Taken - -### Immediate Cleanup -- βœ… Removed `app/hp_ssh.wasm` (38MB file) -- βœ… Documented security and performance concerns -- βœ… Created migration path to guacamole-based solution - -### Files Still Present (for reference) -- `app/routes/ssh/console.tsx` - SSH console route (currently broken without WASM) -- `app/routes/ssh/hp_ssh.d.ts` - TypeScript definitions -- `cmd/hp_ssh/` - Go source code for WASM build -- `nix/ssh-wasm.nix` - Nix build configuration - -## Recommended Next Steps - -### Short Term -1. **Disable SSH route**: Comment out or remove SSH console route registration -2. **Update navigation**: Remove SSH terminal links from machine management UI -3. **Documentation**: Update README to remove WASM SSH references - -### Long Term - Guacamole Integration -Implement the proposed guacamole + Python ASGI architecture: -1. **Server-side security**: All SSH connections handled on trusted infrastructure -2. **Lightweight frontend**: <1MB custom SPA vs 38MB WASM -3. **Role-based access**: Integrate with existing OIDC role mapping -4. **Enterprise features**: Session recording, audit trails, multi-protocol support - -## Code Changes Needed - -### Remove SSH Navigation -Update `app/routes/machines/components/menu.tsx`: -```typescript -// Remove SSH button from machine menu -// Lines 100-125 contain SSH button implementation -``` - -### Disable SSH Route -Option 1 - Comment out route: -```typescript -// Temporarily disable SSH console route -// export { default } from './ssh/console.tsx'; -``` - -Option 2 - Add feature flag: -```typescript -// Add to config schema -ssh_console_enabled: stringToBool.default(false) - -// Conditional route loading -if (config.ssh_console_enabled) { - // Load SSH route -} -``` - -## Migration Benefits - -Moving from WASM SSH to guacamole architecture provides: -- **99% smaller payload**: <1MB vs 38MB -- **Enhanced security**: Server-side connections only -- **Better UX**: Standard web technologies, mobile-friendly -- **Enterprise ready**: Audit trails, session recording, role-based access -- **Maintainable**: Standard container stack vs Go/WASM complexity - -## Files to Update - -### Configuration -- [ ] `config.example.yaml` - Remove SSH-related config if any -- [ ] `app/server/config/schema.ts` - Add ssh_console_enabled flag - -### Routes & Navigation -- [ ] `app/routes/machines/components/menu.tsx` - Remove SSH buttons -- [ ] `app/routes/ssh/console.tsx` - Disable or remove route -- [ ] `app/routes/_layout.tsx` - Remove SSH navigation if present - -### Build System -- [ ] `Dockerfile` - Remove WASM build steps -- [ ] `mise.toml` - Remove WASM build task -- [ ] `.gitignore` - Keep `app/hp_ssh.wasm` entry for safety - -### Documentation -- [ ] `README.md` - Remove WASM SSH references -- [ ] Add guacamole architecture documentation - -## Impact Assessment - -### Users -- **Existing deployments**: SSH route will show error without WASM file -- **New deployments**: No impact if SSH route disabled -- **Migration path**: Clear documentation for guacamole transition - -### Developers -- **Build simplification**: No more Go/WASM build complexity -- **Dependency reduction**: Remove Tailscale build dependencies -- **Testing improvement**: Eliminate WASM-related test complexity - -### Security Teams -- **Risk reduction**: Eliminate 38MB client-side attack surface -- **Audit simplification**: Remove complex WASM security review requirement -- **Compliance**: Standard web technologies easier to audit and approve - -## Conclusion - -Removing the WASM SSH console eliminates significant security, performance, and maintenance issues while paving the way for a professional guacamole-based remote access solution that better serves VPN infrastructure security requirements. \ No newline at end of file diff --git a/app/components/Header.tsx b/app/components/Header.tsx index 97f108e..e166c7f 100644 --- a/app/components/Header.tsx +++ b/app/components/Header.tsx @@ -42,6 +42,8 @@ function TabLink({ name, to, icon }: TabLinkProps) { return (
cn( 'px-3 py-2 flex items-center rounded-md text-nowrap gap-x-2.5', @@ -52,8 +54,6 @@ function TabLink({ name, to, icon }: TabLinkProps) { isActive ? 'after:visible' : 'after:invisible', ) } - prefetch="intent" - to={to} > {icon} {name} @@ -64,13 +64,13 @@ function TabLink({ name, to, icon }: TabLinkProps) { function Link({ href, text }: LinkProps) { return ( {text} @@ -101,21 +101,20 @@ export default function Header(data: Props) { {data.user ? ( {data.user.picture ? ( {data.user.name} ) : ( )} { if (key === 'logout') { submit( @@ -127,11 +126,12 @@ export default function Header(data: Props) { ); } }} + disabledKeys={['profile']} >
-

{data.user.name}

+

{data.user.name || data.user.displayName}

{data.user.email}

@@ -148,39 +148,39 @@ export default function Header(data: Props) {