Configure workload roles
Workload roles define who can access resources in Okta Privileged Access and act as principals in security policies. These roles group multiple unique, ephemeral workloads into a single logical identity based on shared characteristics.
Before you begin
-
You must have a security admin role.
-
A workload connection must already exist. See Configure workload connection.
-
For JWT authentication: Review Principal SSH access for automated workloads.
-
For API key authentication: An API key must have been generated for the workload connection. See Manage API keys.
Create a workload role
Complete the following steps to create a workload role.
-
On the Okta Privileged Access dashboard, go to .
-
Enter a Name and Description.
-
Complete the workload role requirements:
-
Select a workload connection
-
Optional. Click Filter with additional conditions, and then enter a Source field name, select an Operator, and enter a Value.
Note:For JWT authentication: Conditions filter on JWT claims. Okta recommends inspecting your JWT using a debug script or jwt.io.
For API key authentication: Conditions filter on API key claims. These are the key-value pairs assigned when the API key was generated. See Manage API keys for details on setting claims.
-
Optional. Click Add a condition, and then repeat the preceding steps.
-
-
Optional. Click Add a requirement, and then repeat the preceding steps.
-
Click Save Workload role.
After creating the workload role, you must integrate it into the Okta Privileged Access policy engine to grant access to resources. Once the policy is published, the automated workload can execute the authentication and access sequence.
Verify workload access
After you create a workload role and add it to a security policy, verify that the workload can access the intended resources by running the sft CLI command to list servers.
-
Run the
sft lscommand from the workload with the appropriate authentication credentials:-
For JWT authentication: Use the
sft workload authenticatecommand. See CLI command for workload authentication. -
For API key authentication: Use the
sft workload authenticatecommand with the API key. See CLI command for workload authentication.
-
-
The command lists all servers that the workload role has access to based on the security policies in effect.