-
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6b09adb
doc: add more warnings about security policy defaults
lrstewart 17225cc
s/Safety/Warning
lrstewart d9905db
Fix fun new clippy warning
lrstewart d2f18ab
Wording
lrstewart 6987a4c
PR comment
lrstewart d73b3c5
Merge branch 'main' into doc
lrstewart File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -36,6 +36,14 @@ impl Config { | |||||
/// Returns a Config object with pre-defined defaults. | ||||||
/// | ||||||
/// Use the [`Builder`] if custom configuration is desired. | ||||||
/// | ||||||
/// # Warning | ||||||
/// | ||||||
/// By default, the newly created Config uses 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 commentThe reason will be displayed to describe this comment to others. Learn more. Is "compatibility" maybe more accurate here or availability what is intended?
Suggested change
|
||||||
/// by using [`Builder`] and [`Builder::set_security_policy`]. | ||||||
/// See the s2n-tls usage guide: | ||||||
/// <https://aws.github.io/s2n-tls/usage-guide/ch06-security-policies.html> | ||||||
pub fn new() -> Self { | ||||||
Self::default() | ||||||
} | ||||||
|
@@ -158,6 +166,13 @@ pub struct Builder { | |||||
} | ||||||
|
||||||
impl Builder { | ||||||
/// # Warning | ||||||
/// | ||||||
/// By default, the newly created Builder uses the default security policy. | ||||||
/// Consider changing this depending on your security and availability requirements | ||||||
/// by calling [`Builder::set_security_policy`]. | ||||||
/// See the s2n-tls usage guide: | ||||||
/// <https://aws.github.io/s2n-tls/usage-guide/ch06-security-policies.html> | ||||||
pub fn new() -> Self { | ||||||
crate::init::init(); | ||||||
let config = unsafe { s2n_config_new_minimal().into_result() }.unwrap(); | ||||||
|
@@ -754,6 +769,13 @@ impl Builder { | |||||
} | ||||||
} | ||||||
|
||||||
/// # Warning | ||||||
/// | ||||||
/// The newly created Builder uses the default security policy. | ||||||
/// Consider changing this depending on your security and availability requirements | ||||||
/// by using [`Builder::new`] instead and calling [`Builder::set_security_policy`]. | ||||||
/// See the s2n-tls usage guide: | ||||||
/// <https://aws.github.io/s2n-tls/usage-guide/ch06-security-policies.html> | ||||||
impl Default for Builder { | ||||||
fn default() -> Self { | ||||||
Self::new() | ||||||
|
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
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 😄