GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing docs.cedarpolicy.com — Terms & concepts Cedar terms and conceptsCedar manages fine-grained permissions to support the authorization requirements for custom applications. To create Cedar policies successfully, you should understand the following concepts. Topics on this pageAuthorizationAuthorization is the process of determining if a specific user request to do something is allowed by the defined set of policies. Authorization works by evaluating each incoming request against the set of policies provided to Cedar. Authorization is preceded by authentication. Authentication is the process of verifying the principal’s identity, meaning that they are really who they claim to be. Authentication can involve user names, passwords, multi-factor authentication (MFA) devices, or other means of proving identity. Once authenticated, a user or device becomes a principal that can make a request. Cedar lets you describe permissions by creating policies as text documents that describe which principals are allowed to perform which actions, on which resources, and in a specific context. When a principal attempts to do something in an application, the application generates an authorization request. Cedar evaluates requests against the set of defined policies, producing a decision to allow or deny the request. The following are a few common strategies for implementing authorization:
PolicyA policy is a statement that declares which principals are explicitly permitted, or explicitly forbidden, to perform an action on a resource. The collection of policies together define the authorization rules for your application. A policy begins by specifying the effect, to either The scope identifies the specific principal and resource to which the policy applies, and the actions that the principal can perform on the resource. The scope is mandatory. Optionally, you can specify conditions that must be true for the policy to affect the request. These conditions take the form of In Cedar, you can create a policy in one of two ways:
Policy evaluationAn authorization request is a request by an application for an authorization decision, asking the question “Can this principal take this action on this resource in this context?”. To reach the decision, Cedar’s authorization engine evaluates a request against each policy, and combines the results. It ultimately produces an authorization response that consists of the decision ( Your application must gather all of the relevant information and provide it to Cedar’s authorization engine when making the request.
The algorithmic details for how authorization decisions are made, and how individual policies are evaluated, are discussed in the authorization section of these docs. Policy templateA policy template is a policy that has a placeholder for either the principal, the resource, or both. A policy template is useful when you have a common pattern for access that you need to apply to many resources, or many principals. You can’t use a template in an authorization decision directly. Instead, you first associate a principal and resource with the template to create a template-linked policy that is complete and usable for authorization decisions. For example, a policy template might allow commenting on any photo in an album unless that photo is tagged “Private”. Instead of having to manually duplicate such a policy statement in a policy for every user who accesses the album, you can create a policy template. A policy created from a policy template is called a template-linked policy. When you create a template-linked policy, you associate the policy template with the principal who needs access to the resource. Template-linked policies are dynamic. When you change the policy statement in a policy template, all policies created from that policy template use the new policy statement automatically in all authorization decisions from that moment on. This capability is useful when you need to apply the same permissions to many principal and resource pairs. For more information about creating and using policy templates, see Cedar policy templates. EntityA principal, an action, or a resource that is part of your application are all represented in Cedar as entities. Your actions and the shape of other entities are defined in the schema for your application. Entities are referenced by their type and identifier, together called the entity’s unique identifier (UID). For example, Entities have attributes that correspond to information that’s known, such as information that’s stored in a database. For example, an entity of type
When creating entities, you should define the attributes that are useful to your scenario. When validating Cedar policies with a schema, the For more details about entities, see Entities in Cedar. NamespacesAs software products increase in size and organizations grow, multiple services can be added to contribute to the overall implementation of an application or product portfolio. You can see this outcome happening when vendors offer several products to customers, or alternatively, in service meshes where multiple services contribute portions of an application. When this situation occurs, Cedar entity definitions can become ambiguous. For example, consider a vendor that offers both a hosted database product and a hosted furniture design service. In this environment, a Cedar action entity such as This ambiguity can become an issue in circumstances such as the following:
To resolve this ambiguity, you can add namespaces to Cedar entities, including actions. A namespace is a string prefix for a type, separated by a pair of colons ( Namespaces can also be nested to arbitrary depth. Groups and hierarchiesYou can represent a group in Cedar by adding a parent object when declaring an entity. All entities with the same parent can be considered members of that group. If you have an entity “A” that has a parent entity “B”, then you can say that A is a member of B. Because a group can include other groups as members, you can use groups to model a multi-tiered hierarchy. You’re not limited to the generic concept of a group with a single collection of members. In addition to the expected You can use the in operator in a policy condition to check whether one entity has another entity in its hierarchy. For example, the following policy snippet uses the SchemaA schema is a declaration of the structure of the entity types supported by your application, and the actions your application may provide in authorization requests. Cedar uses JSON to define a schema. You can use the schema to define the principals, resources, and actions used by your application. Each definition specifies the structure of the entity that your application recognizes. For example, a resource of type Cedar can use the schema to validate your authorization policies. Asking Cedar to validate your policies helps ensure that you don’t create policies that reference an entity or attribute one way in the policy, and then reference that entity or attribute in a different way when you make authorization requests later. Validation also ensures that you use the right data types. For more information, see Cedar policy validation against schema. For example, if the Cedar determines from the schema that the Cedar doesn’t require you to define a schema. However, if you don’t define a schema, then Cedar doesn’t have a way to ensure that the policies adhere to your intentions. If the structure or type of the entity or attribute inferred by a policy doesn’t match the structure or type of the entity or attribute inferred by the parameters of an authorization request, then Cedar can generate errors or return incorrect authorization results. Because of this possibility, we recommend that you create schemas for your applications. For details about the syntax required to define a schema, see Cedar schema format. |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |