55 lines
2.1 KiB
Markdown
55 lines
2.1 KiB
Markdown
# CURRENT AI WORKING SESSION — HANDOVER
|
|
|
|
**Active AI:** Claude (Haiku 4.5)
|
|
**Last Updated:** 2026-04-26
|
|
**Current Version:** v1.15.0
|
|
**Status**: ✅ LDAP LOGIN FULLY FUNCTIONAL | ✅ ENTERPRISE MODE DETECTION RESTORED
|
|
|
|
---
|
|
|
|
## SESSION SUMMARY — Complete LDAP Authentication Fix
|
|
|
|
### Phase 1: Response Structure Bug (Commits 51716faf + 62c592d6)
|
|
**Problem**: Frontend got "Invalid Protocol Password" error on ALL login attempts
|
|
**Root Cause**: Backend response was missing `user` object that frontend expected for localStorage
|
|
|
|
**Fixed**:
|
|
- ✅ Added `user` field to `TokenResponse` schema (non-optional)
|
|
- ✅ Updated login endpoint to populate complete User object
|
|
- ✅ Password encoding for LDAP protocol compatibility
|
|
|
|
### Phase 2: Missing Enterprise Login UI (Commit dc999991)
|
|
**Problem**: LDAP/Enterprise login UI was hidden; only local user buttons shown
|
|
**Root Cause**: `isEnterprise` hardcoded to `false` due to unimplemented `getNetworkConfig()`
|
|
|
|
**Fixed**:
|
|
- ✅ Added public `/users/auth-mode` endpoint (detects LDAP status)
|
|
- ✅ Added `getAuthMode()` frontend API method
|
|
- ✅ Login page now auto-detects and switches UI based on LDAP configuration
|
|
|
|
### ✅ Current State
|
|
- **Local Mode** (LDAP disabled): Shows local user buttons
|
|
- **Enterprise Mode** (LDAP enabled): Shows "Enterprise ID" input for LDAP username
|
|
- **Password Field**: Always present for both modes
|
|
- **Response**: Complete with `user` object for localStorage
|
|
|
|
### Test Configuration
|
|
- LDAP Enabled: ✅ Yes (`config/backend.yaml`: `ldap_enabled: true`)
|
|
- LDAP Server: ldaps://192.168.84.107:6360
|
|
- Base DN: dc=ldap,dc=lan
|
|
|
|
### Backend Endpoints
|
|
- `/users/login` — POST to authenticate (returns TokenResponse with user object)
|
|
- `/users/auth-mode` — GET public endpoint to detect mode (returns `{mode, ldap_enabled}`)
|
|
- `/users/ldap-config` — GET admin-only (full LDAP configuration)
|
|
|
|
### Next Steps
|
|
1. Test LDAP login with actual LDAP user credentials
|
|
2. Verify local user login still works (if any local-only users exist)
|
|
3. Run version bump: `python3 scripts/save_version.py`
|
|
|
|
## Git Status
|
|
- Branch: dev
|
|
- Commits: 51716faf + 62c592d6 + dc999991
|
|
- All LDAP login issues resolved
|