feat: add update_user_attrs action with extension attribute support#155
feat: add update_user_attrs action with extension attribute support#155c1-dev-bot[bot] wants to merge 1 commit into
Conversation
Add a new GlobalActions implementation that registers an update_user_attrs action for the LDAP connector. This enables ConductorOne automations to update user attributes in LDAP/Active Directory, including: - Standard profile attributes (first_name, last_name, display_name, etc.) mapped to their LDAP equivalents (givenName, sn, displayName, etc.) - Extension attributes (extensionAttribute1-15) passed through directly - Arbitrary custom LDAP attributes beyond the predefined set The action accepts a stringMap of attributes and an update mask, resolves ConductorOne profile field names to LDAP attribute names, and uses LdapModify to update the entry. Attributes not in the standard mapping are passed through as-is, enabling support for any valid LDAP attribute. Fixes: CXH-1258
|
Claude finished @c1-dev-bot[bot]'s task in 1m 42s —— View job PR Review:
|
Summary
Adds a new
update_user_attrsaction to the LDAP connector via theGlobalActionProviderinterface. This enables ConductorOne automations to update user attributes in LDAP/Active Directory.Key features:
first_name,last_name,display_name,middle_name,job_title,department,division,company,employee_id,employee_number,employment_type,email) to their LDAP equivalents (givenName,sn,displayName, etc.)extensionAttribute1throughextensionAttribute15) are passed through directly to LDAP, enabling support for AD extension attributesImplementation details:
actions.gowithGlobalActions()method on theLDAPstructresolveAttrName()function for profile-to-LDAP name resolutionbuildLDAPChanges()to construct LDAP modify operations from the attrs map and update maskLdapModifyclient method for LDAP operationsAction schema:
update_user_attrsresource_type(string),resource_id(string/DN),attrs(stringMap),attrs_update_mask(stringSlice)ACTION_TYPE_ACCOUNT,ACTION_TYPE_ACCOUNT_UPDATE_PROFILETest plan
resolveAttrNamecovering all 12 standard mappings plus extension/custom attribute passthroughbuildLDAPChangescovering standard attributes, extension attributes, empty value deletion, missing attrs in mask, and mixed attribute typesgo build ./...)Fixes: CXH-1258
Automated PR Notice
This PR was automatically created by c1-dev-bot as a potential implementation.
This code requires: