ポリシーエンジン
統一ポリシーエンジンの設定と runtime check。
Authrim は現在、policy functionality を 2 つの surface で公開します:
- Tenant policy management:
/api/admin/tenant-policy - Policy worker runtime checks:
/policy/*,/api/rebac/*,/api/check/*
Tenant policy
Section titled “Tenant policy”GET /api/admin/tenant-policyAuthorization: Bearer <admin_token>PUT /api/admin/tenant-policyAuthorization: Bearer <admin_token>Content-Type: application/json
{ "ifMatch": "3", "policy": { "metadata": { "status": "active" }, "profile": "human" }}更新には concurrent modification と version rollback を防ぐため ifMatch が必須です。
Runtime endpoints
Section titled “Runtime endpoints”| エンドポイント | メソッド | 説明 |
|---|---|---|
/policy/evaluate | POST | policy context の評価 |
/policy/check-role | POST | role membership check |
/policy/check-access | POST | resource/action access check |
/api/rebac/check | POST | ReBAC check |
/api/rebac/batch-check | POST | batch ReBAC checks |
/api/check | POST | unified permission check |
/api/check/batch | POST | batch unified checks |
Runtime endpoint は service-to-service API で、policy worker の internal bearer token を要求します。