Skip to main content

Security

Security modelโ€‹

The AJ Smart FHIR Platform implements defence-in-depth across every layer.

Authentication + token securityโ€‹

ControlImplementationDetail
PKCE S256requireProofKey(true)96-byte verifier, S256 challenge โ€” no opt-out
Launch tokensAtomic SQL UPDATE WHERE used=falseSingle-use, 5-minute expiry, race-condition safe
JWT signingRS256, 2048-bit RSAJWKS endpoint, automatic key rotation support
id_tokenFull Nimbus RS256 verificationRemoteJWKSet โ€” verifies signature, iss, aud, exp, nonce
Token refreshRotation enforcedreuseRefreshTokens(false)
Session fixationchangeSessionId()Spring Security default protection
CSRFCookieCsrfTokenRepositoryhttpOnly=false for JS access where required

Data protectionโ€‹

  • Bearer tokens are masked in all log output โ€” SmartLaunchContext.toString() redacts access_token
  • No PHI in log files โ€” patient IDs logged only at DEBUG level
  • Log injection prevented โ€” error parameters sanitised with replaceAll("[\r\n\t]", "_")
  • PostgreSQL credentials have no hardcoded defaults โ€” startup fails fast if not set

Network securityโ€‹

  • All production endpoints require HTTPS โ€” iss validation rejects HTTP for non-localhost origins
  • ISS userinfo@ bypass blocked โ€” URI.getUserInfo() != null check prevents authority parsing attacks
  • JWKS endpoint is public (read-only RSA public key) โ€” no authentication required

Persistent RSA key (production requirement)โ€‹

Without a keystore, a new RSA key pair is generated on every server restart. All existing tokens become invalid.

Generate a persistent keystore for production:

keytool -genkeypair -alias smart-fhir-server \
-keyalg RSA -keysize 2048 -storetype PKCS12 \
-keystore smart-fhir-server.p12 -validity 3650

Set KEYSTORE_PATH and KEYSTORE_PASSWORD environment variables.

Vulnerability disclosureโ€‹

Security vulnerabilities must be reported privately โ€” do not open a public GitHub issue.

Email: security@ajsmart.com

PGP key: Available on request

Response times:

  • Acknowledgement: within 24 hours
  • Initial assessment: within 72 hours
  • Enterprise/Government customers: security patches within 24 hours of confirmed vulnerability

Complianceโ€‹

FrameworkStatusDetail
HIPAASupportedAudit trail, access controls, minimum necessary principle
GDPRSupportedConsent lifecycle, right to withdraw, audit log
HTI-1 / TEFCACompliantSMART App Launch v2.2 as mandated
IHE ATNAIn progressFHIR AuditEvent logging โ€” v1.1.0
ISO 27001RoadmapSecurity management framework alignment

Penetration testingโ€‹

Enterprise and Government support customers can request a copy of the most recent security assessment report. Contact support@ajsmart.com.