Skip to content
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

update for cedar#393 #148

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cedar
Submodule cedar updated 37 files
+34 −0 .github/workflows/build_and_test.yml
+2 −1 .github/workflows/build_downstream_deps.yml
+1 −25 .github/workflows/ci.yml
+1 −24 .github/workflows/nightly_build.yml
+1 −0 README.md
+2 −2 cedar-integration-tests/sample-data/sandbox_a/schema.cedarschema.json
+4 −1 cedar-integration-tests/tests/multi/5.json
+13 −0 cedar-policy-cli/CHANGELOG.md
+41 −10 cedar-policy-cli/src/lib.rs
+31 −3 cedar-policy-cli/tests/integration_tests/main.rs
+4 −0 cedar-policy-cli/tests/sample.rs
+18 −10 cedar-policy-core/src/ast/expr.rs
+54 −9 cedar-policy-core/src/ast/request.rs
+94 −1 cedar-policy-core/src/ast/restricted_expr.rs
+38 −11 cedar-policy-core/src/authorizer.rs
+5 −2 cedar-policy-core/src/entities/conformance.rs
+130 −19 cedar-policy-core/src/est.rs
+5 −1 cedar-policy-core/src/est/expr.rs
+90 −8 cedar-policy-core/src/evaluator.rs
+109 −51 cedar-policy-core/src/extensions/ipaddr.rs
+3 −0 cedar-policy-validator/Cargo.toml
+806 −0 cedar-policy-validator/src/coreschema.rs
+68 −38 cedar-policy-validator/src/expr_iterator.rs
+7 −8 cedar-policy-validator/src/lib.rs
+11 −173 cedar-policy-validator/src/schema.rs
+25 −10 cedar-policy-validator/src/schema/action.rs
+30 −19 cedar-policy-validator/src/str_checks.rs
+162 −25 cedar-policy-validator/src/types.rs
+2 −2 cedar-policy-validator/src/validation_result.rs
+24 −1 cedar-policy/CHANGELOG.md
+2 −2 cedar-policy/README.md
+14 −10 cedar-policy/benches/cedar_benchmarks.rs
+98 −70 cedar-policy/src/api.rs
+8 −7 cedar-policy/src/frontend/is_authorized.rs
+25 −1 cedar-policy/src/integration_testing.rs
+27 −8 cedar-policy/tests/public_interface.rs
+13 −0 deny.toml
6 changes: 5 additions & 1 deletion cedar-drt/fuzz/fuzz_targets/rbac-authorizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use cedar_drt::*;
use cedar_drt_inner::*;
use cedar_policy_core::ast;
use cedar_policy_core::entities::Entities;
use cedar_policy_core::extensions::Extensions;
use cedar_policy_core::parser;
use libfuzzer_sys::arbitrary::{self, Arbitrary};
use serde::Serialize;
Expand Down Expand Up @@ -103,7 +104,10 @@ fuzz_target!(|input: AuthorizerInputAbstractEvaluator| {
"Action::\"read\"".parse().expect("should be valid"),
"Resource::\"foo\"".parse().expect("should be valid"),
ast::Context::empty(),
);
None::<&ast::RequestSchemaAllPass>,
Extensions::none(),
)
.expect("we aren't doing request validation here, so new() can't fail");

// Check agreement with definitional engine. Note that run_auth_test returns
// the result of the call to is_authorized.
Expand Down
7 changes: 5 additions & 2 deletions cedar-policy-generators/src/request.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::collections::HashMap;
use crate::hierarchy::Hierarchy;
use arbitrary::Unstructured;
use cedar_policy_core::ast;
use cedar_policy_core::ast::{EntityUID, RestrictedExpr};
use cedar_policy_core::ast::{self, EntityUID, RestrictedExpr};
use cedar_policy_core::extensions::Extensions;
use smol_str::SmolStr;

/// Data structure representing an authorization request
Expand Down Expand Up @@ -43,7 +43,10 @@ impl From<Request> for ast::Request {
req.resource,
ast::Context::from_pairs(req.context)
.expect("can't have duplicate keys because `req.context` was already a HashMap"),
None::<&ast::RequestSchemaAllPass>,
Extensions::none(),
)
.expect("we aren't doing request validation here, so new() can't fail")
}
}

Expand Down