Skip to content

Commit

Permalink
Added Request Response Type workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-mckibben-sp committed Oct 5, 2023
1 parent e9a9439 commit ac582d2
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "Access Request Preapproval",
"description": "Receive and respond to the access request preapproval event trigger. This workflow does preliminary processing on every access request to automatically determine if it should move on to the next approver in the chain or if it should fail immediately.",
"modified": "2023-04-13T16:30:07.903067305Z",
"definition": {
"start": "HTTP Request",
"steps": {
"HTTP Request": {
"actionId": "sp:http",
"attributes": {
"authenticationType": null,
"jsonRequestBody": {
"output": {
"approved": true,
"approver": "Workflow",
"comment": "This access has passed workflow approval."
},
"secret": "{{$.trigger._metadata.secret}}"
},
"method": "post",
"requestContentType": "json",
"url.$": "$.trigger._metadata.callbackURL"
},
"nextStep": "success",
"type": "action",
"versionNumber": 2
},
"success": {
"type": "success"
}
}
},
"trigger": {
"type": "EXTERNAL",
"attributes": {
"clientId": "862aa98b-f39b-490c-97af-49d23ad18102",
"url": "/beta/workflows/execute/external/a0e1c956-556c-4c2f-9c19-82ae9b71e1dc"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"name": "Update Access Request Preapproval Access Token",
"description": "",
"modified": "2023-04-18T14:10:36.785966514Z",
"definition": {
"start": "HTTP Request",
"steps": {
"HTTP Request": {
"actionId": "sp:http",
"attributes": {
"authenticationType": null,
"method": "post",
"url": "https://{tenant}.api.identitynow.com/oauth/token",
"urlParams": {
"client_id": "862aa98b-f39b-490c-xxx-xxxxx",
"client_secret": "6ebf9b15xxxxxx",
"grant_type": "client_credentials"
}
},
"nextStep": "HTTP Request 1",
"type": "action",
"versionNumber": 2
},
"HTTP Request 1": {
"actionId": "sp:http",
"attributes": {
"authenticationType": "OAuth",
"jsonPatchRequestBody": [
{
"op": "replace",
"path": "/httpConfig/bearerTokenAuthConfig/bearerToken",
"value": "{{$.hTTPRequest.body.access_token}}"
}
],
"jsonRequestBody": {
"description": "",
"enabled": true,
"httpConfig": {
"basicAuthConfig": null,
"bearerTokenAuthConfig": {
"bearerToken": "{{$.hTTPRequest.body.access_token}}"
},
"httpAuthenticationType": "BEARER_TOKEN",
"httpDispatchMode": "ASYNC",
"url": "https://{tenant}.api.identitynow.com/beta/workflows/execute/external/{id}"
},
"name": "Workflow",
"responseDeadline": "PT1H",
"triggerId": "idn:access-request-pre-approval",
"triggerName": "Access Request Submitted",
"type": "HTTP"
},
"method": "patch",
"oAuthClientId": "1758c03fdbf64401876f69b6c6e2c7b7",
"oAuthClientSecret": "$.secrets.5919bcbf-8f1d-4d96-9747-63634446ff10",
"oAuthCredentialLocation": "oAuthInHeader",
"oAuthTokenUrl": "https://devrel.api.identitynow.com/oauth/token",
"requestContentType": "json-patch+json",
"url": "https://{tenant}.api.identitynow.com/beta/trigger-subscriptions/{id}"
},
"nextStep": "success",
"type": "action",
"versionNumber": 2
},
"success": {
"type": "success"
}
}
},
"trigger": {
"type": "SCHEDULED",
"attributes": {
"cronString": "0 0 * * 0",
"frequency": "weekly",
"timeZone": "America/New_York",
"weeklyDays": [
"Sunday"
],
"weeklyTimes": [
"00:00"
]
}
}
}

0 comments on commit ac582d2

Please sign in to comment.