Production Checklist
Securityโ
- RSA signing key loaded from a secrets manager (not generated ephemerally on startup)
-
RSA_SIGNING_KEY_JWKor keystore path configured and tested - Key rotation procedure documented and tested
- All passwords (
DB_PASSWORD, keystore password) in environment variables โ not inapplication.yml -
spring.jpa.show-sql: falsein production profile -
logging.level.com.ajfhir.auth: INFOin production (not DEBUG) - HTTPS enforced on all endpoints โ TLS terminated at load balancer or nginx
Databaseโ
- PostgreSQL 15+ (not H2) โ set
DB_URL,DB_USER,DB_PASSWORD -
spring.jpa.hibernate.ddl-auto: validate(notupdate) in production - Flyway migrations enabled for schema management
- Database connection pool sized for expected load
- Backups configured for the
registered_appandlaunch_contexttables
Registered clientsโ
- All test clients removed or disabled (
active = false) - Production
redirect_urivalues use HTTPS -
allowed_scopesrestricted to minimum needed per app
SMART configurationโ
-
smart.server.issuer-urlmatches the public-facing HTTPS URL -
smart.server.fhir-base-urlmatches the HAPI FHIR server's public URL -
/.well-known/smart-configurationreachable from the FHIR base URL (proxy configured) -
access-token-ttl-secondsreviewed (default 3600 s โ 1 hour) -
refresh-token-ttl-secondsreviewed (default 86400 s โ 24 hours)
Multi-instanceโ
- Persistent RSA key shared across all instances
- Session store (Redis or database) if running more than one instance
- Health check endpoint (
/actuator/health) responding on all instances
Monitoringโ
- Actuator health check exposed to load balancer
- Log aggregation configured (stdout โ Fluentd/CloudWatch/Splunk)
- Alert on failed token exchanges (repeated
invalid_grantsuggests key mismatch or clock skew) - Alert on
LaunchTokenExceptionspikes (may indicate replay attacks)
HIPAAโ
- PHI in launch tokens (patient FHIR ID) encrypted at rest in PostgreSQL
- Launch token purge scheduled and verified (
@Scheduledpurge every 10 minutes) - Access logs retained per organisational retention policy
- BAA signed with cloud provider if tokens transit their infrastructure
โ Deployment