ABACPolicy¶
The ABACPolicy decides who may do what with your objects. There is exactly one per Organization
Account, with the id abac-policy--<organization account id>, written in
Open Policy Agent Rego in package abac.
You read it with GET and replace it with PUT. Only an administrator can replace it, whatever the policy itself
says, and it can't be created or deleted. A policy that doesn't compile, or isn't in package abac, is refused
with 400. The Access control guide explains how to write one.
Fields¶
Required: policy.
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | The object's id. Assigned by ObjectsGrid when the object is created. | |
policy |
string | Yes | The policy, a Rego module in package abac. allow decides an action on an object type and on each object, deny overrides allow; redact names the fields to hide from the subject and visible, when defined, the only fields to show (paths such as cost, brand.url, offers.price). The input: subject (id, objectType, tags), action (create, retrieve, list, update, patch, delete, retag), objectType (the catalog name of the type the request addresses, the same at both stages; Enum for the enumerations at /enums), object (the stored object; its own type is object.meta.objectType, null at the operation stage and on create), newObject and changedFields (for create, update and patch). Administrators are not subject to it. |
tags |
list of Tag | Tags your ABAC policy decides on. Created empty when not sent, kept by a PUT that leaves them out, cleared by null or []. |
REST API¶
Base URL https://apis.objectsgrid.com. Every request sends the X-ObjectsGrid-AccessPoint and Authorization: Bearer <access token> headers; see the REST API guide.
| Operation | Request |
|---|---|
| Retrieve | GET /abacpolicies/{id} |
| Replace | PUT /abacpolicies/{id} |
The OpenAPI contract, with every parameter and response: ABACPolicies (JSON).