forked from baron/baron-sso
chore: snapshot local state before dev merge
This commit is contained in:
@@ -8,7 +8,7 @@ Baron SSO에서 인증 identity, 권한 관계, OAuth/OIDC 위임의 원장은 O
|
||||
- Authorization/ReBAC 원장: Ory Keto
|
||||
- OAuth/OIDC client, consent, token state 원장: Ory Hydra
|
||||
|
||||
Backend DB는 Ory를 대체하는 원장이 아닙니다. Ory에 저장되지 않거나 Ory API로 필요한 방식의 조회가 불가능한 업무 데이터의 read model, 감사 로그, 처리 상태, 성능 cache 보조 데이터만 허용합니다.
|
||||
Backend DB는 Ory를 대체하는 원장이 아닙니다. 특히 사용자 identity/profile/소속/조직도 노출 데이터에 대해 Backend DB `users`를 원장 또는 read model로 사용하지 않습니다. Ory와 무관한 감사 로그, 처리 상태, 외부 연동 작업 상태처럼 별도 원장이 명시된 데이터만 Backend DB에 둘 수 있습니다.
|
||||
|
||||
Ory에서 Redis cache로 웜업된 데이터는 Backend가 cursor 기반 API로 front 또는 외부 API에 제공합니다. frontend는 Redis나 Backend DB 복제본을 원장처럼 직접 소비하지 않습니다.
|
||||
|
||||
@@ -19,7 +19,7 @@ Ory에서 Redis cache로 웜업된 데이터는 Backend가 cursor 기반 API로
|
||||
- Ory Kratos identity가 subject, credentials, recovery/verification address, 인증 식별자의 원장입니다.
|
||||
- Kratos identity 변경은 Backend의 중앙 `IdentityWriteService`를 경유해야 합니다.
|
||||
- Redis identity mirror는 빠른 단건/목록/검색 조회를 위한 cache입니다. stale 가능성을 API 응답에 드러내야 합니다.
|
||||
- Backend DB `users`는 Ory에 저장되지 않거나 Ory에서 필요한 방식으로 조회할 수 없는 Baron 운영 데이터의 read model입니다.
|
||||
- Backend DB `users`는 사용자 identity/profile/소속 조회 read model이 아닙니다. 남은 의존은 제거 대상이며, 조회 API는 Kratos identity mirror 또는 Kratos Admin API fallback을 기준으로 해야 합니다.
|
||||
|
||||
### 2.2 Permissions & Relationships
|
||||
|
||||
@@ -41,14 +41,14 @@ Ory에서 Redis cache로 웜업된 데이터는 Backend가 cursor 기반 API로
|
||||
2. Backend가 중앙 service를 통해 Ory API를 동기 호출합니다.
|
||||
3. Ory write 성공 후 Ory ID로 재조회합니다.
|
||||
4. Redis mirror를 갱신하거나 갱신 실패 시 `stale`/`failed` 상태를 기록합니다.
|
||||
5. Ory에 저장되지 않거나 조회 불가능한 read model만 Backend DB에 갱신합니다.
|
||||
5. 사용자 identity/profile/소속 데이터는 Backend DB `users`에 read model로 갱신하지 않습니다. Ory와 별도 원장이 명시된 처리 상태만 Backend DB에 기록합니다.
|
||||
|
||||
### 3.2 Read Path
|
||||
|
||||
- Self context: Ory session/token 또는 Ory API를 기준으로 검증합니다.
|
||||
- Admin/list context: Backend가 Redis mirror와 허용된 read model을 조합해 cursor 기반 API로 제공합니다.
|
||||
- Admin/list context: Backend가 Redis identity mirror 또는 Ory Admin API fallback을 기준으로 cursor 기반 API를 제공합니다.
|
||||
- API response는 `identityTotal`, read model count, mirror status를 구분해야 합니다.
|
||||
|
||||
### 3.3 Conflict Resolution
|
||||
|
||||
불일치가 발견되면 Ory Stack의 데이터를 기준으로 Redis mirror와 Backend read model을 보정합니다. Backend read model이나 token claim assembly 결과를 Ory보다 우선하는 근거로 사용하지 않습니다.
|
||||
불일치가 발견되면 Ory Stack의 데이터를 기준으로 Redis mirror를 보정합니다. Backend DB `users`나 token claim assembly 결과를 Ory보다 우선하는 근거로 사용하지 않습니다.
|
||||
|
||||
Reference in New Issue
Block a user