[DIR-128] Group Create resource action#135
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
|
@VVill-ga I think I'd lean toward including the ability to set members/owners/applications, but just limit how many can be set as part of the initial request here to something kinda small, like 25 (?). I'm a little more ambivalent on Rules, at least on this first pass, since they feel harder to present nicely in our UI/validate |
b94acc6 to
8bae1fa
Compare
| entitlements = append(entitlements, memberEntitlement) | ||
|
|
||
| // Add members to the group | ||
| for _, memberID := range memberIDs { |
There was a problem hiding this comment.
I don't think custom actions should be doing multiple grants as part of a create. Due to GRPC message limits, we have to restrict the number of users & apps that can be added. Also each request can fail (and doesn't seem to retry if we hit a retryable error), but we can't retry the whole operation since the group already exists and some users are already members. It makes much more sense to me to have an automation that creates the group, then makes grant tasks to add each user. That way if adding one user fails, the other users will still get added and the failed grants can be retried or at least shown on the ticket. If making lots of grants is too slow or inefficient, we should fix that problem instead of trying to work around it.
There was a problem hiding this comment.
Fair point on the erroring, if handling it is too complicated we can remove the fields, they are just nice to have for the action with the group template / creation flow.
Okta allows defining custom schemas, sometimes including required fields, so we fetch and parse those at registration time.
Plan to expand this for more frequent refreshing of the schema.The following fields can be added, but they are each additional API calls:
After discussion, we decided to support Members and Applications with limits on each.