GoodMemGoodMem
ReferenceSecurity

FIPS 140 Compliance

Cryptographic provider configuration and FIPS compliance posture for GoodMem deployments

FIPS 140 Compliance

This page documents GoodMem's cryptographic provider configuration and FIPS 140 compliance posture across the server, database, and CLI components.

Compliance Summary

ComponentFIPS StatusNotes
Server JCE/TLSNot currently validatedBCFIPS 2.1.2 / BCTLS-FIPS 2.1.23; certificate #4943 covers BC-FJA 2.1.1
Server RandomnessFIPS-capableBCFIPS DRBG in approved-only mode
Server Hashing/HMACFIPS-capableProvider-qualified to BCFIPS
Licensing SignaturesConditionalEd25519 is approved by FIPS 186-5, but module validation depends on the deployed BC-FJA version
Database (pgcrypto)Non-compliantPostgreSQL extensions not FIPS-validated
CLINon-compliantRequires FIPS Go build and configuration changes

Server

JCE and TLS Providers

GoodMem installs BouncyCastle FIPS providers at JVM startup:

ProviderPositionPurpose
BCFIPS#1FIPS-capable JCE provider for cryptographic primitives
BCJSSE#2FIPS-bound JSSE provider for TLS operations

The providers are installed at positions #1 and #2 respectively, ensuring they take precedence over the default JVM providers. BCJSSE is bound to BCFIPS using the fips:BCFIPS configuration, ensuring all TLS operations use the FIPS cryptographic boundary.

Inbound TLS: The REST and gRPC servers use BCJSSE with a BCFKS keystore built from PEM certificate/key files. TLS credentials are constructed via BCJSSE PKIX KeyManager/TrustManager.

Outbound TLS: The default SSLContext is configured to use BCJSSE with PKIX trust and BCFIPS DRBG. OkHttp and other HTTP clients inheriting defaults use BCJSSE automatically.

Randomness

All random number generation uses the BCFIPS DRBG (Deterministic Random Bit Generator):

  • API key generation (ApiKeyServiceImpl, SystemInitOperation)
  • Security token generation

Hashing and HMAC

Cryptographic hash functions are provider-qualified to BCFIPS:

  • SHA-256 and HMAC-SHA256 in license telemetry and validation
  • SHA3-256 for API key hashing
  • All executed inside the FIPS module boundary

Licensing Signatures

The licensing subsystem uses Ed25519 for signature generation and verification.

Ed25519 FIPS Status:

  • FIPS 186-5 (2023) added EdDSA and explicitly approves Ed25519/Ed448 as signature schemes
  • BC-FJA 2.1.1 is FIPS 140-3 validated under CMVP certificate #4943 with EdDSA in the approved algorithm table
  • GoodMem currently ships BC-FJA 2.1.2, which is not covered by certificate #4943

If your program requires a build covered by an active validation certificate, contact PAIR Systems to discuss a supported configuration. Do not represent the standard GoodMem image as a validated BC-FJA 2.1.1 deployment.

Approved-Only Mode

By default, GoodMem enables approved-only mode, which restricts cryptographic operations to FIPS-approved algorithms:

org.bouncycastle.fips.approved_only=true

For troubleshooting only, you can disable approved-only mode by setting this server environment variable and restarting the container:

JAVA_TOOL_OPTIONS=-Dorg.bouncycastle.fips.approved_only=false

The standard Docker Compose installer passes JAVA_TOOL_OPTIONS through to the server. Disabling approved-only mode is not suitable for a deployment that requires FIPS-approved operation.

TLS hardening flag

Approved-only provider mode is configured independently of --fips-mode-enabled. The flag (or GOODMEM_FIPS_MODE_ENABLED=true) disables self-signed development certificates and requires a user-supplied certificate or ACME when TLS is enabled. It does not install or enable the BCFIPS provider; that provider is initialized on every server start. See TLS Configuration.

Verifying approved-only mode

The server startup banner displays the cryptographic provider configuration:

┌─────────────────────────────────────────────────────────────┐
│ GoodMem Server                                              │
├─────────────────────────────────────────────────────────────┤
│ Crypto   │ jce=BCFIPS 2.1.2 (approved_only=true)  tls=...  │
└─────────────────────────────────────────────────────────────┘

On successful initialization, the server logs:

BCFIPS providers installed (approved_only=true): BCFIPS at position 1, BCJSSE at position 2

Database

PostgreSQL extensions used by GoodMem are not FIPS-validated:

ExtensionUsageFIPS Status
pgcryptoSHA-256 digests for content deduplication, credential hashingNon-compliant
uuid-osspUUID generation (uuid_generate_v4())Non-compliant

Affected Database Operations

  • Content digests: digest(original_content, 'sha256') in memory tables
  • Credential hashing: digest(credentials::text, 'sha256') for model connections
  • UUID defaults: Primary key defaults on most tables

Remediation Options

For deployments requiring strict FIPS boundaries:

  1. Move hashing to application code: Compute SHA-256 digests in the server (using BCFIPS) and store the result; remove database-side digest() calls
  2. Application-generated UUIDs: Replace uuid_generate_v4() defaults with UUIDs generated from the FIPS DRBG in application code
  3. Document the boundary: For less strict requirements, document that the database layer operates outside the FIPS boundary

CLI

The GoodMem CLI is not currently in a FIPS posture.

The CLI utilizes standard cryptographic libraries and currently includes dependencies that do not yet fully support FIPS-validated execution modes. Consequently, the CLI should be considered non-compliant for environments requiring strict FIPS 140 adherence.

Dependencies

Server Libraries

LibraryVersionCMVP Status
bc-fips2.1.2Not covered by certificate #4943 (which validates 2.1.1)
bctls-fips2.1.23Uses the BC-FJA provider above

Licensing

The BouncyCastle FIPS libraries are distributed under an MIT-style license that permits commercial use free of charge, provided the copyright notice is included.

Important: While the license permits code modification, FIPS certification requires using the official, unmodified JAR files exactly as distributed. Modifying the JAR breaks the digital signature and voids the FIPS validation.

Algorithm Support

When running in approved-only mode, only FIPS-approved algorithms are available:

Symmetric Encryption

  • AES (128, 192, 256-bit keys)
  • Triple DES (3-key)

Hash Functions

  • SHA-224, SHA-256, SHA-384, SHA-512
  • SHA-512/224, SHA-512/256
  • SHA3-224, SHA3-256, SHA3-384, SHA3-512

Digital Signatures

  • RSA (PKCS#1, PSS) with 2048+ bit keys
  • ECDSA (P-256, P-384, P-521)
  • EdDSA (Ed25519, Ed448), subject to the module-validation note above

Key Agreement

  • ECDH (NIST curves)
  • DH (2048+ bit)

TLS

  • TLS 1.2 and TLS 1.3 with FIPS-approved cipher suites
  • AES-GCM cipher suites
  • NIST P-256, P-384, P-521 curves

Troubleshooting

Provider Not at Expected Position

FIPS provider positions invalid: BCFIPS=3 (expected 1), BCJSSE=4 (expected 2)

Another security provider was installed before GoodMem's initialization. Check:

  • JVM java.security configuration file
  • Other libraries installing providers at startup

TLS Handshake Failures

If TLS connections fail in FIPS mode:

  1. Verify clients support FIPS-approved cipher suites
  2. Check certificates use supported key types (RSA 2048+, ECDSA P-256/P-384/P-521)
  3. Ensure private keys are in supported PEM format (PKCS#8 or traditional)

Approved Algorithm Errors

In approved-only mode, non-approved algorithms throw exceptions:

  • MD5 is not FIPS-approved (use SHA-256+)
  • RSA keys shorter than 2048 bits are not approved
  • ChaCha20-Poly1305 is not FIPS-approved

References