Add an audit event for user provisioning by group SCIM
What does this MR do and why?
The MR adds an audit event type user_provisioned_by_scim that is triggered when a user is provisioned by SCIM.
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
- On a self-managed instance, configure group SAML along with SCIM
-
Patch your instance to include the changes to files
ee/lib/ee/gitlab/scim/base_provisioning_service.rbandee/config/audit_events/types/user_provisioned_by_scim.yml - Pick a user that has SAML identity but not SCIM identity.
- (you can remove a SCIM identity for a user via rails console by running:
ScimIdentity.find_by_user_id(<user_id>).destroy!orScimIdentity.find_by(extern_uid: <SCIM Id>).destroy!
- (you can remove a SCIM identity for a user via rails console by running:
- On the IdP, trigger a provision for the user and notice the audit logs for the group. If provisioning is successful:
- You will find a record for that user with action
User was provisioned by SCIM - You will find the user now has a SCIM identity tied to their account.
- You will find a record for that user with action
Edited by Asmaa Hassan
