-
Notifications
You must be signed in to change notification settings - Fork 712
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
bin: tool to print security policies #4524
Conversation
@@ -210,6 +210,7 @@ const struct s2n_record_algorithm s2n_tls13_record_alg_chacha20_poly1305 = { | |||
struct s2n_cipher_suite s2n_null_cipher_suite = { | |||
.available = 1, | |||
.name = "TLS_NULL_WITH_NULL_NULL", | |||
.iana_name = "TLS_NULL_WITH_NULL_NULL", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need both .iana_name and .name? Like, what are we printing in the script, the iana name or our name? Cause it seems like the script uses both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script only uses the iana name. "name" for cipher suites is the Openssl-style name.
Is the confusion maybe that I also called the new signatures scheme field "iana_name" instead of just "name"? Would just "name" make more sense there, since there isn't any existing name field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it would be easier to understand if we were only printing "name" or only printing "iana_name".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not everything I'm printing has an iana name. Rules and certificate types don't, and I'm not sure about kems / kem groups either.
I suppose I could change the cipher suite "name" to "openssl_name", but I'm not sure I really see the benefit.
Co-authored-by: maddeleine <59030281+maddeleine@users.noreply.github.com>
is there a specific serialization output format a calling application should expect(i.e. json/yaml)? or is that a future iteration for this tool? it would be awesome to have outputs we can reliably pass around to other tools(either to display in UIs or programmatically diff, like the overview mentioned). |
At the moment this is just text intended for humans. A more official serialization story would likely be part of the planned upcoming improvements to security policies. I suspect it wouldn't even be part of this tool, I suspect we'll eventually just delete this tool. |
Description of changes:
While working on the default security policy updates, I wrote a quick tool to generate readable policy diffs. Ideally we just delete it again once we make security policies easier to deal with 🥲 Until then, I figured I'd commit it in case anyone else needs it.
I had to add names / better names to a bunch of existing structs to get good results. I'd appreciate if someone spot-checked them.
Testing:
Here's the diffs I generated for the default policy updates: https://gist.github.com/lrstewart/ca096f37b33d06fdb6cd28a1337d4edc
Other examples:
With PQ / kems:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.