> ## Documentation Index
> Fetch the complete documentation index at: https://docs.khanhng.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 4.2 Servers and Authentication

## Servers

Run the API locally at `http://localhost:8000` using the repository's backend instructions. The generated OpenAPI document does not declare a server URL. The repository does not establish a development or production API hostname.

## Authentication

Protected routes declare the `EntraBearer` HTTP bearer scheme. The backend validates a Microsoft Entra JWT signature, issuer, audience, expiry, and required claims, including `roles`. A missing or invalid token receives HTTP 401; a token without an allowed role receives HTTP 403.

| Caller | Current FastAPI access |
| - | - |
| Customer | Create claims; list and read owned claims; request, verify, and submit uploads. |
| Reviewer | List and read claims; read assessments and evidence; submit review decisions. |
| Admin | List and read claims; perform reviewer actions; read administrative KPIs. |
| Customer or Admin | Create a test order at `POST /v1/admin/orders` in the current code. The route name and description say Admin, but its role dependency also allows Customer. Review this authorization before relying on the route as Admin-only. |

Customer-only claim reads hide another customer's claim with HTTP 404. The local configuration permits a synthetic identity with all three roles when `APP_ENV=local` and no bearer token is supplied. This behavior is for local development.

The Stripe webhook at `POST /v1/webhooks/stripe` does not use Entra bearer authentication. It verifies the `Stripe-Signature` header against the configured signing secret. Both health routes are public.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.