이슈 #449
진행중Phase 4-2 — Vega per-app origin/path isolation
100%
설명
배경¶
Phase 4-1 (#446 누적, commit:server2|ba291bb 외) 의 capability cookie + Web SDK + /__alphea/fs gateway 는 CSRF + accidental cross-app guard 까지 닫지만, same-origin scripting 한계 가 남아 있다. 코드와 docstring (internal/handler/capability_gateway.go::checkCSRFClaim, capability.go) 에 이 한계가 명시되어 있고, Phase 4 로드맵의 키 단점으로 표시되어 있다.
시나리오: window.open 으로 victim app runtime window 를 잡고 거기서 alphea.fs.* 호출하면 victim 의 cookie + Referer 가 따라가서 통과한다. 이건 sandbox 가 아니다.
진짜 cross-app isolation 은 이 이슈에서 처리.
범위¶
-
isolation 모델 결정: per-app subdomain (
app1.0xabc.alphea.local형식 — 최소한 HTTPS 도메인 구조 변경) 또는 per-app cookie/gateway path 분리 (같은 origin, cookie path/scope 강화) - runtime URL 구조 갱신 (
/d/<ns_type>/<ns_id>/<app_id>/...가 이 결정을 반영) - capability cookie scope 갱신 — per-app 으로 재발급
- Runtime HTML / Web SDK / gateway 의 origin 검증 강화 (아니면 same-origin 자체를 제거)
- Phase 4-1 docstring 의 보안 매트릭스 갱신 (
capability_gateway.go::checkCSRFClaim, 로드맵 §Phase 4) - smoke + handler test 커버리지 (공격 시나리오가 실제로 차단되는지)
디자인 reference¶
- 로드맵 §Phase 4 (Web SDK / Gateway API)
-
internal/handler/capability_gateway.go::checkCSRFClaimdocstring — 현재 보안 양의 한계 명시 -
internal/handler/capability.go의 capability cookie scope 논리
DoD¶
- isolation 모델 결정 (subdomain vs per-app cookie path) — trade-off matrix 에서 하나 선택
- runtime URL 구조 + capability cookie scope 갱신
-
cross-app
window.open시나리오가 실제로 차단됨을 wire 검증 - docstring + 로드맵 §Phase 4 갱신
- Web Console Test Client Section D 에 cross-app 시나리오 smoke 도구 추가 (선택적)
관련¶
HP Henry Park이(가) 5달 전에 변경
- 상태을(를) 신규에서 진행(으)로 변경되었습니다.
GitLab MRs (links only; review/verification detail lives in the MRs):
- Design — ADR-0009, per-app origin isolation direction: MR !3 (merged)
https://git.alphea.io/Alphea-Dev/alphea-edge-core/-/merge_requests/3 - Implementation 1/2 — origin routing + runtime-URL builder unification + shared-origin fallback (no capability change yet): MR !4 (open, in review)
https://git.alphea.io/Alphea-Dev/alphea-edge-core/-/merge_requests/4- alphea-review-bot: 1 finding (P2 — redirect scheme hardening against forged X-Forwarded-Proto) addressed; re-review pending.
- Implementation 2/2 — capability audience + gateway origin enforcement (flips ADR-0009 to Accepted): pending, after MR !4 merges.
Status → In Progress.
HP Henry Park이(가) 5달 전에 변경
MR !4 (implementation 1/2 — origin routing + runtime-URL builder unification + shared-origin fallback) merged to main. Re-review: no remaining findings.
https://git.alphea.io/Alphea-Dev/alphea-edge-core/-/merge_requests/4
Stays In Progress: implementation 2/2 (capability audience + gateway origin enforcement, flips ADR-0009 to Accepted) is still pending. Will move to Resolved when 2/2 merges.
HP Henry Park이(가) 5달 전에 변경
Implementation 2/2 — capability audience + gateway origin enforcement: MR !5 (open, in review)
https://git.alphea.io/Alphea-Dev/alphea-edge-core/-/merge_requests/5
Adds the aud_origin claim (minted by the runtime, enforced at the gateway) and flips ADR-0009 to Accepted. On merge, both halves of Phase 4-2 are in main → will move this issue to Resolved.
HP Henry Park이(가) 5달 전에 변경
- 상태을(를) 진행에서 해결(으)로 변경되었습니다.
- 진척도을(를) 0에서 100(으)로 변경되었습니다.
MR !5 (implementation 2/2 — capability audience + gateway origin enforcement) merged to main. Re-review: no remaining findings.
https://git.alphea.io/Alphea-Dev/alphea-edge-core/-/merge_requests/5
Phase 4-2 complete: per-app origin isolation landed across MR !3 (design/ADR-0009), MR !4 (origin routing) and MR !5 (capability binding). ADR-0009 is Accepted. Same-origin window.open cross-app hole is closed when per-app isolation is enabled.
Status → Resolved.