Skip to content

Retrieve a security policy

Request

OPA roles:
  • security_admin
  • delegated_security_admin

Retrieves the specified security policy.

Security
bearerAuth
Path
team_namestringrequired

The name of your team

security_policy_idstringrequired

The UUID of a security policy

curl -i -X GET \
  'https://{org_name}.pam.okta.com/v1/teams/{team_name}/security_policy/{security_policy_id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

Bodyapplication/json
activebooleanrequired

If true, indicates that the security policy is active

descriptionstring

The description of the security policy

idstringread-only

The UUID of the security policy

namestringrequired

The name of the security policy

Example:"Prod Servers - EU West"
principalsobjectrequired

The user groups and workload roles associated with the security policy. The combined total of user groups and workload roles can't exceed 40 items.

relationshipsArray of objects, <= 50 items(NamedObject)

The relationships that this security policy applies to. A security policy is assignment-scoped when it specifies one or more relationships. An assignment-scoped policy must not specify principals. Its rules must specify a resource_type, which determines the valid privileges, but must not specify a resource_selector, because the specific resources are selected through assignments rather than the policy. The policy targets any principal that holds one of these relationships through an assignment.

Example:
[ { "id": "9b2e7c1a-4f3d-4a8e-bc12-7d6e5f4a3b21", "name": "Security Operator", "type": "relationship" } ]
resource_groupobject(NamedObject)

The resource group that this security policy applies to. This property is required when the user who creates the security policy is a delegated security admin.

rulesArray of objects, <= 30 items(SecurityPolicyRule)required

The rules associated with the security policy. A security policy can set multiple rules that define privileges available for matching resources.

typestring(SecurityPolicyType)

The type of the policy. Determines which resource types are allowed in security policy rules.

  • 'default': Any valid resource type is allowed except 'okta_app_based_resource'.
  • 'okta_service_account': Only 'okta_app_based_resource' resource type is allowed. Only users with the Okta super admin role can create policies of this type.
Enum:"default""okta_service_account"
Response
{ "id": "123-456-789", "name": "SecurityPolicy1", "description": "string", "active": true, "resource_group": { "id": "9c199afe-0ca5-427a-baac-c4341707d82b", "name": "OPA_Resource_Group_1", "type": "resource_group" }, "principals": { "user_groups": [ … ] }, "rules": [ { … } ] }