Skip to main content

Create Policy Set

This API creates a new policy set, which combines user sets, resource sets, and process sets into security rules and key rules that an agent enforces.

Endpoint Details

URL/v1/config-agent/policy-sets
MethodPOST
AuthorizationBearer Token

Request Headers

HeaderTypeDescription
Content-TypeStringMust be application/json

Request Body

Use the following format to make a request:

JSON Request
{
"name": "dummy",
"description": "",
"type": "PolicyTypeDirectory",
"security_rules": [
{
"user_set_id": "95811aa4-5b61-46d3-a007-14d0a576ef60",
"resource_set_id": "ed7cced2-2c8a-4779-b8e6-408f4a28a4b3",
"process_set_id": "b09b02eb-a75c-47d3-b32f-08de49350c34",
"action_policy": {
"read": true,
"write": true,
"all_operations": true,
"key_operation": true
},
"effect_policy": {
"effect_permission": true,
"apply_key": true
},
"allow_browsing": true
}
],
"key_rules": [
{
"resource_set_id": "ed7cced2-2c8a-4779-b8e6-408f4a28a4b3",
"key_id": "8471d88d-feda-4d0f-bb39-7f45d8976b94"
}
]
}

Parameters

ParameterTypeDescription
nameStringName of the policy set
descriptionStringOptional description of the policy set
typeStringType of the policy set
security_rulesArrayList of security rules applied by the policy
user_set_idUUIDIdentifier of the user set the rule applies to
resource_set_idUUIDIdentifier of the resource set the rule applies to
process_set_idUUIDIdentifier of the process set the rule applies to
action_policyObjectActions the rule permits
readBooleanWhether read is permitted
writeBooleanWhether write is permitted
all_operationsBooleanWhether all operations are permitted
key_operationBooleanWhether key operations are permitted
effect_policyObjectEffects applied when the rule matches
effect_permissionBooleanWhether the permission effect is applied
apply_keyBooleanWhether the key is applied
allow_browsingBooleanWhether browsing is allowed
key_rulesArrayList of key rules that bind resource sets to encryption keys
resource_set_idUUIDIdentifier of the resource set the key applies to
key_idUUIDIdentifier of the encryption key applied to the resource set

Response

Here is an example response after the request has been successfully processed:

Response
{
"data": {
"id": "553e852b-77d8-461c-9727-2ab342341dc7",
"tenant_id": "5ebde17c-01a1-4394-977b-9e611250cf5d",
"name": "Dummy",
"type": "PolicyTypeDirectory",
"security_rules": [
{
"user_set_id": "95811aa4-5b61-46d3-a007-14d0a576ef60",
"resource_set_id": "ed7cced2-2c8a-4779-b8e6-408f4a28a4b3",
"process_set_id": "b09b02eb-a75c-47d3-b32f-08de49350c34",
"action_policy": {
"read": true,
"write": true,
"all_operations": true,
"key_operation": true
},
"effect_policy": {
"effect_permission": true,
"apply_key": true
},
"allow_browsing": true
}
],
"key_rules": [
{
"resource_set_id": "ed7cced2-2c8a-4779-b8e6-408f4a28a4b3",
"key_id": "8471d88d-feda-4d0f-bb39-7f45d8976b94"
}
],
"created_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"created_by_name": "Admin Aplikasi",
"updated_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"updated_by_name": "Admin Aplikasi",
"created_at": 1785296752,
"updated_at": 1785296752
}
}

Field Descriptions

FieldTypeDescription
idUUIDUnique identifier of the policy set
tenant_idUUIDIdentifier of the tenant that owns the policy set
nameStringName of the policy set
descriptionStringDescription of the policy set
typeStringType of the policy set
security_rulesArrayList of security rules applied by the policy
user_set_idUUIDIdentifier of the user set the rule applies to
resource_set_idUUIDIdentifier of the resource set the rule applies to
process_set_idUUIDIdentifier of the process set the rule applies to
action_policyObjectActions the rule permits
readBooleanWhether read is permitted
writeBooleanWhether write is permitted
all_operationsBooleanWhether all operations are permitted
key_operationBooleanWhether key operations are permitted
effect_policyObjectEffects applied when the rule matches
effect_permissionBooleanWhether the permission effect is applied
apply_keyBooleanWhether the key is applied
allow_browsingBooleanWhether browsing is allowed
key_rulesArrayList of key rules that bind resource sets to encryption keys
resource_set_idUUIDIdentifier of the resource set the key applies to
key_idUUIDIdentifier of the encryption key applied to the resource set
created_byUUIDIdentifier of the user who created the policy
created_by_nameStringDisplay name of the user who created the policy
updated_byUUIDIdentifier of the user who last updated the policy
updated_by_nameStringDisplay name of the user who last updated the policy
created_atIntegerCreation timestamp in Unix format
updated_atIntegerLast update timestamp in Unix format

info
  • A valid Bearer Token is required to access this endpoint.
  • Supported type values are:
    • PolicyTypeDirectory — applies the policy to files and directories on local storage.
    • PolicyTypeObjectStorage — applies the policy to objects in object storage.
  • Each entry in security_rules references a resource set and, optionally, a user set and process set. When user_set_id or process_set_id is omitted, the rule is not restricted by user or process.
  • In action_policy and effect_policy, only actions set to true are granted. Actions set to false are typically omitted from the response.
  • Each entry in key_rules binds a resource set to the encryption key applied to it.
  • Unix timestamp fields can be converted to a human-readable date and time format as needed.