ldap.html
19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
<!DOCTYPE html>
<html>
<head>
<title>ldap.md</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<style>
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
body {
font-family: "Segoe WPC", "Segoe UI", "SFUIText-Light", "HelveticaNeue-Light", sans-serif, "Droid Sans Fallback";
font-size: 14px;
padding: 0 12px;
line-height: 22px;
word-wrap: break-word;
}
#code-csp-warning {
position: fixed;
top: 0;
right: 0;
color: white;
margin: 16px;
text-align: center;
font-size: 12px;
font-family: sans-serif;
background-color:#444444;
cursor: pointer;
padding: 6px;
box-shadow: 1px 1px 1px rgba(0,0,0,.25);
}
#code-csp-warning:hover {
text-decoration: none;
background-color:#007acc;
box-shadow: 2px 2px 2px rgba(0,0,0,.25);
}
body.scrollBeyondLastLine {
margin-bottom: calc(100vh - 22px);
}
body.showEditorSelection .code-line {
position: relative;
}
body.showEditorSelection .code-active-line:before,
body.showEditorSelection .code-line:hover:before {
content: "";
display: block;
position: absolute;
top: 0;
left: -12px;
height: 100%;
}
body.showEditorSelection li.code-active-line:before,
body.showEditorSelection li.code-line:hover:before {
left: -30px;
}
.vscode-light.showEditorSelection .code-active-line:before {
border-left: 3px solid rgba(0, 0, 0, 0.15);
}
.vscode-light.showEditorSelection .code-line:hover:before {
border-left: 3px solid rgba(0, 0, 0, 0.40);
}
.vscode-dark.showEditorSelection .code-active-line:before {
border-left: 3px solid rgba(255, 255, 255, 0.4);
}
.vscode-dark.showEditorSelection .code-line:hover:before {
border-left: 3px solid rgba(255, 255, 255, 0.60);
}
.vscode-high-contrast.showEditorSelection .code-active-line:before {
border-left: 3px solid rgba(255, 160, 0, 0.7);
}
.vscode-high-contrast.showEditorSelection .code-line:hover:before {
border-left: 3px solid rgba(255, 160, 0, 1);
}
img {
max-width: 100%;
max-height: 100%;
}
a {
color: #4080D0;
text-decoration: none;
}
a:focus,
input:focus,
select:focus,
textarea:focus {
outline: 1px solid -webkit-focus-ring-color;
outline-offset: -1px;
}
hr {
border: 0;
height: 2px;
border-bottom: 2px solid;
}
h1 {
padding-bottom: 0.3em;
line-height: 1.2;
border-bottom-width: 1px;
border-bottom-style: solid;
}
h1, h2, h3 {
font-weight: normal;
}
h1 code,
h2 code,
h3 code,
h4 code,
h5 code,
h6 code {
font-size: inherit;
line-height: auto;
}
a:hover {
color: #4080D0;
text-decoration: underline;
}
table {
border-collapse: collapse;
}
table > thead > tr > th {
text-align: left;
border-bottom: 1px solid;
}
table > thead > tr > th,
table > thead > tr > td,
table > tbody > tr > th,
table > tbody > tr > td {
padding: 5px 10px;
}
table > tbody > tr + tr > td {
border-top: 1px solid;
}
blockquote {
margin: 0 7px 0 5px;
padding: 0 16px 0 10px;
border-left: 5px solid;
}
code {
font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback";
font-size: 14px;
line-height: 19px;
}
body.wordWrap pre {
white-space: pre-wrap;
}
.mac code {
font-size: 12px;
line-height: 18px;
}
pre:not(.hljs),
pre.hljs code > div {
padding: 16px;
border-radius: 3px;
overflow: auto;
}
/** Theming */
.vscode-light,
.vscode-light pre code {
color: rgb(30, 30, 30);
}
.vscode-dark,
.vscode-dark pre code {
color: #DDD;
}
.vscode-high-contrast,
.vscode-high-contrast pre code {
color: white;
}
.vscode-light code {
color: #A31515;
}
.vscode-dark code {
color: #D7BA7D;
}
.vscode-light pre:not(.hljs),
.vscode-light code > div {
background-color: rgba(220, 220, 220, 0.4);
}
.vscode-dark pre:not(.hljs),
.vscode-dark code > div {
background-color: rgba(10, 10, 10, 0.4);
}
.vscode-high-contrast pre:not(.hljs),
.vscode-high-contrast code > div {
background-color: rgb(0, 0, 0);
}
.vscode-high-contrast h1 {
border-color: rgb(0, 0, 0);
}
.vscode-light table > thead > tr > th {
border-color: rgba(0, 0, 0, 0.69);
}
.vscode-dark table > thead > tr > th {
border-color: rgba(255, 255, 255, 0.69);
}
.vscode-light h1,
.vscode-light hr,
.vscode-light table > tbody > tr + tr > td {
border-color: rgba(0, 0, 0, 0.18);
}
.vscode-dark h1,
.vscode-dark hr,
.vscode-dark table > tbody > tr + tr > td {
border-color: rgba(255, 255, 255, 0.18);
}
.vscode-light blockquote,
.vscode-dark blockquote {
background: rgba(127, 127, 127, 0.1);
border-color: rgba(0, 122, 204, 0.5);
}
.vscode-high-contrast blockquote {
background: transparent;
border-color: #fff;
}
</style>
<link rel="stylesheet" href="file:///file%3A///D%3A/Program%20Files/Microsoft%20VS%20Code/css/def.css" type="text/css">
<style>
/* Tomorrow Theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
/* Tomorrow Comment */
.hljs-comment,
.hljs-quote {
color: #8e908c;
}
/* Tomorrow Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #c82829;
}
/* Tomorrow Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #f5871f;
}
/* Tomorrow Yellow */
.hljs-attribute {
color: #eab700;
}
/* Tomorrow Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #718c00;
}
/* Tomorrow Blue */
.hljs-title,
.hljs-section {
color: #4271ae;
}
/* Tomorrow Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #8959a8;
}
.hljs {
display: block;
overflow-x: auto;
color: #4d4d4c;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
</style>
<style>
/*
* Markdown PDF CSS
*/
body {
font-family: "Meiryo", "Segoe WPC", "Segoe UI", "SFUIText-Light", "HelveticaNeue-Light", sans-serif, "Droid Sans Fallback";
}
pre {
background-color: #f8f8f8;
border: 1px solid #cccccc;
border-radius: 3px;
overflow-x: auto;
white-space: pre-wrap;
overflow-wrap: break-word;
}
pre:not(.hljs) {
padding: 23px;
line-height: 19px;
}
blockquote {
background: rgba(127, 127, 127, 0.1);
border-color: rgba(0, 122, 204, 0.5);
}
.emoji {
height: 1.4em;
}
/* for inline code */
:not(pre):not(.hljs) > code {
color: #C9AE75; /* Change the old color so it seems less like an error */
font-size: inherit;
}
/* Page Break : use <div class="page"/> to insert page break
-------------------------------------------------------- */
.page {
page-break-after: always;
}
</style>
<link rel="stylesheet" href="file:///e%3A/%E8%B5%84%E6%96%99/%E9%9B%86%E6%88%90%E4%B8%AD%E5%BF%83/table.css" type="text/css">
</head>
<body>
<p><font color=#666666 size=5 face="PingFangSC-Regular">LDAP集成</font></p>
<ul>
<li><a href="#0">使用场景</a></li>
<li><a href="#1">操作说明</a></li>
<li><a href="#2">开发相关</a></li>
</ul>
<H3 id=0 style="border-left: 4px solid #3677D5;height:42px;line-height:42px;background:#F4F4F4"><font color=#08C size=4 face="PingFangSC-Semibold" > 使用场景</font></H3>
<p>LDAP(Lightweight Directory Access Protocol),轻量目录访问协议,LDAP目录以树状结构来存储数据。企业中使用LDAP主要是用来集中管理企业的组织结构及人员账号信息。</p>
<p>LDAP是一种通讯协议,<strong>AD</strong>(Active Directory)是微软对LDAP协议的一套实现,可以将AD理解为是个数据库,只是该数据库是以树状结构存储数据。</p>
<H3 id=1 style="border-left: 4px solid #3677D5;height:42px;line-height:42px;background:#F4F4F4"><font color=#08C size=4 face="PingFangSC-Semibold" > 操作说明</font></H3>
<p>操作入口:<strong>集成中心 - LDAP集成</strong><br>
<img src="image/ldap01.png" alt="LDAP集成"></p>
<p>LDAP包含 <strong>集成设置、数据同步、账号合并、批量指定人员部门</strong> 四个子菜单<br>
<img src="image/ldap02.png" alt="LDAP集成"></p>
<p><strong>集成设置:</strong> 设置LDAP集成信息<br>
<strong>类型:</strong> 包含 <strong>AD、OpenLDAP、SUN ONE</strong> 三种<br>
<strong>LDAP驱动类:</strong> 此为固定值,不要更改。值为 <strong>com.sun.jndi.ldap.LdapCtxFactory</strong><br>
<strong>LDAP 服务器地址(Ldap->OA):</strong> LDAP服务器地址,以 <strong>ldap://</strong> 开头,默认端口 <strong>389</strong>,必填<br>
<strong>用户名:</strong> LDAP服务器的用户名。<br>
拥有管理员权限的LDAP用户,输入对应的distinguishedName属性值。<br>
<img src="image/ldap07.png" alt="LDAP集成"><br>
如果在根目录USERS组下只需输入CN的内容即可,如下图中的administrator。<br>
<img src="image/ldap04.png" alt="LDAP集成"><br>
如果在非根目录USERS组下的用户,需要输入全路径,如 <strong>CN=admin,OU=用户,OU=公司,DC=lw,DC=com</strong><br>
<strong>密码:</strong> LDAP服务器的密码<br>
<strong>同步域:</strong> AD域同步路径,下图示例中的同步域为:<strong>OU=zxjtest,DC=lw,DC=com</strong><br>
如果为多个域,需要用'<strong>|</strong>'隔开,如:<strong>OU=zxjtest,DC=lw,DC=com|OU=zb_test,DC=lw,DC=com</strong><br>
<img src="image/ldap03.png" alt="LDAP集成"><br>
<strong>集成登录ECOLOGY域名/地址:</strong> 值为所设置的域名<br>
如果是远程桌面,windows服务器输入的账号为lw\Administrator,则应配置lw,如下图<br>
<img src="image/ldap05.png" alt="LDAP集成"><br>
下图为在LDAP服务器中查看到的,域名为lw<br>
<img src="image/ldap06.png" alt="LDAP集成"><br>
开启LDAP登录后,可以访问 <strong>http://url:port/login/LoginSSO.jsp</strong><br>
<strong>开启/关闭SSO登录:</strong><br>
1. 若在集群环境下,需要在每个流程节点后进行开启或关闭操作<br>
2. 每次开启或关闭,需要清除浏览器缓存,否则无法生效(已开启或关闭,若再次开启或关闭则无需清缓存)<br>
<strong>批量绑定AD账号:</strong> 将Ecology中所有的用户账号与LDAP账号做绑定操作,即所有用户都使用LDAP认证方式进行登录。<br>
<span style="background:yellow"><strong>注意:</strong> 请确保Ecology账号在LDAP中存在,否则会影响用户登录</span><br>
<strong>批量撤销AD账号:</strong> 将Ecology中所有的用户账号与LDAP账号做撤销绑定操作,即所有用户都使用Ecology数据库认证方式进行登录。<br>
<span style="background:yellow"><strong>注意:</strong> 请确保Ecology用户账号都有密码,否则会影响用户登录</span><br>
<strong>域同步到OA设置:</strong> 可以按指定条件同步组织结构和人员,可以手工同步或定时同步<br>
<strong>域同步到OA设置 - 同步组织结构:</strong> 可选择将域中的组织结构同步到OA<br>
<strong>域同步到OA设置 - 同步人员:</strong> 可选择将域中的人员信息同步到OA<br>
<strong>域同步到OA设置 - 检查帐户禁用状态:</strong><br>
<strong>域同步到OA设置 - 同步条件:</strong> AD域默认条件为(&(objectCategory=person)(objectClass=user)),其他默认条件为objectclass=person</p>
<p> <strong>条件规则</strong></p>
<table>
<thead>
<tr>
<th>字符</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>&</td>
<td>与(列表中所有项必须为true)</td>
</tr>
<tr>
<td>|</td>
<td>或(列表中至少一个必须为true)</td>
</tr>
<tr>
<td>!</td>
<td>非(求反的项不能为true)</td>
</tr>
<tr>
<td>=</td>
<td>相等(根据属性的匹配规则)</td>
</tr>
<tr>
<td>~=</td>
<td>近似等于(根据属性的匹配规则)</td>
</tr>
<tr>
<td>>=</td>
<td>大于(根据属性的匹配规则)</td>
</tr>
<tr>
<td><=</td>
<td>小于(根据属性的匹配规则)</td>
</tr>
<tr>
<td>=*</td>
<td>存在(条目中必须有这个属性,但值不做限制)</td>
</tr>
<tr>
<td>*</td>
<td>通配符(表示这个位置可以有一个或多个字符),当指定属性值时用到</td>
</tr>
<tr>
<td>\</td>
<td>转义符(当遇到“*”,“(”,“)”时进行转义)</td>
</tr>
</tbody>
</table>
<p> <strong>条件示例</strong></p>
<table>
<thead>
<tr>
<th>条件内容</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>manager=*</td>
<td>包含一个或多个 manager 属性值的条目</td>
</tr>
<tr>
<td>cn=Ray Kultgen</td>
<td>包含通用名 Ray Kultgen 的条目</td>
</tr>
<tr>
<td>(!(cn=Ray Kultgen))</td>
<td>所有不包含通用名 Ray Kultgen 的条目</td>
</tr>
<tr>
<td>description=*X.500*</td>
<td>所有条目的说明属性中都包含子字符串 X.500</td>
</tr>
<tr>
<td>(&(ou=Marketing)(!(description=*X.500*)))</td>
<td>所有组织单元为 Marketing 且说明字段中不包含子字符串 X.500 的条目</td>
</tr>
<tr>
<td>(&(ou=Marketing)(|(manager=cn=Julie Fulmer,ou=Marketing,dc=siroe,dc=com)(manager=cn=Cindy Zwaska,ou=Marketing,dc=siroe,dc=com)))</td>
<td>所有组织单元为 Marketing 且 manager 为 Julie Fulmer 或 Cindy Zwaska 的条目</td>
</tr>
<tr>
<td>(!(objectClass=person))</td>
<td>返回所有不代表人员的条目</td>
</tr>
<tr>
<td>(&(!(objectClass=person))(cn~=printer3b))</td>
<td>所有不代表人员且通用名近似于 printer3b 的条目</td>
</tr>
</tbody>
</table>
<p> <strong>域同步到OA设置 - 同步方式:</strong> 包含 <strong>手工同步、自动同步、手工和自动同步</strong> 三种,自动同步时可以设置同步频率<br>
<strong>域同步到OA设置 - 同步频率:</strong> 包含 <strong>按天、按周、按月、按年</strong> 四种<br>
<strong>OA同步到域设置:</strong> OA反向同步到域,E8标准产品中只能修改域中的密码<br>
<strong>OA同步到域设置 - 修改AD密码:</strong> 将OA中的用户密码同步到AD域中<br>
<strong>OA同步到域设置 - 绕过证书:</strong> 是否绕过AD域证书<br>
<strong>OA同步到域设置 - LDAP服务器地址(OA->域):</strong> OA反向同步到AD域时使用到的服务器地址<br>
<strong>OA同步到域设置 - 证书路径:</strong> OA服务器上存放CA证书的路径,此设置需重启服务才能生效<br>
<strong>OA同步到域设置 - 证书密码:</strong> CA证书的密码,此设置需重启服务才能生效<br>
<strong>OA同步到域设置 - AD域密码策略:</strong> 提示语设置,可根据LDAP密码策略自由设置密码不符合LDAP密码策略时的提示信息<br>
<strong>同步黑名单 - 人员黑名单:</strong> 配置AD同步到OA时,不需要同步的人员信息,对应AD中的sAMAccountName,账号之间以英文逗号隔开<br>
<img src="image/ldap08.png" alt="LDAP集成"><br>
开启 <strong>同步组织结构</strong> 后自动带出 <strong>OU组织类型设置、分部对应设置、分部同步字段对应设置、部门同步字段对应设置</strong><br>
<img src="image/ldap09.png" alt="LDAP集成"><br>
<strong>OU组织类型设置:</strong> 设置AD中的OU在OA中是属于部门还是分部<br>
<img src="image/ldap10.png" alt="LDAP集成"><br>
<strong>分部对应设置:</strong> 指定域中的组织结构和OA中的分部对应关系(目前只支持一级分部的同步)<br>
例如:下图中的同步域为OU=zxjtest,DC=lw,DC=com<br>
<span style="background:yellow"><strong>注意:</strong> OU中出现 \ 时,需要写成 <strong>\\</strong></span><br>
<img src="image/ldap11.png" alt="LDAP集成"><br>
<strong>分部同步字段对应设置:</strong> 设置AD中的组织结构与OA中分部的字段对应关系,如果为AD中的属性,应当以 <strong>$</strong> 开头。如下图中所示示例的 <strong>$description</strong> 和 <strong>$name</strong><br>
<img src="image/ldap12.png" alt="LDAP集成"><br>
<strong>部门同步字段对应设置:</strong> 设置AD中的组织结构与OA中部门的字段对应关系,如果为AD中的属性,应当以 <strong>$</strong> 开头。如下图中所示示例的 <strong>$name</strong><br>
<img src="image/ldap13.png" alt="LDAP集成"><br>
<strong>人员同步对应关系设置:</strong> 设置AD中的人员与OA中人员的字段对应关系,如果为AD中的属性,应当以 <strong>$</strong> 开头。如下图中所示示例的 <strong>$cn</strong>、<strong>$samaccountname</strong>、<strong>$whencreated</strong><br>
<img src="image/ldap14.png" alt="LDAP集成"><br>
<strong>数据同步:</strong> 进行手动同步,并可查看同步数据日志<br>
<strong>全部同步:</strong> 系统和LDAP进行数据同步,同步LDAP所有符合条件的数据<br>
<strong>日期同步:</strong> 系统和LDAP同步时,只同步LDAP中whenchanged大于指定日期的数据<br>
<img src="image/ldap15.png" alt="LDAP集成"><br>
<strong>同步Ldap数据:</strong> 同步成功后会显示所同步的数据<br>
<img src="image/ldap16.png" alt="LDAP集成"><br>
<strong>账号合并:</strong> 这是为了解决在OA中已经建立了人员,但是未及时赋予账号的时候进行AD同步导致出现OA中出现重复人员的问题,账号合并可以将重复人员信息合并<br>
<img src="image/ldap17.png" alt="LDAP集成"><br>
点击 <strong>合并</strong> 按钮后,将ldap账号和OA人员关联起来后合并即可<br>
<img src="image/ldap18.png" alt="LDAP集成"><br>
<strong>批量指定人员部门:</strong> 当只同步人员到OA时,同步过来的人员是没有部门的,需要对这些人进行指定部门的操作<br>
<img src="image/ldap19.png" alt="LDAP集成"></p>
<H3 id=2 style="border-left: 4px solid #3677D5;height:42px;line-height:42px;background:#F4F4F4"><font color=#08C size=4 face="PingFangSC-Semibold" > 开发相关</font></H3>
<ol>
<li><strong>数据库相关</strong>
<ol>
<li>LDAP集成设置数据表: <strong>ldapset</strong></li>
<li>OU组织类型设置数据表: <strong>ldapsetoutype</strong></li>
<li>分部同步字段对应设置数据表: <strong>ldapsetsubparam</strong></li>
<li>部门同步字段对应设置数据表: <strong>ldapsetdepparam</strong></li>
<li>人员同步字段对应设置数据表: <strong>ldapsetparam</strong></li>
</ol>
</li>
<li><strong>代码相关</strong>
<ol>
<li>LDAP集成设置页面: <strong>/integration/ldapsetting.jsp</strong></li>
<li>LDAP同步处理类: <strong>weaver.ldap.LdapUtil</strong>
<ol>
<li>全部同步方法: <strong>export</strong></li>
<li>日期同步方法: <strong>exportByTime</strong></li>
<li>同步组织架构方法: <strong>synOrganization</strong></li>
<li>只同步人员的方法:<strong>exportWithoutOrg</strong></li>
</ol>
</li>
</ol>
</li>
</ol>
</body>
</html>