Project

General

Profile

Actions

Task #1669

closed

How to use WinRM connector together with AD connector

Added by Roman Kučera over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Roman Kučera
Category:
Connectors
Target version:
-
Start date:
05/20/2019
Due date:
% Done:

100%

Estimated time:
Owner:

Description

Create design how this behavior can be achieved. And make some prove of concept
The main use case is to use AD connector for managing basic account in AD. Then use WinRM connector for creating for example home folders or setting exchange account. WinRM must be called after AD connector.

WinRM connector can be used for managing home dirs, exhange, o365, deleting users object which are not supported via LDAP protocol.

It will be better if user in IdM will have only one account and then during provisioning it will execute operation via AD connector and WinRM connector together.
Other option is to configure new system for WinRM connector, but this system must be dependent on AD system - Create on AD must be first and then we can execute WinRM operation. For deleting I guess it should be the other way around execute WinRM and then AD.

Both proposed methods have a lot of unsolved questions right now. This feature is mandatory for managing accounts for exchange and o365.
In future we can use WinRM connector for managing AD account to, but now we want to use both of them.


Related issues

Related to IdStory Identity Manager - Feature #1260: Allow to specify provisioning dependency for systems and operationsNewVít Švanda09/19/2018

Actions
Actions #1

Updated by Roman Kučera over 5 years ago

1
Maybe the best solution can be to embedded WinRM connector into AD connector. Then you can configure all properties together in one place and choose for example if you want to execute create via LDAP protocol or powershell or both and choose order of these operations - for example create user via LDAP protocol and then create homedir for him via WinRM. There should be a configuration property for delay between executing the second method - use case is o365 where we need to wait 30 minutes for synchronizing AD user to cloud

User will have one account to the end system and logic will be implemented in connector. The possibility to use "only" LDAP protocol will be untouched.


2
Solution with some kind of dependency in IdM will be probably almost unreal to implement, because provisioning operations are asynchronous. I will consult this possibility to be sure.


3
Other option can be to configure WinRM as other system and then make some projspec implementation when create to AD will be executed I will assign role "powershell" to that user so provisioning via WinRM will be executed after AD. Thx to Ondra for this advice.
For create operation this solution will be OK, but for update and delete I can't guarantee which provisioning will be first.

Actions #2

Updated by Alena Peterová over 5 years ago

Unluckily, some kind of dependency of systems is needed for other systems as well - some examples here: https://redmine.czechidm.com/issues/1260. There are more systems that are dependent on AD (Kerio, Alvao, Plone, ...). It would be really nice to solve it in the product, not by project specific implementation.

Actions #3

Updated by Roman Kučera over 5 years ago

  • Related to Feature #1260: Allow to specify provisioning dependency for systems and operations added
Actions #5

Updated by Roman Kučera over 5 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

Implementation is in private repository https://git.bcvsolutions.eu/modules/winrm-connector/tree/1669-embedded-ad-conn
Ad connector is added into WinRM connector as dependency and is bundled together with WinRM. Configuration in IdM contains config for AD and for WinRM then you have options to choose for which operation which connector will be used. You can use one, both or none.
Currently is implemented support for test, search, crud operation
Next feature which will be implemented is order. Now the default behaviour is that operations are executed via AD connector as first and WinRM as second.
Other feature will be delay between execution with second connector

Actions #6

Updated by Roman Kučera over 5 years ago

  • % Done changed from 50 to 70

Order is implemented.
Connector now contains all methods which are is AD connector and are supported only AD connector
Fixed basic tests which were part of connectors.
Testing how to implement delay between execution.

Actions #7

Updated by Roman Kučera over 5 years ago

Which options do we have to support delay between execution update with multiple connectors:

1-Use two connectors in one with blocking wait for the second execution - big disadvantage is that no other operation can be performed from IdM. If we need to wait for example 20 minutes then IdM can perform like 1 operation per 20 min

2-Use two connectors in one with non blocking wait. - Previous disadvantage is eliminated, but IdM will have no way how to know about the result of the second execution. E.g. If the second execution which will be run after 20 minutes will fail. We won't be able to see this error in IdM, only in server log

3-Same as solution num. 2, but we will have our connector dependent on IdM so we can alter provisioning operations after the error. - Don't know for 100% if this solution will be usable, and the connector will be usable only with IdM

4-Use two connectors in one without delay and if the second execution will fail, we will trust that IdM retry provisioning will fix it later. E.g. I will assign role to ad via LDAP protocol and I need to wait for synchronization between AD and o365 and then execute powershell, in first try it will failed(only the powershell part). IdM will try it again and again, ..
We need to test what will happen if I try to assign role to user in AD which he already has, because in the next attempts it will run both execution (ldap + powershell) When retry provisioning is performed it will call search again so when there is another attempt and user has the role from previous execution it will not try to provision it again
This solution seems like the best one for now

5-Use two separate connectors and trust in retry provisioning - Not sure if this will work correctly.

6-Implement this feature on IdM level together with system dependency and have it as two systems.

Actions #8

Updated by Roman Kučera over 5 years ago

  • % Done changed from 70 to 90

Tested scripts for home dir creation, fixed some bugs in script + connector for returning id.
This was tested together with AD. So now I am able to create home dir together with AD account and set HomeDrive and HomeDirectory attributes in AD

Actions #9

Updated by Roman Kučera almost 5 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

This ticket can be closed. We already have WirRM+AD connector se standalone project in redmine or wiki.

Actions

Also available in: Atom PDF