TorbatYar/backend/services/identity-access
Mortezakoohjani 12c8615615 Ship enterprise Accounting FE/API with CRUD parity and production wiring.
Adds accounting-service PATCH/archive, fiscal helpers, COA templates and setup status, plus SuperApp Accounting UI (DS, scoreboard, masters, vouchers, ledger, ops modules) with session refresh and HTTPS public API URLs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 15:26:43 +03:30
..
alembic Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30
app Ship enterprise Accounting FE/API with CRUD parity and production wiring. 2026-07-24 15:26:43 +03:30
scripts Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30
alembic.ini Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30
Dockerfile Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30
Dockerfile.dev Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30
pytest.ini Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30
README.md Ship enterprise Accounting FE/API with CRUD parity and production wiring. 2026-07-24 15:26:43 +03:30
requirements.txt Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30

Identity & Access Service

سرویس احراز هویت و دسترسی — SSO مرکزی با Keycloak.

Canonical contracts: docs/reference/services-contracts.md §8
Architecture: docs/architecture/identity-architecture.md
Registry: docs/module-registry.md

Responsibilities

  • User profile + identity-layer tenant membership
  • OIDC config for frontend
  • Authorization code → token (BFF)
  • Mobile OTP start/complete + session handoff redeem
  • Keycloak Admin sync

Database

identity_access_db (database-per-service; not Core)

Operational workspace roles live in Core tenant_memberships — see ADR-007.

Main APIs

Method Path Notes
GET /health Public
GET /api/v1/auth/config OIDC config
GET /api/v1/auth/login-url Login redirect helper
POST /api/v1/auth/token Code exchange
GET /api/v1/auth/me Current user
POST /api/v1/auth/mobile/start Unified mobile start
POST /api/v1/auth/mobile/complete Unified mobile complete
POST /api/v1/auth/session/redeem Handoff redeem
POST /api/v1/auth/mobile/request SSO user mobile verify request
POST /api/v1/auth/mobile/verify SSO user mobile verify
POST /api/v1/auth/register* Legacy register flows
POST /api/v1/users platform_admin
POST/GET /api/v1/tenants/{id}/members platform_admin

Full table: services-contracts §8.

Run

cd backend/services/identity-access
pip install -r requirements.txt
alembic upgrade head
uvicorn app.main:app --reload --port 8001

Test

pytest -q