cedar-policy 4.10.0

Cedar is a language for defining permissions as policies, which describe who should have access to what.
Documentation
type Address = {
    "street": String,
    "city": String,
    "zipcode": String
};

entity decimal = {
    "wholeValue": __cedar::Long,
    "decimalPart": __cedar::Long
};

type ContactInfo = {
    "email": String,
    "phone"?: String,
    "address": Address
};

type UserPermissions = Set<__cedar::String>;

entity User = {
    "contact": ContactInfo,
    "permissions": UserPermissions,
    "active": Bool
};

action updateContact appliesTo {
    principal: [User],
    resource: [User],
    context: {
        "reason": __cedar::String,
        "timestamp": Long,
        "shadowedScore": decimal,
        "score": __cedar::decimal
    }
};