CreateListingRolePolicy
/api/v1/listings/{listing}/roles/{role}/policiesAdd a policy to a listing role, setting who may request it and what has to happen before they get it.
Example request
curl -X POST \ -H "Authorization: Bearer ${OBLIQUE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{ "group": "string", "team": "string", "justificationRequired": false, "justificationPrompt": "string", "defaultExpiry": "string" }' \ "https://us.oblique.security/api/v1/listings/{listing}/roles/{role}/policies"Set OBLIQUE_API_KEY to your API key.
curl -X POST \ -H "Authorization: Bearer ${OBLIQUE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{ "group": "string", "team": "string", "justificationRequired": false, "justificationPrompt": "string", "defaultExpiry": "string" }' \ "https://eu.oblique.security/api/v1/listings/{listing}/roles/{role}/policies"Set OBLIQUE_API_KEY to your API key.
Path parameters
parentstringrequiredFormat:
listings/{listing}/roles/{role}
Query parameters
listingRolePolicyIdstringID of the listing role policy to create. This value should be 4-63 characters. Valid characters are
/[a-z][0-9]-/.
Request body
namestringAssigned by Oblique. Name of the policy of the form
listings/{listing}/roles/{role}/policies/{listing_role_policy}createTimestring (date-time)read-onlyThe time when this policy was created.
updateTimestring (date-time)read-onlyThe time when this policy was last updated.
deleteTimestring (date-time)read-onlyListingRolePolicies can only be soft-deleted to preserve logs and history. If this field is present, the policy has been deleted and won’t be returned in lists.
justificationRequiredbooleanSet once, when the resource is created. If true, users will be required to provide a justification when requesting auto-approved access. The justification response will be stored on the resulting request.
justificationPromptstringSet once, when the resource is created. Admins can specify a custom question for the justification field to show users.
defaultExpirystring (duration)Set once, when the resource is created. If present, users can only self-serve access to a role for this duration. Otherwise, users can select how long they would like to have access to the role.
managementManagementHow this policy is managed. Inherited from the grandparent listing (via the parent role): policies under a Terraform-managed listing are themselves Terraform managed and can only be created, updated, or deleted through the Terraform provider; manage the listing to change this. Omitted from responses when the listing is manually managed (the default).
managerstringHow the resource is managed. Set automatically by the server based on the caller: Terraform clients produce TERRAFORM; for all other clients the management field is left unset on the response.
repoUristringURI of the VCS repository that holds the Terraform configuration for this resource. Populated by the Oblique Terraform provider.
repoDirstringOptionally, the subdirectory within
repo_urithat holds the Terraform configuration for this resource. Populated by the Oblique Terraform provider.
Response
200ListingRolePolicyA ListingRolePolicy defines a policy for auto-approved access to a role.
Right now it is just groups/teams that can be designated as eligible groups,
this may expand in the future. A role can have multiple ListingRolePolicies,
each ListingRolePolicy corresponds to one group/team and one expiry.
namestringAssigned by Oblique. Name of the policy of the form
listings/{listing}/roles/{role}/policies/{listing_role_policy}createTimestring (date-time)read-onlyThe time when this policy was created.
updateTimestring (date-time)read-onlyThe time when this policy was last updated.
deleteTimestring (date-time)read-onlyListingRolePolicies can only be soft-deleted to preserve logs and history. If this field is present, the policy has been deleted and won’t be returned in lists.
justificationRequiredbooleanSet once, when the resource is created. If true, users will be required to provide a justification when requesting auto-approved access. The justification response will be stored on the resulting request.
justificationPromptstringSet once, when the resource is created. Admins can specify a custom question for the justification field to show users.
defaultExpirystring (duration)Set once, when the resource is created. If present, users can only self-serve access to a role for this duration. Otherwise, users can select how long they would like to have access to the role.
managementManagementHow this policy is managed. Inherited from the grandparent listing (via the parent role): policies under a Terraform-managed listing are themselves Terraform managed and can only be created, updated, or deleted through the Terraform provider; manage the listing to change this. Omitted from responses when the listing is manually managed (the default).
managerstringHow the resource is managed. Set automatically by the server based on the caller: Terraform clients produce TERRAFORM; for all other clients the management field is left unset on the response.
repoUristringURI of the VCS repository that holds the Terraform configuration for this resource. Populated by the Oblique Terraform provider.
repoDirstringOptionally, the subdirectory within
repo_urithat holds the Terraform configuration for this resource. Populated by the Oblique Terraform provider.
Errors
| Status | Meaning |
|---|---|
400 | Malformed request |
401 | Missing or invalid API key |
403 | Not allowed for this API key |
404 | Not found |
429 | Too many requests |
500 | Internal server error |