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_codeauthorization 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
POSTrequest to/environments/{{envID}}/applicationsto add a new application to the specified environment.Make a
GETrequest to/environments/{{envID}}/applications/{{applicationID}}/secretto get the application's secret, which is needed to authenticate the token request.Make a
GETrequest to/environments/{{envID}}/applications/{{applicationID}}/roleAssignmentsto return a list of roles assigned to the application.Make a
POSTrequest to/environments/{{envID}}/signOnPoliciesto create a new sign-on policy.Make a
POSTrequest to/environments/{{envID}}/signOnPolicies/{{policyID}}/actionsto add a login action to the sign-on policy.Make a
POSTrequest to/environments/{{envID}}/applications/{{applicationID}}/signOnPolicyAssignmentsto associate the new sign-on policy with the application.Make a
POSTrequest to/environments/{{envID}}/populationsto create a new admin population resource.Make a
POSTrequest to/environments/{{envID}}/usersto create an admin user who will be assigned to the new population resource.Make a
PUTrequest to/environments/{{envID}}/users/{{userID}}/passwordto set the new user's password.Make a
GETrequest to/rolesto read all roles.Make a
POSTrequest to/environments/{{envID}}/users/{{userID}}/roleAssignmentsto assign a role to the new admin user.Make a
GETrequest to/{{envID}}/as/authorizeto initiate an authorization request. This request starts the sign-on flow.Make a
GETrequest toGET /{{envID}}/flows/{{flowID}}to initiate the authentication flow.To complete the authentication flow, make a
POSTrequest to/{{envID}}/flows/{{flowID}}and provide the user's login credentials.Make a
GETrequest to/{{envID}}/as/resume?flowId={{flowID}}to call the resume endpoint and return the auth code.Make a
POSTrequest to/{{envID}}/as/tokento 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