-
Notifications
You must be signed in to change notification settings - Fork 990
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
sec: Adjust flag validation for TLS. #1582
Conversation
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.
also, plz expand replication_test.py
with the new flag combinations
So for some reason, I could not mark the whole code block and I could not suggest the changes in one comment. Basically, in summary, for the Validate functions you can:
|
b7523ae
to
b4929eb
Compare
I disagree about the About your first point, those are free functions :) |
I think the opposite is
p.s. Early returns are widely accepted as logic simplification and is something a lot of the committee members like p.s. 2 Clang-tidy has a nice check about this called readability-else-after-return What you are doing here, is similar to this anti-pattern only at larger scope with a boolean variable instead of early returning Feel free to ignore me, but this IMO is not more readable. Just let me know what you decide -- I will be ok with both! |
@kostasrim 1 - some combinations of flags (like 'key' flag without a 'cert' flag) result in exception instead of an early return. And 2, I agree about early return in general but I feel this is a better way to write security critical code like auth policies 😅. So I'd like to stick with this version |
This changes our authentication policy when using TLS: