Windows Azure Active Directory目录同步筛选

简介:

我们上一篇介绍了windows azure 联合身份验证服务的配置,实现本地的Active Directory和windows azure Active Directory实现联合认证,完成SSO-单点登陆。其中有一个过程是需要通过dirsync工具将本地的Active Directory 信息同步到windows azure Active Directory上,同步后,我们发现默认是将本地所有的用户组信息同步到windows azure Active Directory,这样的同步结果对于管理员来说是很不方便的,为什么呢,因为如果本地有上千甚至过万的用户,这些用户信息都同步到windows azure Active Directory上的话维护起来不方便,那怎么实现将指定的本地Active Directory信息同步到windows azure Active Directory下呢,答案是当然,就是配置windows azure Active Directory目录同步筛选,我们通过配置筛选将指定的用户、OU或者Domain同步到windows azure Active Directory下,同步的默认配置,随后又配置了筛选,则筛选掉的对象将不再同步到云。因此,目录同步过程将会删除云中前面已同步但随后从同步中筛选掉的所有对象。如果由于筛选出错而无意中删除了对象,你可以在云中重新创建这些对象,方法是删除筛选配置,然后重新同步目录。还有就是默认同步时长为3小时。如果需要立即生效的话,我们需要通过windows powershell进行强制目录同步操作,具体见下:http://technet.microsoft.com/zh-cn/library/jj710171.aspx

我们得知,默认是将本地的所有信息都是同步到windows azure Active Directory下的。

clip_image002

1.基于组织单位(OU)

可以在目录同步工具中使用此筛选类型来管理 SourceAD 管理代理的属性。此筛选类型可让你选择要允许哪些 OU 同步到云。

1.使用属于 MIISAdmins 本地安全组的帐户登录到运行目录同步的计算机。

clip_image004

Open Identity Manager by double-clicking miisclient.exe that is located in the following folder:

%ProgramFiles%\Microsoft Azure Active Directory Sync\SYNCBUS\Synchronization Service\UIShell

clip_image006

运行后

clip_image008

In Identity Manager, click Management Agents, and then double-click Active Directory Connector.

clip_image010

clip_image012

Click Configure Directory Partitions, and then click Containers

clip_image014

Note:When presented with the credentials dialog box, the MSOL_AD_Sync account will be displayed. This account is using a randomly generated password, so administrators will not know the password. When performing this filtering operation, you should enter an account which has access to the Active Directory forest. The account used here should be an Enterprise Admin. The Enterprise Admin account can view the entire forest and perform the filtering within any domain within the forest. Using a Domain Admin will limit the scope of what the Directory Synchronization tool can view and may not be viable when needing to expand the filter into other domains.

所以我们再次输入域管理员账户及密码验证

clip_image016

In the Select Containers dialog box, clear the OUs that you don’t want to synch with the cloud directory, and then click OK. Click OK on the SourceAD Propertiespage

clip_image018

Click ok

clip_image020

Perform a full sync: on the Management Agent tab, right-click Active Directory Connector, click Run, click Full Import Full Sync, and then click OK.

clip_image022

clip_image024    
开始sync

clip_image026

同步完成:

clip_image028

同步后我们查看azure的用户状

clip_image030

2.基于域:

可以在目录同步工具中使用此筛选类型来管理 SourceAD 管理代理的属性。此类型可让你选择要允许哪些域同步到云

1.Log on to the computer that is running directory synchronization by using an account that is a member of the MIISAdmins local security group.

2.Open Identity Manager by double-clicking miisclient.exe that is located in the following folder:

%ProgramFiles%\Windows Azure Active Directory Sync\SYNCBUS\Synchronization Service\UIShell

3.In Identity Manager, click Management Agents, and then double-click Active Directory Connector.

clip_image032

Click Configure Directory Partitions, and then select the domains that you want to synchronize. To filter a domain out of the synchronization process, clear the domain’s check box.

clip_image034

If you have removed a domain from the scope of the Active Directory Connector, you need to update its run profiles:

1).Right-click the Active Directory Connector, and then select Configure Run Profiles.

2).From Full Import run profile step details, select the step for the domain you just unselected, and then click Delete Step.

3).Click OK.

4).Perform a full sync: on the Management Agent tab, right-click Active Directory Connector, click Run, click Full Import Full Sync, and then click OK.

3.基于用户特性:

可以使用此筛选方法针对用户对象指定基于特性的筛选器。这样,你便可以控制哪些对象不应同步到云;基于用户特性的筛选过程可能只适用于用户对象。联系人和组使用了超出本文范畴的复杂筛选规则。   
若要筛选掉特定的用户,需要更新本地组织中你不想要同步到云的用户对象。可以基于任何用户对象特性进行筛选。    
例如,可以针对本地组织中你不想要同步到云的每个用户,将字符串“NoSync”添加到 extensionAttribute15 用户特性。在此示例中,配置本地用户后,你将要在标识管理器中创建一个筛选规则,从同步过程中排除“NoSync”用户。    
以下过程描述了如何在 extensionAttrtibute15 中使用“NoSync”字符串配置用户筛选。

步骤 1:配置本地用户对象

1.在“Active Directory 用户和计算机”中的“视图”菜单内,选择“高级功能”,然后打开用户的属性页。

2.在“属性编辑器”选项卡上,将 extensionAttribute15 设置为 NoSync。

步骤 2:在 Active Directory 连接器上配置筛选

1.使用属于 MIISAdmins 本地安全组的帐户登录到运行目录同步的计算机。

2.通过双击位于以下文件夹中的 miisclient.exe 打开标识管理器:

%ProgramFiles%\Microsoft Azure Active Directory Sync\SYNCBUS\Synchronization Service\UIShell

3.在标识管理器中,单击“管理代理”,然后双击“Active Directory 连接器”。

4.单击“配置连接器筛选器”,然后执行以下操作:

5.在“数据源对象类型”网格中选择“用户”,然后单击“新建”。

6.在“用户筛选器”中,对于“数据源”特性,请选择 extensionAttribute15;对于“运算符”,7.请选择“等于”,然后在“值”字段中键入 NoSync。

8.单击“添加条件”,然后单击“确定”。

9.在“SourceAD 属性”页上,单击“确定”。

10执行完全同步:在“管理代理”选项卡上,右键单击“Active Directory 连接器”,然后依次单击“运行”、“完全导入完全同步”和“确定”。

4.同步时间

我们最后通过log确认,dirsync默认的同步时间为3小时一次。

clip_image036

如果我们在修改后的某个属性的话,需要理解生效的话,我们可以通过powershell进行强制同步。

5.使用windows powershell强制执行目录同步

我们需要在运行同步目录工具的计算机上,启动powshell,输入import-module dirsync 然后回车确认。

然后我们通过start-onlinecoexistencesync来进行强制同步

clip_image038

执行后,我们可以在windows azure portal页面上看见同步时间

clip_image040

我们最后再强调一个问题,在配置目录同步时,系统会在本地的Active Directorty林中创建一个同步用户组,用该服务器账户读取和同步你本地的Active directory信息。

在为给订的云租户组织配置并同步该工具后,你无法配置同一目录同步安装来填充其他云租户。

clip_image042

clip_image044




本文转自 高文龙 51CTO博客,原文链接:http://blog.51cto.com/gaowenlong/1603149,如需转载请自行联系原作者

相关文章
|
3月前
|
BI Windows Python
python报表自动化系列 - 在Windows中打开指定目录
python报表自动化系列 - 在Windows中打开指定目录
31 1
|
3月前
|
存储 Shell Windows
安装OSX和Windows双系统以后系统时间不同步的问题
安装OSX和Windows双系统以后系统时间不同步的问题
42 0
|
7月前
|
Windows
Windows常见可读写目录的探测
Windows常见可读写目录的探测
100 0
Windows常见可读写目录的探测
|
7月前
|
Windows
Windows基础命令(目录文件、文本、网络操作)
Windows基础命令(目录文件、文本、网络操作)
35 0
|
1月前
|
Windows
Windows 命令提示符(CMD)操作(一):文件和目录管理
Windows 命令提示符(CMD)操作(一):文件和目录管理
42 0
|
4月前
|
存储 API Windows
8.3 Windows驱动开发:内核遍历文件或目录
在笔者前一篇文章`《内核文件读写系列函数》`简单的介绍了内核中如何对文件进行基本的读写操作,本章我们将实现内核下遍历文件或目录这一功能,该功能的实现需要依赖于`ZwQueryDirectoryFile`这个内核API函数来实现,该函数可返回给定文件句柄指定的目录中文件的各种信息,此类信息会保存在`PFILE_BOTH_DIR_INFORMATION`结构下,通过遍历该目录即可获取到文件的详细参数,如下将具体分析并实现遍历目录功能。
43 0
8.3 Windows驱动开发:内核遍历文件或目录
|
5月前
|
C++ Windows
windows从右键菜单选择vscode打开当前目录项目
vscode 每次打开新项目都要先打开vscode在从里面打开目录,每次这样感觉效率比较低,就想着能不能有一个我直接在当前目录下右键菜单,点一下就直接用vscode打开当前目录,总共找到3种方案
77 0
|
6月前
|
缓存 Java 分布式数据库
[笔记]Windows核心编程《九》同步设备I/O和异步设备I/O
[笔记]Windows核心编程《九》同步设备I/O和异步设备I/O
|
7月前
|
存储 Apache 文件存储
Apache On Windows 如何使用阿里云NAS作为WEB站点目录
在Windows操作系统运行Apache WEB服务器的用户如何使用阿里云NAS共享作为WEB 站点目录。
211 0
|
8月前
|
Windows
windows通过cd命令进入具体目录
windows通过cd命令进入具体目录