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

FIPS cryptography compatible deployments #688

Merged
merged 12 commits into from
Sep 3, 2022
Merged

FIPS cryptography compatible deployments #688

merged 12 commits into from
Sep 3, 2022

Conversation

shapiromatron
Copy link
Owner

@shapiromatron shapiromatron commented Aug 31, 2022

Enable options to deploy application with FIPS mode enabled on RHEL8 (tldr; no md5 or insecure cryptographic hashing for security uses)

Bonus - add environment variables for "staging" environment settings

To enable:

export HAWC_FEATURE_FLAGS='{"FIPS_MODE":true}'

You should see a FIPS monkeypatch enabled... (using print b/c logging isn't enabled yet), when starting a dev server:

~/dev/hawc  fips ► source venv/bin/activate && manage runserver
FIPS monkeypatch enabled...
Performing system checks...
System check identified no issues (0 silenced).
September 01, 2022 - 23:15:45
Django version 3.2.15, using settings 'hawc.main.settings.dev'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

@shapiromatron shapiromatron marked this pull request as ready for review September 2, 2022 03:50
@shapiromatron shapiromatron changed the title Fips FIPS cryptography compatible deployments Sep 2, 2022
Copy link
Collaborator

@rabstejnek rabstejnek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! For some reason it's being applied twice on my dev environment, but judging from the code it shouldn't cause any problems.

image

@shapiromatron
Copy link
Owner Author

Looks good! For some reason it's being applied twice on my dev environment, but judging from the code it shouldn't cause any problems.

image

Good find; that looks like can occur with django runserver. https://stackoverflow.com/questions/33814615/

I fixed with an enviro variable, which only persists for this processes runtime environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants