mirror of
https://github.com/luxfi/bridge.git
synced 2026-09-24 00:26:46 +00:00
Squash of the local main lineage onto the canonical origin/main. Net tree only (62 files): stale docs pages removed, tenant config + tests updated, minor Go fixes, refreshed opnet-watcher build. No third-party white-label branding in code or history. Co-authored-by: Hanzo Dev <[email protected]>
2.5 KiB
2.5 KiB
Lux ID Integration Guide
Overview
The Lux Bridge now integrates with Lux ID, a Casdoor-based unified authentication system, providing centralized identity management across all Lux Network services.
Services Added
1. Lux ID Service (Casdoor)
- Container:
bridge-lux-id - Port: 8000
- Image:
casbin/casdoor:latest - Purpose: Centralized authentication and identity management
2. Lux ID Database
- Container:
bridge-lux-id-db - Port: 5434
- Image:
postgres:15-alpine - Purpose: Persistent storage for user identities and authentication data
Configuration
Environment Variables
Bridge Server
AUTH_PROVIDER=casdoor
CASDOOR_ENDPOINT=http://lux-id:8000
CASDOOR_CLIENT_ID=lux-bridge
CASDOOR_CLIENT_SECRET=lux-bridge-secret
CASDOOR_ORGANIZATION=lux-network
CASDOOR_APPLICATION=bridge
Bridge UI
NEXT_PUBLIC_AUTH_PROVIDER=casdoor
NEXT_PUBLIC_CASDOOR_ENDPOINT=http://localhost:8000
NEXT_PUBLIC_CASDOOR_CLIENT_ID=lux-bridge
NEXT_PUBLIC_CASDOOR_ORGANIZATION=lux-network
NEXT_PUBLIC_CASDOOR_APPLICATION=bridge
NEXT_PUBLIC_CASDOOR_REDIRECT_URI=http://localhost:3000/auth/callback
Getting Started
-
Start all services:
make up -
Access Lux ID Admin Panel:
- URL: http://localhost:8000
- Default admin: admin/123456 (change immediately in production)
-
Configure Application:
- Create organization:
lux-network - Create application:
bridge - Configure OAuth2 settings
- Create organization:
Authentication Flow
- User clicks "Login" in Bridge UI
- Redirected to Lux ID login page
- User authenticates with Lux ID credentials
- Redirected back to Bridge with auth token
- Bridge Server validates token with Lux ID
- User gains access to protected resources
Security Considerations
- Change default passwords immediately
- Use HTTPS in production
- Configure proper CORS settings
- Enable 2FA for admin accounts
- Regular security audits
Integration Points
- KMS: Secure key storage with authentication
- MPC Nodes: Identity-based access control
- Bridge API: JWT token validation
- Bridge UI: OAuth2 authentication flow
Troubleshooting
- Lux ID not starting: Check database connection
- Authentication fails: Verify client ID/secret
- Redirect issues: Check CORS and redirect URI
- Token validation: Ensure services can reach Lux ID
Future Enhancements
- LDAP/AD integration
- SSO with other Lux services
- Multi-factor authentication
- Role-based permissions
- Audit logging