Skip to content

Commit

Permalink
Added some new workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
iam-sharvari committed Dec 11, 2023
1 parent 5b93d7f commit 9d73782
Show file tree
Hide file tree
Showing 8 changed files with 315 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "Account Aggregation Failed Notification",
"description": "Account Aggregation Failed Notification",
"definition": {
"start": "Compare Strings",
"steps": {
"Compare Strings": {
"choiceList": [
{
"comparator": "StringEquals",
"nextStep": "Send Email",
"variableA.$": "$.trigger.status",
"variableB": "Error"
}
],
"defaultStep": "End Step — Success 1",
"description": "Check if aggregation status equals failed",
"type": "choice"
},
"End Step — Success": {
"type": "success"
},
"End Step — Success 1": {
"description": "Aggregation Completed Successfully without any Errors",
"type": "success"
},
"Send Email": {
"actionId": "sp:send-email",
"attributes": {
"body": "Hi,<br/><br/>Account Aggregation for Source <b>${sourceName}</b> has <b>Failed</b>. <br/>Aggregation Start Time : ${startTime}<br/>Aggregation Completion Time ${completedTime}.<br/><br/>Thank you,<br/>IAM Team",
"context": {
"completedTime.$": "$.trigger.completed",
"sourceName.$": "$.trigger.source.name",
"startTime.$": "$.trigger.started"
},
"recipientEmailList": [
"sshah@sshah.com"
],
"subject": "ALERT: {{$.trigger.source.name}} source aggregation has Failed"
},
"description": "Notify the Source Admin of Source aggregation failure",
"nextStep": "End Step — Success",
"type": "action",
"versionNumber": 2
}
}
},
"trigger": {
"type": "EVENT",
"attributes": {
"filter.$": "$[?(@.source.name ==\"Active Directory\")]",
"id": "idn:account-aggregation-completed"
}
}
}
5 changes: 5 additions & 0 deletions workflows/account-aggregation-failed-notification/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Account Aggregation Failed Notification

This workflow sends out an email notification to the Source admin whenever source aggregation fails.

Please modify the Source Name and Recipient Email address in the workflow.
6 changes: 6 additions & 0 deletions workflows/emergency-termination/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Emergency Terminations

This workflow can be invoked from any target system (eg SAP) that supports API calls. Once triggered it will disable the identity access and target account (eg. AD) immediately. You will have to modify the workflow to populate the actual workflow ID in the trigger and also modify any source ids as required in the Manage Accounts step.

For more details about this workflow please refer this blog:
https://developer.sailpoint.com/discuss/t/emergency-terminations-of-identities-using-identitynow/12827
9 changes: 9 additions & 0 deletions workflows/manage-service-now-ticket/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Managing Service Now Tickets from Workflows

There are two workflows :

1. Manage Managing Service Now Tickets from Workflows &
2. Managing Service Now Tickets from Workflows using HTTP Request

For more details about this workflow please refer this blog:
https://developer.sailpoint.com/discuss/t/managing-service-now-tickets-in-workflows/14420
10 changes: 10 additions & 0 deletions workflows/run-unoptomized-aggregation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Run Unoptimized Aggregation

This workflows uses an HTTP Request to call load Accounts API to run an unoptized aggregation for a source.

Please modify:
1. Modify the scheduled trigger time based on your needs.
2. The tenant name, client ID, secret and source ID in HTTP Request action.
3. The receipient email address in Send Email action.

Note: This HTTP Request URL will have to be modified once we receive a V3 or a BETA API replacement for loadAccounts CC API.
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"name": "Run Unoptimized Aggregation",
"description": "Run Unoptimized Aggregation",
"definition": {
"start": "HTTP Request",
"steps": {
"Compare Numbers": {
"choiceList": [
{
"comparator": "NumericEquals",
"nextStep": "Send Email",
"variableA.$": "$.hTTPRequest.statusCode",
"variableB": 200
}
],
"defaultStep": "Send Email 1",
"type": "choice"
},
"HTTP Request": {
"actionId": "sp:http",
"attributes": {
"authenticationType": "OAuth",
"formRequestBody": "disableOptimization:true",
"method": "post",
"oAuthClientId": "",
"oAuthClientSecret": "",
"oAuthCredentialLocation": "oAuthInHeader",
"oAuthTokenUrl": "https://tenant.api.identitynow-demo.com/oauth/token",
"requestContentType": "form",
"url": "https://tenant.api.identitynow-demo.com/cc/api/source/loadAccounts/XXXXX"
},
"description": "Run unoptimized aggregation",
"nextStep": "Compare Numbers",
"type": "action",
"versionNumber": 2
},
"Send Email": {
"actionId": "sp:send-email",
"attributes": {
"body": "Unoptimized Aggregation for Active Directory has been <b>completed.</b>.<br/>IAM Team",
"context": {},
"from": null,
"recipientEmailList": [
"sshah@sshah.com"
],
"subject": "Run Unoptimized Aggregation"
},
"description": "Run Unoptimized Aggregations",
"nextStep": "success",
"type": "action",
"versionNumber": 2
},
"Send Email 1": {
"actionId": "sp:send-email",
"attributes": {
"body": "Unoptimized Aggregation for Active Directory has <b>Failed</b>.<br/>IAM Team",
"context": {},
"from": null,
"recipientEmailList": [
"sbharatiya@cybersolve.com"
],
"subject": "Run Unoptimized Aggregation"
},
"description": "Run Unoptimized Aggregation Failed",
"nextStep": "success",
"type": "action",
"versionNumber": 2
},
"success": {
"description": "End",
"type": "success"
}
}
},
"trigger": {
"type": "SCHEDULED",
"attributes": {
"cronString": "0 15 * * 6",
"frequency": "weekly",
"timeZone": "US/Eastern",
"weeklyDays": [
"Saturday"
],
"weeklyTimes": [
"1969-12-31T20:30:00.000Z"
]
}
}
}
10 changes: 10 additions & 0 deletions workflows/scheduled-full-source-aggregation-delta/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Scheduled Full Source Aggregation for source that supports Delta Aggregation

This workflows runs a scheduled full source aggregation for a source enabled for delta aggregation. It uses HTTP Request to disable delta aggregation, then run a full aggregation for the source and finally reinstate the delta aggregation flag to true.

Please modify:
1. Modify the scheduled trigger time based on your needs.
2. The tenant name, client ID, secret and source ID in HTTP Request actions.
3. Add a Send Email action if an Admin notification is required.

Note: This HTTP Request URL will have to be modified once we receive a V3 or a BETA API replacement for loadAccounts CC API.
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
{
"name": "Full Source Aggregation",
"description": "Run a scheduled full source aggregation for a source enabled for delta aggregation",
"definition": {
"start": "HTTP Request",
"steps": {
"Compare Numbers": {
"choiceList": [
{
"comparator": "NumericEquals",
"nextStep": "HTTP Request 1",
"variableA.$": "$.hTTPRequest.statusCode",
"variableB": 200
}
],
"defaultStep": "End Step — Success",
"description": null,
"type": "choice"
},
"Compare Numbers 1": {
"choiceList": [
{
"comparator": "NumericEquals",
"nextStep": "HTTP Request 2",
"variableA.$": "$.hTTPRequest1.statusCode",
"variableB": 200
}
],
"defaultStep": "End Step — Success",
"description": null,
"type": "choice"
},
"Compare Numbers 2": {
"choiceList": [
{
"comparator": "NumericEquals",
"nextStep": "End Step — Success",
"variableA.$": "$.hTTPRequest2.statusCode",
"variableB": 200
}
],
"defaultStep": "End Step — Success",
"description": null,
"type": "choice"
},
"End Step — Success": {
"type": "success"
},
"HTTP Request": {
"actionId": "sp:http",
"attributes": {
"authenticationType": "OAuth",
"jsonPatchRequestBody": [
{
"op": "replace",
"path": "/connectorAttributes/deltaAggregationEnabled",
"value": "false"
}
],
"method": "patch",
"oAuthClientId": "",
"oAuthClientSecret": "",
"oAuthCredentialLocation": "oAuthInHeader",
"oAuthTokenUrl": "https://tenant.api.identitynow-demo.com/oauth/token",
"requestContentType": "json-patch+json",
"url": "https://tenant.api.identitynow-demo.com/v3/sources/ef7ad4d0f07a46d6b62064cd3efa1abe"
},
"description": "Update the source configuration using REST API and set Delta aggregation flag to false",
"nextStep": "Compare Numbers",
"type": "action",
"versionNumber": 2
},
"HTTP Request 1": {
"actionId": "sp:http",
"attributes": {
"authenticationType": "OAuth",
"jsonPatchRequestBody": null,
"method": "post",
"oAuthClientId": "",
"oAuthClientSecret": "",
"oAuthCredentialLocation": "oAuthInHeader",
"oAuthTokenUrl": "https://tenant.api.identitynow-demo.com/oauth/token",
"requestContentType": "json-patch+json",
"url": "https://tenant.api.identitynow-demo.com/cc/api/source/loadAccounts/XXXXX"
},
"description": "Trigger a Full Source Account Aggregation",
"nextStep": "Compare Numbers 1",
"type": "action",
"versionNumber": 2
},
"HTTP Request 2": {
"actionId": "sp:http",
"attributes": {
"authenticationType": "OAuth",
"jsonPatchRequestBody": [
{
"op": "replace",
"path": "/connectorAttributes/deltaAggregationEnabled",
"value": "true"
}
],
"method": "patch",
"oAuthClientId": "",
"oAuthClientSecret": "",
"oAuthCredentialLocation": "oAuthInHeader",
"oAuthTokenUrl": "https://tenant.api.identitynow-demo.com/oauth/token",
"requestContentType": "json-patch+json",
"url": "https://tenant.api.identitynow-demo.com/v3/sources/ef7ad4d0f07a46d6b62064cd3efa1abe"
},
"description": "Update the source configuration using REST API and set Delta aggregation flag to true",
"nextStep": "Compare Numbers 2",
"type": "action",
"versionNumber": 2
}
}
},
"trigger": {
"type": "SCHEDULED",
"attributes": {
"cronString": "0 2 * * 6",
"frequency": "weekly",
"timeZone": "Asia/Kolkata",
"weeklyDays": [
"Saturday"
],
"weeklyTimes": [
"1969-12-31T20:30:00.000Z"
]
}
}
}

0 comments on commit 9d73782

Please sign in to comment.