Tested KeyCloak validation - AUTH

Test Keycloak JWT validation against access token issued via NextAuth; ensure Spring Boot resource server correctly validates token signature, expiration, issuer, and optional audience.
This commit is contained in:
Aryan Singh committed 2026-02-21 23:29:35 -06:00
1 parent 92971a3983
commit 7306ad1b26
18 files changed
+623 -66

No files matched your search

+11 -7
View File
@@ -1,5 +1,3 @@
version: '3.8'
services:
postgres:
image: postgres:15-alpine
@@ -11,6 +9,11 @@ services:
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
POSTGRES_DB: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d postgres"]
interval: 5s
timeout: 3s
retries: 10
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init:/docker-entrypoint-initdb.d # place init.sql here to create additional databases
@@ -49,17 +52,18 @@ services:
container_name: keycloak
restart: unless-stopped
ports:
- "8180:8080" # Host port 8180 → container 8080 (Keycloak default)
- "127.0.0.1:8180:8080" # Local-only for dev; avoids external probes
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://postgres:5432/keycloak
KC_DB_USERNAME: admin
KC_DB_PASSWORD: admin
command: start-dev # Use start-dev for development mode
command: start-dev --http-enabled true
depends_on:
- postgres
postgres:
condition: service_healthy
networks:
- backend