feat(ap1): enforce resource audience

This commit is contained in:
donghyeon-ka
2026-07-25 14:11:28 +09:00
parent c048d00994
commit 84a9ca3e8f
10 changed files with 194 additions and 2 deletions
+6
View File
@@ -110,3 +110,9 @@ token은 명시적인 in-memory store에만 보관되므로 새로고침하면
브라우저에서 `http://localhost:8088`을 열어 로그인한 뒤 보호 API를 호출할 수
있습니다. SPA는 `http://localhost:8081/api/me`를 직접 호출하며 Spring
Resource Server가 Bearer JWT를 검증합니다.
Keycloak의 dedicated audience mapper는 `spa-public` access token에
`keycloak-pattern-api`를 추가합니다. Spring은 signature, `iss`, `exp`
아니라 이 `aud`도 검사합니다. `verify-pattern1.sh`는 같은 정상 토큰을
`deliberately-wrong-audience`를 기대하는 진단 인스턴스에도 제출해 `401`
확인합니다.