Repository navigation
Harden the shipped configuration - #101
Merged
Merged
Conversation
- Set DimsMaxSourceBytes, DimsAllowPrivateAddresses off, and DimsStatusVerbose off in the example and the container. - Add DIMS_MAX_SOURCE_BYTES, DIMS_ALLOWLIST_SIGNED, DIMS_ALLOW_PRIVATE_ADDRESSES, and DIMS_STATUS_VERBOSE to the container, with secure defaults. - Document DimsAllowlistSigned enforce and /dims5/ as the hardening to enable.
- Point the /dims4/ hardening note at DimsAllowlistSigned and /dims5/. - Describe the _keys parameters as coverage to add, not a gap to exploit.
- Set DimsEncryptionAlgorithm to AES/GCM/NoPadding in the example and the container. - Add DIMS_ENCRYPTION_ALGORITHM to the container, defaulting to AES-GCM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The example configuration and the container image start from secure settings. Both set a source-size cap, refuse private and loopback addresses, decrypt the
eurlparameter with authenticated AES-GCM, and drop the component versions from the status page. The container exposes each as an environment variable, so an operator can relax any of them. The endpoint docs point at the host allowlist and/dims5/as the hardening to enable.Why
A fresh deployment should start safe and opt into anything looser.
Verify
Run
make -C test test;ExampleConfigIsValidand the contract cases pass. Build the image and start it: it comes up healthy and/dims-status/answersALIVEwithout the version lines.Breaking
The container image defaults change. A fetch to a private or loopback address is refused unless
DIMS_ALLOW_PRIVATE_ADDRESSES=on. A source over 32 MB is refused unlessDIMS_MAX_SOURCE_BYTESis raised or set to 0. The status page hides versions unlessDIMS_STATUS_VERBOSE=on. Theeurlparameter decrypts with AES-GCM unlessDIMS_ENCRYPTION_ALGORITHMis set back toAES/ECB/PKCS5Padding. The module's built-in defaults are unchanged, so an existing httpd.conf that does not use the shipped file is not affected.