Engineering/AI documentation
User Management
User management supports team member visibility and administrative user operations.
Concepts: wcag
Implementation Summary
User management supports team member visibility and administrative user operations through /auth/users. User email is encrypted at rest and the API must fail closed if an encrypted email cannot be decrypted: Settings may show an unavailable/blank value, but it must never receive or render raw ENC: ciphertext.
Frontend Surface
frontend/src/components/common/UserManagement.tsxbackend/app/api/routes/auth.pybackend/app/core/field_encryption.pydocker-compose.qa.yml
State, API, And Backend Contracts
Stores
frontend/src/stores/authStore.ts
API And Backend
backend/app/api/routes/auth.py
Architecture Notes
- The feature is mounted through
frontend/src/components/common/UserManagement.tsxand the UI navigation path recorded in the inventory. /api/auth/usersserializesUser.emailonly after SQLAlchemy field decryption. Unreadable encrypted field values return an unavailable empty string and increment value-free encryption health counters; ciphertext, keys, and encrypted blobs are never returned to the browser.- The QA stack sets a stable test-only
DATA_ENCRYPTION_KEYforqa-backend, overridable withQA_DATA_ENCRYPTION_KEY, so backend recreation does not break encrypted user PII in disposable QA databases. The fallback is QA-only and must not be copied into the base compose. - The frontmatter and manifest entries are the durable contract for agents updating this page after code changes.
- When the referenced component, store, route, agent, skill, or test behavior changes, regenerate and validate the feature documentation.
Agents, Skills, LLM, MCP, And Permissions
- User creation is global-admin scoped and returns one-time recovery codes for the new account. Researchers do not call this admin-only surface in normal journeys.
Tests And Verification
tests/test_auth_security.pytests/test_auth_encrypted_pii.pytests/test_field_encryption.pytests/test_qa_stack_contract.py
Related Features
Related Concepts
Compass Evidence
- Spec/task: CF-SPEC-53 / CF-657
- Inventory source:
docs/features/inventory.json
When To Update
- Update this page whenever the listed UI components, stores, routes, model behavior, permissions, or tests change.
- Regenerate the site and machine manifests with
python scripts/feature_docs.py --seed-missing --generate-site --check.