Metadata-Version: 2.4
Name: umacs
Version: 0.7.2
Summary: UMACS is a unified management and access control service.
Requires-Python: >=3.13
Description-Content-Type: text/markdown
Requires-Dist: pydantic>=2.11.7
Requires-Dist: httpx>=0.28.1

# UMACS User Management and Access Control Service

[![codecov](https://codecov.io/github/csed-ucm/umacs/graph/badge.svg?token=NDVM21XN8W)](https://codecov.io/github/csed-ucm/umacs)

UMACS (User Management and Access Control Service) is a lightweight, reusable Authorization service.

## Features

- [x] **Policy Engine** based on Casbin for flexible access control, supporting RBAC and ABAC.
- [x] **Logging** using SQL tables for efficient storage and auditing of decision logs.
- [x] **JWKS discovery** + **caching** for validating tokens from configured IdPs and rejecting invalid tokens.
- [x] **API** for managing users, roles, and permissions.

## Core Dependencies

The service is built using:

- FastAPI + Uvicorn
- Authlib (OIDC JWT verification)
- Casbin (RBAC + optional ABAC)
- SQLModel + AsyncSQLAlchemy (Policies, Users, Resources, Decision Logs)
- Alembic (Database Migrations)

## Quickstart

### Prerequisites

#### Environment

Create a `.env` file based on `.env.example`.

### Database Setup

Run migrations to set up the SQL database:

```sh
uv run alembic upgrade head
```

### Install and run (using uv):

```sh
uv sync
uv run fastapi dev
```
