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

# 인증 & 권한

> JWT token lifecycle과 RBAC.

# 인증 & 권한

`POST /api/v1/auth/login`은 local user를 검증하고 access/refresh JWT를 반환합니다. 잘못된 로그인은 username 존재 여부를 노출하지 않도록 동일한 `USER_AUTH_FAILED`를 반환합니다.

Password는 bcrypt로 hash됩니다.

Token 기본값:

* Access: 60분
* Refresh: 1440분
* Refresh 시 token pair rotation
* password 변경 또는 all-session revoke 시 `token_version` 증가

Viewer는 기본 read-only이고 일부 preview POST만 허용됩니다. 사용자 관리, signing key 관리, environment promotion apply 같은 고위험 작업은 Administrator가 필요합니다.

`REQUIRE_AUTH=false` 개발 모드는 production startup에서 거부됩니다.
