Configure an Interactive Worker Application
Number of APIs: 16
This activity shows you how to create an interactive worker application, configure its connection settings, view the application role assignments, assign roles to an admin user, and initiate an authorization request.
The following operations are supported by the PingOne APIs:
- Create an application
- Read application role assignments
- Create an admin population and an admin user
- Assign roles to the admin user
- Initiate an
authorization_code
authorization and authentication flow
Best practices for application secrets
Do not store an application secret in applications that are publicly available.
For security purposes, regenerate application secrets regularly (see Update the application secret).
If you suspect an application secret has been compromised, generate a new application secret immediately.
Prerequisites
Get an access token from the worker application that you created in Getting Started with the PingOne APIs. To get a token from a different worker application in an alternate sandbox environment, run the token request endpoint using the client ID and client secret of your chosen worker app to authenticate the request. For more information, see GET a Worker Application Access Token.
Workflow order of operations
To configure an interactive worker admin application and initiate an authentication flow, the following tasks must be completed successfully:
Make a
POST
request to/environments/{{envID}}/applications
to add a new application to the specified environment.Make a
GET
request to/environments/{{envID}}/applications/{{applicationID}}/secret
to get the application's secret, which is needed to authenticate the token request.Make a
GET
request to/environments/{{envID}}/applications/{{applicationID}}/roleAssignments
to return a list of roles assigned to the application.Make a
POST
request to/environments/{{envID}}/signOnPolicies
to create a new sign-on policy.Make a
POST
request to/environments/{{envID}}/signOnPolicies/{{policyID}}/actions
to add a login action to the sign-on policy.Make a
POST
request to/environments/{{envID}}/applications/{{applicationID}}/signOnPolicyAssignments
to associate the new sign-on policy with the application.Make a
POST
request to/environments/{{envID}}/populations
to create a new admin population resource.Make a
POST
request to/environments/{{envID}}/users
to create an admin user who will be assigned to the new population resource.Make a
PUT
request to/environments/{{envID}}/users/{{userID}}/password
to set the new user's password.Make a
GET
request to/roles
to read all roles.Make a
POST
request to/environments/{{envID}}/users/{{userID}}/roleAssignments
to assign a role to the new admin user.Make a
GET
request to/{{envID}}/as/authorize
to initiate an authorization request. This request starts the sign-on flow.Make a
GET
request toGET /{{envID}}/flows/{{flowID}}
to initiate the authentication flow.To complete the authentication flow, make a
POST
request to/{{envID}}/flows/{{flowID}}
and provide the user's login credentials.Make a
GET
request to/{{envID}}/as/resume?flowId={{flowID}}
to call the resume endpoint and return the auth code.Make a
POST
request to/{{envID}}/as/token
to exchange the auth code for an access token.
-
Step 6: Assign the sign-on policy to an application POST {{apiPath}}/environments/{{envID}}/applications/{{useCaseWorkerAppID}}/signOnPolicyAssignments
-
Step 11: Create user role assignment POST {{apiPath}}/environments/{{envID}}/users/{{usecaseAdminUserID}}/roleAssignments
-
Step 7: Create a population POST {{apiPath}}/environments/{{envID}}/populations
-
Step 8: Create an admin user POST {{apiPath}}/environments/{{envID}}/users
-
Step 9: Set user password PUT {{apiPath}}/environments/{{envID}}/users/{{usecaseAdminUserID}}/password
-
Step 10: Read all roles GET {{apiPath}}/roles
-
Step 1: Create a worker application POST {{apiPath}}/environments/{{envID}}/applications
-
Step 2: Get the application secret GET {{apiPath}}/environments/{{envID}}/applications/{{useCaseWorkerAppID}}/secret
-
Step 3: Get the worker application role assignments GET {{apiPath}}/environments/{{envID}}/applications/{{useCaseWorkerAppID}}/roleAssignments
-
Step 4: Create a sign-on policy POST {{apiPath}}/environments/{{envID}}/signOnPolicies