Configure an Interactive Worker Application
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 (refer to 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 Create an admin Worker app connection. 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, refer to Get a PingOne admin 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/{{appID}}/secretto get the application’s secret, which is needed to authenticate the token request. -
Make a
GETrequest to/environments/{{envID}}/applications/{{appID}}/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/{{appID}}/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.
Click the Run in Postman button below to fork, or download and import, the Postman collection for this workflow to your workspace.