refactor: add separate policy folder #5462
Closed
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.
Release Summary:
Description of changes:
Proposal: start moving the logic for security policies out of "tls". "security policy" is an s2n-tls concept created to make configuration easier, so I'd argue it doesn't belong in "tls". Granted, other things also probably don't belong in "tls", but creating new source folders is hard, as evidenced by this diff.
I'd like to move the definitions for the components of the security policy (like cipher_preferences, signature_preferences, etc.) into the same folder. Also the actual list of security policies / component definitions (but that might break some internal processes...).
Callouts:
Some of the build/test logic I added "policy" to are probably deprecated and unnecessary. However, I argue that determination is out of scope, and "policy" should just appear everywhere our current folders do for simplicity.
Testing:
All builds should continue to work in CI.
I made this change manually, then also asked Amazon Q to exhaustively search all files and add the "policy" folder anywhere that already used the "error" and "stuffer" folders. Its results agreed with mine.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.