Skip to content

Mapped PLCs not present in '--users group' argument are removed if user is disabled #43

Closed
@adorton-adobe

Description

@adorton-adobe

It appears that mapped PLCs are removed from a disabled user (disabled in the directory) even when those PLCs are not specified in the --users group argument.

Example-

Here are two users disabled in my test AD environment:

disabled ad users

Test User 1 exists in my admin console, and is assigned two PLCs - All Apps and Adobe Sign

test user 1 with all apps and sign

Here's the config I'm using - user-sync-config.yml.txt

And the command to run sync-

py -2 .\user-sync.pex --process-groups --users group ADOBE-SIGN

When I run the sync tool, I expect it to remove the Sign PLC, but not All Apps, since All Apps is not specified in the --user groups param. Here's the log showing that the user is removed from both PLCs:

2017-03-01 16:26:29 7716 INFO config - Using main config file: user-sync-config.yml
2017-03-01 16:26:29 7716 INFO main - ========== Start Run =======================================
2017-03-01 16:26:29 7716 INFO connector.ldap - Connecting to: ldap://10.51.19.15 using username: ldapuser
2017-03-01 16:26:30 7716 INFO connector.ldap - Connected
2017-03-01 16:26:30 7716 INFO dashboard.owning - Creating connection for org id: "5190B7C05746859A7F000101@AdobeOrg" using private key file: "C:\Users\adorton\training\user-sync\private.key"
2017-03-01 16:26:31 7716 INFO dashboard.owning - API initialized on: https://usermanagement-stage.adobe.io/v2/usermanagement
2017-03-01 16:26:31 7716 INFO processor - ---------- Start Load from Directory -----------------------
2017-03-01 16:26:31 7716 INFO processor - Building work list...
2017-03-01 16:26:31 7716 INFO connector.ldap - Loading users...
2017-03-01 16:26:31 7716 WARNING connector.ldap - No email attribute: mail for dn: CN=Administrator,CN=Users,DC=ccestestdomain,DC=com
2017-03-01 16:26:31 7716 WARNING connector.ldap - No email attribute: mail for dn: CN=itcloud,CN=Users,DC=ccestestdomain,DC=com
2017-03-01 16:26:31 7716 WARNING connector.ldap - No email attribute: mail for dn: CN=BladeLogicRSCD,CN=Users,DC=ccestestdomain,DC=com
2017-03-01 16:26:31 7716 WARNING connector.ldap - No email attribute: mail for dn: CN=ldapuser,CN=Users,DC=ccestestdomain,DC=com
2017-03-01 16:26:31 7716 WARNING connector.ldap - No email attribute: mail for dn: CN=Kevin Bhunut,CN=Users,DC=ccestestdomain,DC=com
2017-03-01 16:26:31 7716 INFO connector.ldap - Total users loaded: 0
2017-03-01 16:26:32 7716 INFO processor - Total directory users after filtering: 0
2017-03-01 16:26:32 7716 INFO processor - ---------- End Load from Directory (Total time: 0:00:00) ---
2017-03-01 16:26:32 7716 INFO processor - ---------- Start Sync Dashboard ----------------------------
2017-03-01 16:26:32 7716 INFO processor - Syncing owning...
2017-03-01 16:26:33 7716 INFO processor - Adobe User not in Directory: [email protected]
2017-03-01 16:26:33 7716 INFO processor - Removed from Groups: set([u'adobe sign', u'all apps'])
2017-03-01 16:26:33 7716 INFO processor - Managing groups for user key: [email protected] organization: None added: None removed: set([u'adobe sign', u'all apps'])
2017-03-01 16:26:33 7716 INFO dashboard.owning.action - Added action: {"do": [{"remove": {"product": ["adobe sign", "all apps"]}}], "requestID": "action_1", "user": "[email protected]"}
2017-03-01 16:26:35 7716 INFO processor - ---------- End Sync Dashboard (Total time: 0:00:02) --------
2017-03-01 16:26:35 7716 INFO main - ========== End Run (Total time: 0:00:05) ===================

If I remove the All Apps mapping from my config and run through this use case again, then the All Apps PLC is not removed. Should it also be retained if it is in the config, but not specified in --users group?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions