Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Unique Sequence number as account name for service accounts

Pravallika_t
New Contributor III
New Contributor III

Hello Team,

We are using an 8 digit service account name starting with 'S1' and incrementing the last last digits by 1. The service account name rule is using dynamic attribute for the name generation, where we defined dynamic attribute using the below query :

select concat('S',MAXID + 1) as ID from (select MAX(cast(ID as UNSIGNED)) as MAXID from (select MAX(cast(substring(acc.name,2,7) as UNSIGNED)) as ID from accounts acc where acc.name like 'S%' and acc.endpointkey = 3 ) acct union all (SELECT MAX(cast(substring(raa.ATTRIBUTE_VALUE,2,7) as UNSIGNED)) as ID FROM request_access_attrs raa where raa.ATTRIBUTE_NAME='DynaAccountName' and raa.ATTRIBUTE_VALUE like 'S%'))maxt order by MAXID desc limit 1

Which is working fine and generating the next number.

But when there are more than one live sessions/users accessing the request form before submitting the request then the same Account name is getting generated. Even the Account name is generated same after the request is submitted when the multiple users access the manage service account form at same time and create provisioning issues.

Could you please help us to rectify this issue.

 

5 REPLIES 5

rushikeshvartak
All-Star
All-Star
  • You can validate in workflow if accountname is already in used or request in progress you can auto reject request.

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hello,

We have tried the above solution by putting some conditions as below in workflow, but they are not working.

accountsMap.get(requestaccesskey).name == request_access_attrs.ATTRIBUTE_VALUE 

dynamicAttributes.get('DynaAccountName') == request_access_attrs.ATTRIBUTE_VALUE

(dynamicAttributes.get('customproperty17') eq account.name)

We would like to know what condition can be used to check the 'accountname' is already used for request in progress in workflow.

Thanks & Regards,

Pravallika Taniparthy

You need to use sql query using groovy block


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hello,

Client doesn't want to go through Workflow approach, could we know if there is any other possible solution to achieve this.

Thanks & Regards,

Pravallika Taniparthy

No . Please raise idea ticket for race -around condition


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.