Skip to content

docs(adr): record contextual-orchestrator identity and tenant boundary - #86

Merged
seonghobae merged 1 commit into
mainfrom
codex/adr-contextual-orchestrator-20260812
Aug 12, 2026
Merged

docs(adr): record contextual-orchestrator identity and tenant boundary#86
seonghobae merged 1 commit into
mainfrom
codex/adr-contextual-orchestrator-20260812

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • update ADR-0008 with contextual-orchestrator PR #109 and stacked PR #110 evidence
  • record the distinction between deployment-owned OIDC validation, scope RBAC, and org/workspace ABAC
  • keep the maturity label as active-PR until the downstream protected PRs merge

Evidence

  • contextual-orchestrator PR #109 head 2a4270a adds the injected verifier seam
  • contextual-orchestrator PR #110 head 38dc50a requires VerifiedIdentity, rejects boolean-only decisions, binds workflow/evaluation/batch resources to tenant context, and denies cross-tenant/ownerless reads
  • git diff --check passed

No application secrets or authentication tokens are included.

Summary by CodeRabbit

  • 문서
    • Keyverse의 신원 및 테넌트 경계 추적성 정보를 문서에 추가했습니다.
    • 인증된 사용자 정보를 기반으로 한 역할·속성 기반 접근 제어 요구사항을 명확히 했습니다.
    • 조직, 워크스페이스, 리소스 소유권 검증 기준과 외부 연동 실패 시 접근을 차단하는 정책을 문서화했습니다.
    • 관련 변경 사항과 배포 승인에 필요한 검증 증거를 감사 표에 반영했습니다.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

contextual-orchestrator의 Keyverse identity 검증, RBAC/ABAC, 테넌트 리소스 소유권 검사를 ADR-0008과 추적성 매트릭스에 기록했습니다.

Changes

Keyverse 권한 경계 문서화

Layer / File(s) Summary
권한 경계 및 검증 모델
docs/adr/0008-keyverse-rp-authorization-boundary.md
ADR-0008이 검증된 identity 기반 RBAC/ABAC, 조직·워크스페이스·리소스 소유권 검사, 외부 verifier 검증 및 fail-closed 요구사항을 기록합니다.
추적성 매트릭스 반영
docs/TRACEABILITY.md
contextual-orchestrator의 verifier 주입, VerifiedIdentity, 테넌트 범위 바인딩, 교차 테넌트 읽기 거부 및 보호 PR 상태를 추가합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 contextual-orchestrator의 신원 및 테넌트 경계 문서화를 명확하고 간결하게 요약하며, 변경 내용과 직접 관련됩니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/adr-contextual-orchestrator-20260812

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae enabled auto-merge (squash) August 12, 2026 01:40
@seonghobae
seonghobae merged commit e1342d3 into main Aug 12, 2026
30 of 31 checks passed
@seonghobae
seonghobae deleted the codex/adr-contextual-orchestrator-20260812 branch August 12, 2026 01:42

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/adr/0008-keyverse-rp-authorization-boundary.md`:
- Line 38: Update the ADR entry for contextual-orchestrator to state that the
required operation scope is checked against the verified
VerifiedIdentity.granted scopes, not treated as authorization based on
caller-provided input. Extend the external adapter verification requirements to
include an allowed algorithm, a non-empty sub claim, and iat validation,
matching the shared token contract.

In `@docs/TRACEABILITY.md`:
- Line 27: Update the contextual-orchestrator traceability row to include
reproducible acceptance evidence: list the actual test paths and protected-check
or deployment-acceptance results covering OIDC issuer/audience/JWKS, claim
mapping, RBAC/ABAC, tenant and ownership boundaries, purpose, role elevation,
and invalid-token cases. If this evidence is unavailable, change the row’s
status to explicitly indicate validation is pending rather than relying only on
PR and commit references.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 00870b17-dd85-4053-8a32-e2ccef9c0c7e

📥 Commits

Reviewing files that changed from the base of the PR and between 3f9cfdf and d8832bb.

📒 Files selected for processing (2)
  • docs/TRACEABILITY.md
  • docs/adr/0008-keyverse-rp-authorization-boundary.md

| `semantic-data-portal` | OIDC verification exists; PR #58 maps bounded Keyverse `org`/`role` aliases, validates every present tenant alias, rejects conflicting aliases and malformed tenant/role claim shapes before authorization context creation, and explicitly rejects unsupported JWT `crit` headers | RBAC and ABAC/purpose/sensitivity/evidence policy exists in `src/sdp/policy.py` | Merge PR #58 after independent review and protected checks; preserve tenant, purpose, row-filter, masking, and evidence checks. Keep the repo-wide security gate green: `cryptography` must be pinned at `50.0.0` or newer in the source and every hash-locked requirements artifact after CVE-2026-69247. |
| `clearfolio` | No production OIDC/JWT verifier; current runtime is a gateway/header tenant scaffold documented in `docs/security/2026-07-02-auth-tenant-model.md` | Permission checks and tenant ownership are implemented, with optional gateway HMAC; the caller identity is not yet a Keyverse-verified token | Keep production fail-closed. Replace public header trust with Keyverse issuer/audience/JWKS verification at the service or a cryptographically trusted gateway, then map `org`/`sub`/roles/scopes and retain same-tenant checks. |
| `contextual-orchestrator` | Bearer-token configuration distinguishes `admin` and `inference` scopes but has no OIDC/JWT Keyverse validation | Coarse token-scope RBAC exists; resource/tenant ABAC is not established | Add a user-facing Keyverse OIDC resource-server boundary or a separately authenticated service-token/mTLS boundary for internal calls. Keep admin and inference scopes separate and add tenant/resource ownership conditions before exposing multi-tenant work. |
| `contextual-orchestrator` | PR #109 recognizes the Keyverse RP boundary through a deployment-injected verifier; stacked PR #110 requires a verified identity with subject/org/workspace/scopes and rejects boolean-only decisions | Scope RBAC is enforced by the requested scope; PR #110 adds exact org/workspace metadata ABAC plus tenant ownership checks for workflow, evaluation, and batch resources. Main is still unchanged and the deployment adapter must still prove issuer/audience/signature/expiry/JWKS/rotation. | Merge #109 then #110 through normal protected review. Keep the external adapter fail-closed, do not add JWT parsing to the stdlib core, migrate or recreate ownerless legacy resources, and add deployment acceptance evidence before exposing multi-tenant work. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

set -eu
printf '%s\n' '--- candidate files ---'
git ls-files | grep -E '(^|/)(ARCHITECTURE\.md|0008-keyverse-rp-authorization-boundary\.md)$' || true
printf '%s\n' '--- ADR structure ---'
ast-grep outline docs/adr/0008-keyverse-rp-authorization-boundary.md --match 'authorization' --view expanded || true
printf '%s\n' '--- relevant ADR context ---'
sed -n '20,75p' docs/adr/0008-keyverse-rp-authorization-boundary.md
printf '%s\n' '--- architecture context ---'
rg -n -C 5 'algorithm|subject|sub|VerifiedIdentity|granted scopes|scope|authorization' ARCHITECTURE.md docs/adr/0008-keyverse-rp-authorization-boundary.md

Repository: ContextualWisdomLab/keyverse

Length of output: 30554


🏁 Script executed:

set -eu
printf '%s\n' '--- all scope-related contract text ---'
rg -n -C 4 'requested scope|granted scopes|scope RBAC|scopes|algorithm|non-empty.*subject|subject.*non-empty' \
  --glob '*.md' --glob '*.yaml' --glob '*.yml' --glob '*.json' --glob '*.py' --glob '*.ts' --glob '*.tsx' .
printf '%s\n' '--- complete decision and gates ---'
sed -n '53,146p' docs/adr/0008-keyverse-rp-authorization-boundary.md
printf '%s\n' '--- repository content and git metadata ---'
git status --short
git ls-files | wc -l
git show --stat --oneline HEAD

Repository: ContextualWisdomLab/keyverse

Length of output: 49744


권한 입력과 토큰 검증 조건을 명확히 기술하십시오.

Scope RBAC is enforced by the requested scope 문구는 호출자 입력을 권한 근거로 사용할 수 있다는 의미가 될 수 있습니다. 필수 operation scope를 검증된 VerifiedIdentity의 granted scopes와 비교한다고 명시하십시오.

외부 어댑터 검증 목록에도 허용 algorithm, 비어 있지 않은 sub, iat 검증을 추가하십시오. 이는 ADR의 공통 토큰 계약과 일치해야 합니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/adr/0008-keyverse-rp-authorization-boundary.md` at line 38, Update the
ADR entry for contextual-orchestrator to state that the required operation scope
is checked against the verified VerifiedIdentity.granted scopes, not treated as
authorization based on caller-provided input. Extend the external adapter
verification requirements to include an allowed algorithm, a non-empty sub
claim, and iat validation, matching the shared token contract.

Comment thread docs/TRACEABILITY.md
| naruon Keyverse OIDC acceptance boundary | ADR-0008; exact issuer/audience/JWKS validation and required OIDC NumericDate claims | naruon PR #1321 `6a5cf11` names the Keyverse issuer and `naruon-web` audience, requires verified `iat`, tests explicit org/workspace/role acceptance plus missing-`iat` denial, and strips orphaned HTML comment terminators; protected-branch checks/review remain required | active-PR |
| semantic-data-portal Keyverse claim boundary | ADR-0008; bounded claim mapping and fail-closed tenant/role/JWT-header validation | semantic-data-portal PR #58 `0b40e77` aliases `org`/`role`, validates every present tenant alias, rejects malformed/conflicting aliases before `ActorContext`, explicitly rejects unsupported JWT `crit` headers, and keeps the cryptography floor; protected-branch approval remains required | active-PR |
| pg-erd-cloud Keyverse organization boundary | ADR-0008; verified tenant binding before project authorization | pg-erd-cloud PR #855 `e4b4771` exact `org`/audience/`iat` checks, single-tenant profile, API-key bypass denial; shared multi-tenant persistence remains unimplemented | active-PR |
| contextual-orchestrator Keyverse identity and tenant boundary | ADR-0008; deployment-owned OIDC validation plus downstream scope RBAC and org/workspace ABAC | PR #109 `2a4270a` adds the injected verifier seam; stacked PR #110 `38dc50a` requires `VerifiedIdentity`, rejects boolean-only authorization, binds workflow/evaluation/batch resources to secret-free tenant context, and denies cross-tenant or ownerless reads; main remains unchanged until both protected PRs merge | active-PR |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

이 행에 재현 가능한 acceptance evidence를 추가하십시오.

PR #109, PR #110 및 짧은 commit ID만으로는 어떤 검증이 통과했는지 확인할 수 없습니다. ADR-0008 Lines 164-169는 각 RP에 대해 정확한 issuer/audience/JWKS 설정, claim mapping, ABAC/RBAC 테스트, 교차 테넌트 거부 테스트, production-mode 설정을 요구합니다. docs/THREAT_MODEL.md Lines 80-85도 invalid issuer/signature/expiry/audience, tenant mismatch, role elevation, ownership, purpose, cross-tenant denial 검증을 요구합니다.

PR objective에서 말한 validation passed를 근거로 사용하려면 실제 테스트 경로와 protected-check 또는 deployment acceptance 결과를 이 행에 기록하십시오. 해당 증거가 없으면 검증 대기 상태로 명시하십시오.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/TRACEABILITY.md` at line 27, Update the contextual-orchestrator
traceability row to include reproducible acceptance evidence: list the actual
test paths and protected-check or deployment-acceptance results covering OIDC
issuer/audience/JWKS, claim mapping, RBAC/ABAC, tenant and ownership boundaries,
purpose, role elevation, and invalid-token cases. If this evidence is
unavailable, change the row’s status to explicitly indicate validation is
pending rather than relying only on PR and commit references.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant