> ## 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.

# 5.2 Credentials and Access Control

## Caller identity and roles

The API validates Microsoft Entra JWT signature, issuer, audience, expiry, and required claims, including `roles`. Protected routes return HTTP 401 for missing or invalid tokens and HTTP 403 when the caller lacks an allowed role.

| Role | Current backend access |
| - | - |
| Customer | Create claims and access owned claims and uploads. List own claims. |
| Reviewer | List claims, inspect assessments and evidence, and send review decisions. |
| Admin | List claims, perform reviewer actions, and read administrative KPIs. |

The current `POST /v1/admin/orders` role dependency accepts either Admin or Customer, despite the route name and description. Treat this as an authorization decision to review before production use. Customer-only reads of another customer's claim return HTTP 404.

The assessment workflow requires two distinct reviewer IDs when the proposed refund amount exceeds 500. It waits at most seven days for the required approvals.

## Azure identities and secrets

The repository includes Azure infrastructure and runtime configuration for managed identity and service access. Verify actual assignments in the target environment. Runtime secret categories include Stripe keys, webhook signing secret, Azure service settings, and a Functions key. Keep local values in ignored configuration files and deployed secrets in approved secret storage.

The Stripe webhook uses `Stripe-Signature` verification instead of Entra bearer authentication. Do not log tokens, SAS URLs, secret values, or raw authorization headers.

## Local-only identity

When `APP_ENV=local` and no bearer token is supplied, the API returns a synthetic identity with Customer, Reviewer, and Admin roles. Never use local mode in a deployed environment.


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