IAM Policy engine backed by Concord key-value store.
Policies are stored with the key pattern: "policy:{policy_id}" User-policy attachments are stored as: "user_policies:{user_id}"
Policy evaluation follows AWS-style logic:
- Collect all matching statements from the user's attached policies
- If any statement has effect :deny -> DENY
- If any statement has effect :allow -> ALLOW
- Otherwise -> DENY (default deny)
Statement format: %{effect: :allow | :deny, actions: ["s3:GetObject", "s3:"], resources: ["arn:ess:::bucket/"]}
Summary
Functions
Checks if an action matches any of the given action patterns. Supports wildcard patterns like "s3:" or "".
Attaches a policy to a user.
Returns a bucket-scoped policy statement list for the given bucket. Allows all S3 actions but only on the specified bucket and its objects.
Creates a new policy with the given name and list of statements.
Deletes a policy by its ID.
Detaches a policy from a user.
Evaluates whether a user is allowed to perform an action on a resource.
Returns a FullAccess policy statement list.
Retrieves a policy by its ID.
Gets all policies attached to a user.
Lists all policies.
Returns a ReadOnly policy statement list.
Returns a ReadWrite policy statement list.
Checks if a resource matches any of the given resource patterns. Supports glob-style patterns like "arn:ess:::bucket/" or "".
Updates a policy's fields (e.g., statements).
Types
Functions
Checks if an action matches any of the given action patterns. Supports wildcard patterns like "s3:" or "".
Attaches a policy to a user.
Returns a bucket-scoped policy statement list for the given bucket. Allows all S3 actions but only on the specified bucket and its objects.
Creates a new policy with the given name and list of statements.
Deletes a policy by its ID.
Detaches a policy from a user.
Evaluates whether a user is allowed to perform an action on a resource.
Returns :allow or :deny.
@spec full_access_statements() :: [statement()]
Returns a FullAccess policy statement list.
Retrieves a policy by its ID.
Gets all policies attached to a user.
Lists all policies.
@spec read_only_statements() :: [statement()]
Returns a ReadOnly policy statement list.
@spec read_write_statements() :: [statement()]
Returns a ReadWrite policy statement list.
Checks if a resource matches any of the given resource patterns. Supports glob-style patterns like "arn:ess:::bucket/" or "".
Updates a policy's fields (e.g., statements).