-
Notifications
You must be signed in to change notification settings - Fork 0
docs(adr): record contextual-orchestrator identity and tenant boundary #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ The snapshot is reproducible from the Keyverse README at immutable revision | |
| - `pg-erd-cloud`: PR #855 at `e4b4771fa0c46cbbcbd9ca7e777e20b5179b0bcd` (open; based on `main` at `72afe6db712b145baaba084f64a1ff4fb36d9fd0`); | ||
| - `semantic-data-portal`: PR #58 at `0b40e7718e7f5c8bbd169596fed2fa371e2881f9` (open; based on `main` at `e48aa13c4af7a4875d4b53e6a60b50405c265a2f`); | ||
| - `clearfolio`: `main` at `55d7ae8647208e301f282350f076eeddaba61d11`; | ||
| - `contextual-orchestrator`: `main` at `6841b71935e0b7cb98fb52bcb4709cc5100c8d87`; | ||
| - `contextual-orchestrator`: `main` at `6841b71935e0b7cb98fb52bcb4709cc5100c8d87`; PR #109 at `2a4270a31ca9ab61c001c8b368a5252851ae093f` adds the deployment-injected Keyverse verifier seam, and stacked PR #110 at `38dc50a64dba224929d5ca58b81a525c59519f12` adds identity-carrying RBAC/ABAC; | ||
| - `newsdom-api`: protected `develop` at `3d0426bf45ad9d3395effb602811a75cbe700cf4` (PR #595 squash-merged; based on `develop` at `2f29e69c99a1201ce6b4e43370a463701efdc81c`). | ||
|
|
||
| | Application | Keyverse recognition | Current authorization | Finding and required direction | | ||
|
|
@@ -35,7 +35,7 @@ The snapshot is reproducible from the Keyverse README at immutable revision | |
| | `pg-erd-cloud` | Generic OIDC/JWKS verification is present; PR #855 adds an opt-in `OIDC_ORGANIZATION` profile that requires an exact typed Keyverse `org`, audience, and `iat` after token verification | Project-member RBAC (`viewer`/`editor`/`owner`) exists in `backend/app/permissions.py`; the profile adds deployment-level single-tenant `org` ABAC and rejects `pgerd_` API-key bypasses | Use the profile for one-tenant-per-database deployments. A shared multi-tenant database still needs a persisted tenant key, tenant-qualified membership/resource queries, composite constraints, and cross-tenant denial tests before authorization-ready status. | | ||
| | `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. | | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.mdRepository: 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 HEADRepository: ContextualWisdomLab/keyverse Length of output: 49744 권한 입력과 토큰 검증 조건을 명확히 기술하십시오.
외부 어댑터 검증 목록에도 허용 🤖 Prompt for AI Agents |
||
| | `newsdom-api` | No Keyverse OIDC integration; protected `develop` now contains PR #595, which makes the local bearer boundary fail closed by default and permits anonymous parsing only through explicit `NEWSDOM_ALLOW_ANONYMOUS=true` | No application RBAC/ABAC; it is a PDF-to-DOM sidecar | Keep it private infrastructure while it has no user authorization model. If reachable beyond a trusted internal gateway, require a Keyverse-aware gateway or verified service boundary; never enable the anonymous opt-in on an exposed deployment. The merged change also remediates the current `pypdf` Trivy findings and includes the review fixes at `3025be1` (startup credential registry, authenticated examples, healthcheck executable-bit check, and complete 401 assertions). | | ||
|
|
||
| Keyverse itself also has two boundaries that must not be confused with | ||
|
|
||
There was a problem hiding this comment.
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.mdLines 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