-
Notifications
You must be signed in to change notification settings - Fork 5
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
Upgraded cedar to 4.2.0 #83
base: main
Are you sure you want to change the base?
Conversation
061ae6f
to
1d705f9
Compare
Signed-off-by: Kelley Li <[email protected]>
Signed-off-by: Kelley Li <[email protected]>
Signed-off-by: Kelley Li <[email protected]>
faead02
to
445ca2a
Compare
Coverage after merging main into main
Coverage Report
|
Thanks for opening this @l-kli – I'm looking forward to being able to upgrade to Cedar 4. |
Coverage after merging main into main
Coverage Report
|
Signed-off-by: Kelley Li <[email protected]>
Coverage after merging main into main
Coverage Report
|
1 similar comment
Coverage after merging main into main
Coverage Report
|
@@ -1078,20 +1079,31 @@ mod test { | |||
policy_ids.insert(PolicyId::from_str("policy1").unwrap()); | |||
policy_ids.insert(PolicyId::from_str("policy2").unwrap()); |
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.
You don't need policy_ids
anymore
let auth_res = authorizer.is_authorized(&request, &policy_set, &Entities::empty()); | ||
let auth_err = auth_res.diagnostics().errors().next().unwrap(); | ||
|
||
let errors: Vec<AuthorizationError> = (0..num_of_error).map(|_| auth_err.clone()).collect(); |
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.
This is perfect!
targets = [] | ||
|
||
[advisories] | ||
vulnerability = "deny" |
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.
Looks like the changes to deny.toml
are still here. Ideally, I don't want any changes on this file. We still don't want deps with vulnerabilities, that are unlicensed, unmaintained, etc to be allowed in the crate.
UserName = 4, | ||
/// Email address. For example: john_doe@example.com | ||
/// Email address. For example: john\_doe@example.com |
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.
nit: Is this needed to appease clippy if you don't have backticks? Tbh, backticks were a better solution than escaping the _
.
@@ -1140,6 +1158,15 @@ mod test { | |||
assert_eq!(ocsf_log.status_code.unwrap(), "Deny".to_string()); | |||
} | |||
|
|||
#[test] | |||
fn build_ocsf_severity_multiple_errors() { |
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.
nice
@@ -2,13 +2,14 @@ use rand::Rng; | |||
|
|||
/// Alphabet as an &str | |||
pub const ALPHA: &str = "abcdefghijklmnopqrstuvwxyz"; | |||
#[allow(clippy::single_char_add_str)] |
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.
nice, right approach here
Description of changes
Issue #, if available
Checklist for requesting a review
The change in this PR is (choose one, and delete the other options):
cedar-local-agent
(e.g., changes to the signature of anexisting API).
cedar-local-agent
(e.g., addition of a new API).cedar-local-agent
.I confirm that this PR (choose one, and delete the other options):
version bumps).
Testing
Add a description on how the code changes were tested, if applicable.
Hint: run
./scripts/build_and_test.sh
script to validate your changes locally before submitting a PR.