appendix-a

Appendix A. End-to-end example with Amazon Verified Permissions

 

To run the ACME “Customer Collaboration” example introduced in Chapter 9 on Amazon Verified Permissions (AVP, at https://aws.amazon.com/verified-permissions/), follow the instructions in this appendix. They will help you create a policy store, load a Cedar schema, add policies, and call is-authorized to determine allow or deny decisions. You only need the AWS CLI (v2) and an AWS account.

AVP is a fully managed authorization service that evaluates Cedar policies in the cloud. Instead of hosting our own policy engine, we upload a schema and policies to an AVP policy store and then send authorization requests through an API. AVP verifies policies against the schema in strict mode, evaluates requests in real time, and returns a single allow or deny decision along with the policies that caused it. This simplifies experimenting with Cedar and running production workloads without needing to set up infrastructure, while still using the same policy language and models discussed throughout the book.

Note

The schema and policies used here are available as a GitHub repository at https://github.com/windley/acme-cedar-demo. The repository also includes a Jupyter Notebook for running through the examples in this appendix.

A.1 Prerequisites

A.2 Create a policy store

A.3 Upload the Cedar schema

A.4 Uploading policies to AVP

A.4.1 View policies

A.4.2 Owner can do everything policy

A.4.3 Employees can share documents that are delegatable

A.4.4 Forbid access from unmanaged devices

A.5 Defining entities

A.5.1 Employees

A.5.2 Customers

A.5.3 Teams

A.5.4 Document

A.5.5 Using the entity definitions

A.6 Evaluating authorization requests

A.6.1 Owner actions

A.6.2 Customer viewing

A.6.3 Employee sharing

A.6.4 Unmanaged devices

A.7 Wrapping up the end-to-end example