ADORSYS-GIS / ADORSYS-GIS/lightbridge-authz

OAuth client registry moves from config.yaml to a cratestack model

未關閉
#481 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Rust
星號
0
分支
1
平均合併
7 小時 7 分鐘
30 天內合併 PR
237

描述

## Directive (owner, 2026-08-25, verbatim)

> Clients are controlled by config file as of now. That too shall be expanded to Cratestack's model and controlled. Only difference, models enabled via config.yaml can only be disabled from the UI, not deactivated.

## Shape

`oauth2.clients` (config-file registry consumed by the OpStore client lookup) becomes a cratestack model (`OauthClient` or similar) in `authz.cstack`, DB-backed and UI-manageable, with config.yaml-declared clients seeded/merged at startup.

## Open questions for the owner (flagged, not guessed — directive arrived mid-sleep)

1. **Disabled vs deactivated**: what is the intended semantic difference? Reading: config-sourced clients may be turned OFF from the UI (soft, reversible) but never removed/deactivated (hard) — i.e. config remains the source of their existence, the DB only carries an enabled bit. Confirm.
2. Does DB state override config on restart (config re-seed must not resurrect a UI-disabled client)?
3. Which `@@allow` posture? Precedent: `User` and `Session` carry NO allow clauses (fail-closed, no generic surface) — but a UI needs SOME surface, so this model needs real policies + new `Permission` variants + `rpc_authorize` entries + `schema_policy_sync_tests` regen, unlike ADR-0024's User.
4. Client secrets/keys: if confidential clients ever land, storage must follow the ADR-0024 sealing pattern, not plaintext columns.

## Interactions

- ADR-0024 (users/federated identities) establishes the fail-closed cstack-model pattern this should follow.
- The device-grant client registration for opencode (Phase-4 cutover) would land in this model instead of another config edit.
- Prod config note: today every client change is an ai-helm-values PR (5-copy problem, see prod-config-overrides memory) — this issue removes that pain, which is likely its real motivation.

## AI Usage Declaration
Filed by Claude during the overnight run to bank the directive verbatim with its ambiguities explicit; no design decisions taken. Human owner must answer the open questions before implementation.

Source of truth: owner directive quoted above; ADR-0024.

貢獻指南

開啟貢獻指南

研究方向

Start by reading ADR-0024, then inspect the oauth2.clients registry in config.yaml, the OpStore client lookup, and the authz.cstack model patterns. Resolve the owner’s open questions before implementation, then trace the policy work through Permission variants, rpc_authorize entries, and schema_policy_sync_tests. Done means the agreed model behavior and policy coverage are implemented and verified.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
rust
領域
authorization, backend, database
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
活躍
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。