2.1 KiB
2.1 KiB
AP4 proxy session에서 trusted identity JSON까지
Alternative text
브라우저, Nginx, oauth2-proxy, Spring upstream 사이에서 AP4_SESSION 검증, identity header 덮어쓰기, internal token 검증과 JSON 응답이 이어지는 순서도.
Long description
브라우저가 AP4_SESSION cookie로 Nginx의 /api/edge를 호출한다. Nginx는 oauth2-proxy의 internal auth endpoint에 subrequest를 보내고 인증된 user와 email 결과를 받는다. 이어서 client가 보낸 동명 header를 사용하지 않고 oauth2-proxy 결과와 Nginx 환경의 internal token으로 /edge/me 요청을 새로 조립한다. Spring controller가 user header와 internal token을 함께 확인해 identity JSON을 만들고 Nginx가 브라우저에 전달한다.
Elements and evidence
- 브라우저 (participant): AP4_SESSION cookie와 함께 edge endpoint를 호출하는 외부 client. Evidence: L1032–L1047.
- Nginx edge (participant): Internal auth subrequest를 만들고 인증 결과를 allowlisted upstream header와 internal token으로 재조립한다. Evidence: L954–L979, L1049–L1068.
- oauth2-proxy (participant): AP4_SESSION을 검증하고 인증된 user, email과 필요 시 갱신 cookie를 auth response로 돌려준다. Evidence: L1020–L1030, L1049–L1055.
- Spring upstream (participant): Identity header와 internal token을 함께 검증해 allowlisted identity JSON을 반환한다. Evidence: L1057–L1066, L1070–L1103.
Relationships
- 브라우저 → Nginx edge: GET /api/edge + AP4_SESSION. Evidence: L1032–L1039.
- Nginx edge → oauth2-proxy: internal /oauth2/auth subrequest. Evidence: L962–L979, L1049–L1049.
- oauth2-proxy → Nginx edge: authenticated user + email. Evidence: L1049–L1055.
- Nginx edge → Spring upstream: GET /edge/me · trusted headers + internal token. Evidence: L1057–L1066.
- Spring upstream → Nginx edge: trusted identity JSON. Evidence: L1070–L1088.
- Nginx edge → 브라우저: pattern + user + email + identityHeader. Evidence: L1079–L1088, L1105–L1116.