-
Notifications
You must be signed in to change notification settings - Fork 722
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
docs: add more warnings about security policy defaults #4507
Conversation
bindings/rust/s2n-tls/src/config.rs
Outdated
/// | ||
/// # Warning | ||
/// | ||
/// By default, the newly created Config uses the default security policy. |
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.
/// By default, the newly created Config uses the default security policy. | |
/// By default, the newly created Config uses the default security policy. This policy changes across library versions and could break connections. |
Should this short version of the warning mention that the policy changes? Unless I already knew about the default policy/had read the other documentation, I probably wouldn't understand why this was a warning.
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.
Idk, the changing isn't the only issue. The default policy might also just not have the options they're expecting / wanting. Like, at the moment it still has 1.0 and most customers probably don't want 1.0.
I was hoping I just needed to point out policies even exist so customers might read the other documentation :/
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.
Ya, if we think the default is going to remain stuck at 1.0, then I wonder if it would be worth exploring the option of totally removing the default from the bindings?
But still think we should merge this PR, since the new warning is definitely better than what we have now 😄
bindings/rust/s2n-tls/src/config.rs
Outdated
/// # Warning | ||
/// | ||
/// The newly created Config will use the default security policy. | ||
/// Consider changing this depending on your security and availability requirements |
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.
Is "compatibility" maybe more accurate here or availability what is intended?
/// Consider changing this depending on your security and availability requirements | |
/// Consider changing this depending on your security and compatibility requirements |
Description of changes:
Users of the Rust bindings don't necessarily read our usage guide, which is primarily focused on the C library.
I added safety notes about security policies to the Rust bindings so that users are at least aware that security policies exist.
I also tried to make the existing usage guide information on default policies clearer.
Callouts
Anywhere else I should put the warning?
Testing:
I ran cargo doc. We have existing warnings, but none about my new comments.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.