Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

root: add configuration option to enable fips #10088

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions authentik/lib/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ events:
context_processors:
geoip: "/geoip/GeoLite2-City.mmdb"
asn: "/geoip/GeoLite2-ASN.mmdb"
compliance:
fips:
enabled: false

cert_discovery_dir: /certs

Expand Down
5 changes: 1 addition & 4 deletions lifecycle/gunicorn.conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from tempfile import gettempdir
from typing import TYPE_CHECKING

from cryptography.exceptions import InternalError
from cryptography.hazmat.backends.openssl.backend import backend
from defusedxml import defuse_stdlib
from prometheus_client.values import MultiProcessValue
Expand All @@ -30,10 +29,8 @@

defuse_stdlib()

try:
if CONFIG.get_bool("compliance.fips.enabled", False):
backend._enable_fips()
except InternalError:
pass

wait_for_db()

Expand Down
6 changes: 2 additions & 4 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
import warnings

from cryptography.exceptions import InternalError
from authentik.lib.config import CONFIG
from cryptography.hazmat.backends.openssl.backend import backend
from defusedxml import defuse_stdlib
from django.utils.autoreload import DJANGO_AUTORELOAD_ENV
Expand All @@ -24,10 +24,8 @@

defuse_stdlib()

try:
if CONFIG.get_bool("compliance.fips.enabled", False):
backend._enable_fips()
except InternalError:
pass


if __name__ == "__main__":
Expand Down
Loading