Skip to content

Created JIT addon for OneLogin GRC#64

Open
VVargaOI wants to merge 37 commits intoOneIdentity:masterfrom
VVargaOI:master
Open

Created JIT addon for OneLogin GRC#64
VVargaOI wants to merge 37 commits intoOneIdentity:masterfrom
VVargaOI:master

Conversation

@VVargaOI
Copy link
Contributor

This new HTTP scripts implements Enable/Disable and Elevate/Demote OneLogin accounts. It should be used alongside other Asset/Accounts managins the actual password, either being an Other Asset managed by OneLogin GRC, or alternatively the Starling Connect based OneLogin Asset, or an AD Asset (where OneLogin synchronizes Account information from AD) .

There is also a .ps1 script which can be used for testing CustomPlatform connectors.

"Author": "Viktor Varga (One Identity)",
"Description": "This Solution Accelerator connector implements activation of OneLogin Accounts and Role elevation. It is to be used in a PIAM/PIdP use-case where a OneLogin Generic REST Connector manages Assets, Accounts, and Entitlements in Safeguard."
},
"CheckSystem": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +2698 to +2703
"Status": {
"Type": "Connecting",
"Percent": 10,
"Message": {
"Name": "AssetConnecting",
"Parameters": [ "%{Address}%" ]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your formatting is a bit off here, if you look at the file in a plain text editor, you'll see you have a mix of tabs and spaces. Everything should be spaces.

Comment on lines +2880 to +2890
"Request": {
"RequestObjectName": "SystemRequest",
"ResponseObjectName": "SystemResponse",
"Verb": "POST",
"Url": "auth/oauth2/revoke",
"IgnoreServerCertAuthentication": "%SkipServerCertValidation%",
"Content": {
"ContentType": "application/json",
"ContentObjectName": "Content"
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need the "IsSecret": true here too, since you're technically including the credentials and access token again, same as your ApiAuth function.

Comment on lines 590 to 600
"Function": {
"Name": "Disconnect",
"Parameters": [
"%Address%",
"%FuncUsername%",
"%FuncPassword%",
"%{AccessToken}%",
"%{SkipServerCertValidation}%",
"%{UseSsl}%"
],
"ResultVariable": "Disconnected"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, you'd want to call your Disconnect regardless of the outcome of the AssignRoles.

We do have a concept of a finally block, that could be used to help simplify the logic:
https://github.com/OneIdentity/SafeguardCustomPlatform/wiki/Try

Comment on lines +558 to +569
"Condition": {
"If": "!AccessTokenResult",
"Then": {
"Do": [
{
"Throw": {
"Value": "[Error] Authentication failed"
}
}
]
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could get rid of all of these and just throw the error from within the ApiAuth function itself, and not have to repeat this in each calling method.

}, {
"ForEach": {
"CollectionName": "PrivilegeGroupMembership",
"ElementName": "role",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if, similar to what is done in the AssignRoles function, does the user have to be "active" in order to assign or unassign them from a role? In other words, will the OneLogin API throw an error is the user is inactive? Or is that check in the AssignRoles function just a self imposed restriction?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assigning roles to inactive users in OneLogin is possible. However, in case a OneLogin role subsequently triggered the provisioning of the inactive OneLogin user into the final target system that was causing problems inside OneLogin.

Copy link

@Kevin-Andrew Kevin-Andrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for demo and testing purposes now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants