Engineering/AI documentation

User Management

User management supports team member visibility and administrative user operations.

needs-verification
UI Path
Settings > Users
Component
UserManagement
Source Refs
2
Tests
0

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.tsx
  • backend/app/api/routes/auth.py
  • backend/app/core/field_encryption.py
  • docker-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.tsx and the UI navigation path recorded in the inventory.
  • /api/auth/users serializes User.email only 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_KEY for qa-backend, overridable with QA_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.py
  • tests/test_auth_encrypted_pii.py
  • tests/test_field_encryption.py
  • tests/test_qa_stack_contract.py

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.