Enhanced membership management and proxy support#12
Open
wadahiro wants to merge 11 commits intoEvolveum:masterfrom
Open
Enhanced membership management and proxy support#12wadahiro wants to merge 11 commits intoEvolveum:masterfrom
wadahiro wants to merge 11 commits intoEvolveum:masterfrom
Conversation
- Add HTTP proxy settings with authentication support - Add configurable HTTP timeouts (connect, socket, connection request) - Implement PoolableConnector interface - Limit HTTP connection pool size to avoid redundant pooling - Remove unused getMemberOf method from UserProcessing - Fix typo and format
- Add performance improvements for membership operations - Fix membership processing when creating users - Fix HTTP connection leaks - Handle "Member already exists" errors gracefully - Remove unused code from membership processing - Ensure proper cleanup and error handling throughout
- General code refactoring for better maintainability - Fix Javadoc comment positioning
- Add support for Planner (15) access level - Replace deprecated Master role with Maintainer role - Update access level maps to include all current GitLab levels: Guest (10), Planner (15), Reporter (20), Developer (30), Maintainer (40), Owner (50) - Remove all references to deprecated master role attributes - Update schema builders and processing logic for new access levels Breaking change: Configurations using master role attributes must migrate to maintainer.
- Changed groupsToManage from comma-delimited String to String[] for better type safety - Added groupsToManageRegex field to support regex pattern matching - Implemented Predicate-based matching system for performance optimization - Patterns are compiled once during validation, not at runtime - Combined literal and regex matching with OR logic - All matching is case-insensitive by default (Pattern.CASE_INSENSITIVE flag) - Backward compatible with existing configurations - Updated Messages.properties with new field descriptions
- Ignore 404 errors when removing memberships (already removed case) - Convert UnknownUidException to InvalidAttributeValueException for membership add/update operations - This prevents Midpoint from incorrectly thinking the user doesn't exist when it's actually a group/project ID issue
- Remove XML unescaping from ObjectProcessing.addAttr method - Remove XML unescaping from UserProcessing SSH key processing - Remove XML unescaping from UserProcessing identity string processing - Remove unused StringEscapeUtils imports The code was incorrectly applying XML entity unescaping to JSON data from GitLab REST API responses, which could corrupt legitimate data.
- Remove unnecessary dependencies - Keep ConnId version at 1.5.0.0 (sufficient for current codebase, it works with midPoint 4.8/4.9)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Features
id#accessLevelformat to specify custom access levelsgroupsToManageconfigurationImprovements
masterrole, now usingmaintainer, addedplannerrole)Bug Fixes
StringEscapeUtils.unescapeXmlusage that was causing issues with special charactersBreaking Changes
masteraccess level has been replaced withmaintainerto align with current GitLab terminologygroupsToManageconfiguration from comma-separated string toString[]array typeSample MidPoint Configuration
Important: Unlike previous versions, we must now use
subjectToObjectdirection for associations.Group/Project Membership Association Example
Note: We need to add
<fetchStrategy>explicit</fetchStrategy>to the attribute configuration for proper operation. By default, membership data is not fetched for performance reasons, so explicit fetching is required to retrieve membership information.The following attributes are available for different access levels:
For Groups:
ri:groups_as_guest- Guest access (10)ri:groups_as_planner- Planner access (15)ri:groups_as_reporter- Reporter access (20)ri:groups_as_developer- Developer access (30)ri:groups_as_maintainer- Maintainer access (40)ri:groups_as_owner- Owner access (50)For Projects:
ri:projects_as_guest- Guest access (10)ri:projects_as_planner- Planner access (15)ri:projects_as_reporter- Reporter access (20)ri:projects_as_developer- Developer access (30)ri:projects_as_maintainer- Maintainer access (40)ri:projects_as_owner- Owner access (50)Consolidated Groups/Projects Membership Association Example
For simpler use cases, we can use consolidated attributes where the access level is determined by the
defaultAccessLevelconfiguration.This is ideal when we want midPoint to control membership (add/remove users) while allowing GitLab administrators to manage access levels directly in GitLab:
Note: When using
ri:groupsorri:projects, members are added with the access level specified in the connector'sdefaultAccessLevelconfiguration.After initial provisioning, access levels can be managed directly in GitLab while midPoint continues to control membership.