fips-python
A docker image with OpenSSL 3.1.2 (fips 140-3) and Python 3.11.12 compiled against it.
535
A Python 3.11 container image built from source against OpenSSL 3.1.2 with the FIPS provider enabled. Designed for workloads in regulated environments requiring FIPS 140-2/140-3 approved cryptography, including FedRAMP, CMMC, HIPAA, and PCI-DSS.
enable-fips, holding an active CMVP certificatefipsmodule.cnf generation at container startup, satisfying the OpenSSL 3.1.2
requirement that the integrity checksum not be copied between machinesdocker pull marshallhumble/fips-python:3.11.12
docker run --rm marshallhumble/fips-python:3.11.12 python3 -c "from cryptography.hazmat.primitives import hashes; print('FIPS active')"
FROM marshallhumble/fips-python:3.11.12
WORKDIR /app
COPY requirements.txt .
RUN uv pip install --system -r requirements.txt
COPY . .
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"]
The image includes a FastAPI endpoint at / that attempts an MD5 hash operation. In FIPS mode
MD5 is blocked, confirming the provider is active:
docker run --rm -p 8080:8080 marshallhumble/fips-python:3.11.12
curl http://localhost:8080/
# Returns: "FIPS mode is ACTIVE — MD5 is blocked."
On every container startup the entrypoint runs openssl fipsinstall to generate a fresh
fipsmodule.cnf on the current host, runs the FIPS self-tests, verifies the provider loads
correctly, then execs the application. If any step fails the container exits rather than
starting in a non-FIPS state.
If your cluster enforces a read-only root filesystem, mount a writable volume at /etc/ssl
so the entrypoint can write the generated config:
volumes:
- name: openssl-config
emptyDir: {}
volumeMounts:
- name: openssl-config
mountPath: /etc/ssl
| Tag | Python | OpenSSL | Architecture |
|---|---|---|---|
3.11.12 | 3.11.12 | 3.1.2 | amd64, arm64 |
Pin to a digest for production use:
docker pull marshallhumble/fips-python@sha256:<digest>
Vulnerability scanning with Trivy runs on every build. The SBOM is published in SPDX format alongside each release. See SECURITY.md for the full security policy, known findings, and how to report vulnerabilities.
github.com/marshallhumble/fipsDocker
MIT License
Content type
Image
Digest
sha256:bacc79003…
Size
92.2 MB
Last updated
2 months ago
docker pull marshallhumble/fips-python