cedar-policy / cedar-docs

Documentation for Cedar policy language
https://docs.cedarpolicy.com
Apache License 2.0
22 stars 19 forks source link

[Cedar Doc Issue] How do i validate #43

Closed apandays closed 1 year ago

apandays commented 1 year ago

What were you trying to do?

I am trying to validate policies against the schema

What is wrong and why? There is no mention in the user guide on how to do it. Do i need to call an API or do i need to call isAuthorized?

What do we need to do to fix this? Provide guidance on how to validate, along with what is validated

bisdavid commented 1 year ago

Cedar requires you to call the Validate API operation (see https://docs.rs/cedar-policy/latest/cedar_policy/struct.Validator.html).

Verified Permissions calls this for you automatically whenever you create or update a policy, if you have the feature enabled, which it is by default. For more information, see https://docs.aws.amazon.com/verifiedpermissions/latest/userguide/policy-validation-mode.html.