2. Sync

7 июля 2021 г.

11:44

Synchronization editor problem: mapping property with script retrieve object - Forum - Identity Manager Community - One Identity Community

[Отправка сообщений об ошибках процесса синхронизации](onenote:#section-id=[REDACTED_USER]

Data Import

Figure 12: Example of synchronizing user data with different systems Secondary System CSV import Synchronization FirstName One Identity Manager Template rule FirstName Template rule Given Name Synchronization Provisioning Synchronization Provision i ng Primary System FirstName LastName Directory

Identity Manager 8.1.2 - Target System Synchronization Reference Guide (oneidentity.com)

У нас есть две системы (CSV и SAP). При синхронизации с CSV у нас меняется имя и фамилия у Person и это сразу должно отображаться в SAP.

Поэтому, CSV (вторичной системы) мы ставим галку Data Import, что означает, что значение переменной FULLSYNC = FALSE. Это приведет к тому, что будут работать многие шаблоны и скрипты при синхронизации с вторичной системой и будут вносится изменения в SAP.

Если галки не стоит, то FULLSYNC = TRUE и многие шаблоны не срабатывают!

Это можно делать для Workflow импорта данных в 1IM (???? походу нет, так как у связанных учеток сразу будут срабатывает изменения и данные будут отправляться в подключенные системы )

To prevent immediately provisioning of a primary system during synchronization, open the primary system synchronization project and disable the Import data option in the synchronization step.

From \<https://support.oneidentity.com/technical-documents/identity-manager/8.1.2/target-system-synchronization-reference-guide/7>

То есть, связанные с этой персоной учетки из других систем сразу получат изменения!

Пример скрипта шаблона

If Not CBool(Variables("FULLSYNC")) Then

If Not String.IsNullOrEmpty(\$UID_UNSRootB\$) AndAlso _

Not String.IsNullOrEmpty(\$cn\$) Then

If String.IsNullOrEmpty(\$UID_ParentUNSContainerB\$) Then

Value = TSB_CreateDN( _

"CN", _

\$cn\$,\$FK(UID_UNSRootB).DistinguishedName\$)

Else

Value = TSB_CreateDN( _

"CN", _

\$cn\$,\$FK(UID_ParentUNSContainerB).DistinguishedName\$)

End If

End If

End If

В общем - включение параметра может приводить к не хорошим последствиям в виде запуска процессов не нужных!

----

Автоматическое создание проектов синхронизации

Identity Manager 8.1.1 - Target System Synchronization Reference Guide (oneidentity.com)

Создание проекта синхронизации из шаблона

  1. Включаем Extert mode в настройках

Make global changes to program settings. General Security General Enable expert mode Language

  1. Выбираем наш проект, который будет шаблоном

Edit -> Create Template

Create template... Create your templates here. Enter the template name and a description of the contents. Display name Script language Description GreenPIum Cluster I Visual Basic .Net

  1. Этот шаблон будет виден в Database -> Manage Templates

Manage project templates... List of all available project templates from every target system. You can filter this all the changes to the database. Template Custom project templates GreenPIum Cluster I Target system DB (ADO.Net) Supported versior 7.0.2015.402

  1. В существующем проекте идем в Target System -> Edit Connection -> Пробегаемся по шагам и сохраняем Config file

Create system connection... Save configuration Saue current configuration as template. You can saue the current configuration to use later as a template for connecting to a system of the same type. Select. a file to saue the template in or leaue this field empty. Configuration file

  1. Создаем новый проект того же типа, что и шаблон

  2. Указываем параметры подключения и потом наш сохраненный Conf File

Create system connection... Load configuration Enter a file containing the connection configuration to load. You can load a preuiously saued configuration from file. The data from a this configuration is used as a templ customized in each subsequent step. Without a template, you must define all the data from scratch for each step. Configuration file 2021 .xml

  1. После этого выбираем наш шаблон

Create synchronization project... Select project template Select. a project. template for synchronization behauior. The list below shows you all existing project. templates. Select. one and click Net Create blank project. use this option if you do not want to apply a project template. This add an empt

  1. Base Object можно указать после того, как будет создана Custom Target System (можно сначала ее создать)

После можно сохранить проект с расширением sews - подправить его и импортнуть, через командую строку с указанием значений параметров - это автоматическая установка.

----

Маппинг в несколько одинаковых Schema Class (например, в несколько UNSContainer)

Проблема в том, что пытается удалять существующие объекты, так как справа данные разные, а слева - одни

Mappings Hadoop_Policy Yarn_Policy Hadoop_PolicyltemA... Hadoop [REDACTED_IP] 95\OneIM Behavior CanonicalName Description DistinguishedName DomainDispIayName Object-GUID DID ParentlJNSConta... UID UNSContainerB UID UNSR00tB VRT UID ParentConta... VRT UID UNSR00tB XObjectKey Edit map... Customized mapping General Mapping name Mapping dire&on Description Relation One Identity Manager schema d... Target system schema class Hadoop_policy Both directions Hierarchy synchronizaton Only suitable for updates Maps objects referenced by multiple references Hadoop Hadoop_PoIicy (all) Making changes to properties of an existing mapping can cause errors. Click "Edit" to edit the property anyway.

Mappings Hadoop_Policy Yarn_Polig Hadoop_PolicyRemA... [REDACTED_IP] 95\OneIM Behavior CanonicalName Description DistinguishedName DomainDispIayName Object-GUID DID ParentlJNSConta... UID UNSContainerB UID UNSR00tB VRT UID ParentConta... VRT UID UNSR00tB XObjectKey Edit map... Customized mapping General Mapping name Mapping dire&on Description Relation One Identity Manager schema d... Target system schema class Both directions Hierarchy synchronizaton Only suitable for updates Maps objects referenced by multiple references Yarn_PoIicy (all) Making changes to properties of an existing mapping can cause errors. Click "Edit" to edit the property anyway.

General One Identity Manager (1 72.25.32.Ig5\OneIM) Edit schema class... Edit schema class. Schema type Display name Class name Description LINSContainerB Reference scope Connection parameters Schema classes Schema Wpe / Schema class LINSAccountB LINSAccountB (all) Edit reference scope Define the schema class using hmo filters. Filter 'Select objects' provides the actual schema clas O objects. To accelerate loading schema class system objects considerably you should also defin system. Ensure that 'System filter' never filters more system objects than 'Select objects'. Select objects System filter UNSAccountBInUNSGroupB UNSAccountBInUNSGroupB (all) LINSAccountBInLlNSGroupB (effective assig... LINSContainerB Hadoop LINSContainerB (all) UNSGroupB UNSGroupB (all) UNSR00tB UNSR00tB (all) Condition o Scripting


Членство в группе

Важно!!!

Для маппинга членства в группе выбирать отличительные свойства!!! Например, DistinguishedName

Чтобы, если совпадут имена пользователей из разных систем - не было сложности в определении, из какой системы надо сопоставлять пользователя!!!

Edit properw... Change the schema property of type "Members of M:N schema types' Display name YR T Mambers Users YR T Mambers Users Ignore case Enable relatiue complement handling (required for member rules) Try to mark the object for deletion (outstanding) LINSAccountBHasLlNSItemB (effective assignments) Member key properties must be unique across schema Wpes. Only the first member found is assigned! Base schema type UNSItemB M:N schema type LINSAccountBHasLlNSItemB (effective assignments) UID UNSItemB UID UNSAccountB Members UNSAccountB Prima ke ro e DistinguishedName AccountName CanonicalName

Edit properw... Change the schema property of type "Script property". Display name Data type Description VRT Users Multi-ualue Ignore script execution enors Read script Write script Implement the script to read the schema properw value. Leave the script empw if the O You must use $<propefty name>$to access other schema properties. return $FirstName$, $LastName$) Public Function GetVaIue(ByRef schemaproperty as ISchemaProperty, ByVaI options as SchemaPr( $ Users$ users As String — vrtUsers Split (users, vrtUsersI List user as String vrtUsers vrtUsersI. add + user + " , system=Ranger2 Next String ,vrtUsersI) vrtUsers2 Split ( qw, vrtUsers21

Dim users As String = \$Users\$

Dim vrtUsers As String() = Split(users, ",")

Dim vrtUsers1 As New List(Of String)

For Each user as String In vrtUsers

vrtUsers1.add("CN=" + user + ",system=Ranger2")

Next

Dim qw As String = string.Join(";",vrtUsers1)

Dim vrtUsers2 As String() = Split(qw, ";")

return vrtUsers2

Identity Manager 8.1.4 - Target System Synchronization Reference Guide (oneidentity.com)

Для условия Update AdHoc можно прописать

\$XDateSubItem[o]:Date\$ \<> \$XDateSubItem:Date\$


У коннектора почему-то Update и Delete как Insert срабатывают (видно было, через Log2Console)

Фишка в том, что принудительно не передавались PolicyID и Permission в шаге AdHoc процесса Update UNSGroupB. Надо было использовать параметр ForceSyncOf: Value = "UNSContainerB.ObjectGUID,Description".

И он, когда не смог выполнить Update - выполнял Insert.


Трабла с тем, что не передавалось измененное свойство членства в UNSGroupB в коннектор PowerShell

Было

IsForITShop IslTShopOnIy MatchPatternForMembership ObjectGUID Risklndex DID AccProduct UID LINSContainerB UID UNSGroupB UID UNSR00tB Members From 11M DID Container Schema properw in One Identity Manager Description DistinguishedName Group Type Members DID Container UID UNSR00tB Information Schema properw in the target system Description Accesses VRT DN users VRT UID UNSR00tB VRT DN VRT RootDN VRT UID UNSR00tB VRT Users VRT Users From11M fil@ fil@ fil@

Стало

IsForITShop IslTShopOnIy MatchPatternForMembership ObjectGUID UID AccProduct UID UNSContainer8 LID UNSGroup8 ea LID UNSRoot8 V RT Members V RT MembersJoin Schema property in One Identity Manager Description DistinguishedName GroupType V RT Members MembersJcin V RT UID Container LID UNSRoot8 Information Schema propeO' in the target system Description Accesses VRT DN Service VRT Users VRT UsersOut PolicyID VRT UD UNSRoot8 Service VRT DN VRT RootDN VRT LID UNSRoot8 VRT Users : VRT_

Я стал передавать из 1IM не массив строк, а строку (Join массива)

Разделил один процесс, который включал в себя и чтение и заполнение свойства в Target system, на 2 отдельных.


Предупреждение "There is no mapping for this schema type, which was defined many-to-many mapping" при маппинге Multi-reference mapping rule

Надо в схеме пользователей, на которые ссылается атрибут M:N слева с галкой Enable relative complement установить галку Maps objects referenced by multiple references

Edit propety... Change the schema property of type "Members of M:N schema types" D' Name Display name VRT MembersArr VRT MembersArr Ignore case Z] Enable relativecomplement (required for member rues) O Tryto mark the object for deletion (outstardirÄ LINSAcccunt81nLlNSGrcup8 (effective assignments)

Edit map... Customized mapping Mappirrg name aase mapping Mappirrg directon Description Users One Identity Manager O Hierarcfwsynchronization Onlysuitable for updates Mapsobjects referenced refereres. One Identity Manager schema cl... Ta system schema class Rangerl Accounts user (all)


Основной процесс синхронизации

DPR_DPRProjectionStartInfo_Run_Synchronization


PostSync

В процессе DPR_DPRProjectionStartInfo_Run_Synchronization имеется шаг по созданию события PostSync для таблицы (BaseObject) с передачей дополнительных параметров, например uidDprJournal - чтобы можно было отфильтровать нужный журнал для этой синхронизации.

Если мы определим процесс для этой таблицы по событию PostSync - то он будет запущен после синхронизации и можно подхватить дополнительные параметры.

the logged Information of the synchronization runs are stored in the One Identity Manager database in the tables starting with DPRJournal...

You can use the report DPR_Journal_Summary to export the complete log using the report component.

To generate the report the Parameter uidDPRJournal has to be set to the UID_DPRJournal of the synchronization journal you want to export.

But you have to fetch the UID_DPRJournal from the database using the Information about the start stratup configuration in your process chain.

From \<https://www.oneidentity.com/community/identity-manager/f/forum/5033/send-synchronization-editor-log-with-a-mail/13122>


Отправка сообщений об ошибках процесса синхронизации

Имеется таблица DPRJournal - в ней поле UID_DPRProjectionConfig

Можно настроить процесс на событие Insert и Update (там запись обновляется, если ошибка) с фильтром по UID_DPRProjectionConfig и отлавливать ошибки синхронизации ProjectionState = Error

Ещё имеется таблица DPRJournalMessage, в которой хранится описание ошибки и ссылка на DPRJournal.

The process tasks FullProjection and AdHocProjection provide an out-parameter called UID_DialogJournal that provide the UID of the created synchronization journal for further processing.

From \<https://www.oneidentity.com/community/identity-manager/f/forum/26100/custom-logging-on-sync-events>