@@ -26,8 +26,6 @@ use cedar_policy_core::authorizer::Authorizer;
26
26
use cedar_policy_core:: entities:: { Entities , TCComputation } ;
27
27
use cedar_policy_core:: evaluator:: Evaluator ;
28
28
use cedar_policy_core:: extensions:: Extensions ;
29
- #[ cfg( feature = "entity-manifest" ) ]
30
- use cedar_policy_validator:: entity_manifest:: compute_entity_manifest;
31
29
use cedar_policy_validator:: { ValidationMode , Validator , ValidatorSchema } ;
32
30
use core:: panic;
33
31
use miette:: miette;
@@ -160,7 +158,6 @@ pub trait CedarTestImplementation {
160
158
/// Custom authorizer entry point.
161
159
fn is_authorized (
162
160
& self ,
163
- schema : & ValidatorSchema ,
164
161
request : & Request ,
165
162
policies : & PolicySet ,
166
163
entities : & Entities ,
@@ -285,7 +282,6 @@ where
285
282
impl CedarTestImplementation for RustEngine {
286
283
fn is_authorized (
287
284
& self ,
288
- schema : & ValidatorSchema ,
289
285
request : & Request ,
290
286
policies : & PolicySet ,
291
287
entities : & Entities ,
@@ -317,40 +313,6 @@ impl CedarTestImplementation for RustEngine {
317
313
response,
318
314
timing_info : HashMap :: from ( [ ( "authorize" . into ( ) , Micros ( duration. as_micros ( ) ) ) ] ) ,
319
315
} ;
320
-
321
- // now check that we get the same response with entity manifest, as long as the schema is valid
322
- #[ cfg( feature = "entity-manifest" ) ]
323
- {
324
- let validator = Validator :: new ( schema. clone ( ) ) ;
325
- let validation_result = validator. validate ( policies, ValidationMode :: Strict ) ;
326
- if validation_result. validation_passed ( ) {
327
- let entity_manifest = match compute_entity_manifest ( schema, policies) {
328
- Ok ( entity_manifest) => entity_manifest,
329
- Err ( err) => {
330
- return TestResult :: Failure ( format ! (
331
- "Failed to compute entity manifest. Error: {}" ,
332
- err
333
- ) ) ;
334
- }
335
- } ;
336
- let entity_slice = match entity_manifest. slice_entities ( entities, request) {
337
- Ok ( slice) => slice,
338
- Err ( err) => {
339
- return TestResult :: Failure ( format ! (
340
- "Failed to slice entities. Error: {}" ,
341
- err
342
- ) ) ;
343
- }
344
- } ;
345
-
346
- let slice_response =
347
- authorizer. is_authorized ( request. clone ( ) , policies, & entity_slice) ;
348
- if response. response . decision ( ) != slice_response. decision {
349
- return TestResult :: Failure ( format ! ( "Response decision differed with and without entity slicing. \n Without: {:?}\n With: {:?}\n " , response. response. decision( ) , slice_response. decision) ) ;
350
- }
351
- }
352
- }
353
-
354
316
TestResult :: Success ( response)
355
317
}
356
318
0 commit comments