Skip to content

feat: Integrate One Identity Manager Proposal Management#287

Merged
janosbabik merged 15 commits into
developfrom
one-identity-integration
Mar 19, 2024
Merged

feat: Integrate One Identity Manager Proposal Management#287
janosbabik merged 15 commits into
developfrom
one-identity-integration

Conversation

@janosbabik
Copy link
Copy Markdown
Contributor

Description

A new message consumer, OneIdentityIntegrationQueueConsumer, has been implemented to manage proposals and their users in the One Identity Manager application server. This consumer handles the registration of accepted proposals as new System Roles, along with assigning their members and the proposer to the newly created Role. Additionally, it manages proposal updates such as member addition and removal.

Motivation and Context

The addition of this message consumer addresses the need to seamlessly integrate proposal management functionalities within the One Identity Manager application server. By automating the process of registering accepted proposals and managing proposal updates.

How Has This Been Tested

  • Unit tests
  • Manually

Changes

  • Added new message consumer: OneIdentityIntegrationQueueConsumer.
  • Introduced new environment variables to support the functionality of the message consumer.

@janosbabik janosbabik marked this pull request as draft March 8, 2024 08:31
@janosbabik janosbabik marked this pull request as ready for review March 8, 2024 09:27
Copy link
Copy Markdown
Contributor

@Junjiequan Junjiequan left a comment

Choose a reason for hiding this comment

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

Looks good to me. It seems the unit tests covered most of the features 👍

`ContactEmail='${user.email}'`
);

// In tehorie there should be only one person with the same email, but the 1IM.Person table has no unique constraint on ContactEmail.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

typo here: theory

Comment on lines +27 to +30
for (const [envVar, QueueConsumer] of Object.entries(queueConsumers)) {
if (str2Bool(process.env[envVar] as string)) {
new QueueConsumer(messageBroker);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice refactor here 👍

Copy link
Copy Markdown
Contributor

@martin-trajanovski martin-trajanovski left a comment

Choose a reason for hiding this comment

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

In general looks good but I left some comments that you can look into.

Comment thread package.json Outdated
}

onMessage: ConsumerCallback = async (type, message) => {
if (!EVENTS_FOR_HANDLING.includes(type as Event)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can't we use the hasTriggeringType and validateProposalMessage helper functions here instead?

}

// Method to collect users from the proposal
function collectUsersFromProposal(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe this is more like utility function and can be moved to a util file or something similar and name it collectUsersFromProposalMessage or something like that. I was thinking that it might be reused in some other consumers.

Comment thread src/queue/consumers/oneidentity/utils/ESSOneIdentity.ts
Comment thread src/queue/consumers/oneidentity/utils/OneIdentityApi.ts
Comment thread src/queue/consumers/oneidentity/utils/isProposalMessageData.ts Outdated
@janosbabik
Copy link
Copy Markdown
Contributor Author

@martin-trajanovski Thank you for the useful comments. I have updated the PR based on your feedback.

@janosbabik janosbabik merged commit a60566e into develop Mar 19, 2024
@janosbabik janosbabik deleted the one-identity-integration branch March 19, 2024 08:21
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.

3 participants