summaryrefslogtreecommitdiffstats
path: root/install/updates/40-delegation.update
blob: 77dca721d21f86c4f97ed6daf5a651dd00c971bf (plain)
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
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
# Add the default roles 

dn: cn=helpdesk,cn=rolegroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: helpdesk
add:description: Helpdesk

dn: cn=useradmin,cn=rolegroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: useradmin
add:description: User Administrators

dn: cn=groupadmin,cn=rolegroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: groupadmin
add:description: Group Administrators

dn: cn=hostadmin,cn=rolegroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: hostadmin
add:description: Host Administrators

dn: cn=hostgroupadmin,cn=rolegroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: hostgroupadmin
add:description: Host Group Administrators

dn: cn=delegationadmin,cn=rolegroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: delegationadmin
add:description: Role administration

dn: cn=serviceadmin,cn=rolegroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: serviceadmin
add:description: Service Administrators

dn: cn=automountadmin,cn=rolegroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: automountadmin
add:description: Automount Administrators

dn: cn=netgroupadmin,cn=rolegroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: netgroupadmin
add:description: Netgroups Administrators

dn: cn=dnsadmin,cn=rolegroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: dnsadmin
add:description: DNS Administrators

dn: cn=dnsserver,cn=rolegroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: dnsserver
add:description: DNS Servers

dn: cn=certadmin,cn=rolegroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: certadmin
add:description: Certificate Administrators

dn: cn=replicaadmin,cn=rolegroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: replicaadmin
add:description: Replication Administrators
add:member:'uid=admin,cn=users,cn=accounts,$SUFFIX'

# Add the taskgroups referenced by the ACIs for user administration

dn: cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: nsContainer
add:objectClass: top
add:cn: taskgroups

dn: cn=addusers,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: addusers
add:description: Add Users
add:member:'cn=useradmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=change_password,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: change_password
add:description: Change a user password
add:member:'cn=useradmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=add_user_to_default_group,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: add_user_to_default_group
add:description: Add user to default group
add:member:'cn=useradmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=removeusers,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: removeusers
add:description: Remove Users
add:member:'cn=useradmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=modifyusers,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: modifyusers
add:description: Modify Users
add:member:'cn=useradmin,cn=rolegroups,cn=accounts,$SUFFIX'

# Add the ACIs that grant these permissions for user administration

dn: $SUFFIX
add:aci: '(target = "ldap:///uid=*,cn=users,cn=accounts,$SUFFIX")(version
  3.0;acl "Add Users";allow (add) groupdn = "ldap:///cn=addusers,cn=taskgroups
 ,cn=accounts,$SUFFIX";)'
add:aci: '(targetattr = "userPassword || krbPrincipalKey || sambaLMPassword || samb
 aNTPassword || passwordHistory")(version 3.0;acl "change_password";allow (wri
 te) groupdn = "ldap:///cn=change_password,cn=taskgroups,cn=accounts,$SUFFIX
 ";)'
add:aci: '(targetattr = "member")(target = "ldap:///cn=ipausers,cn=groups,cn=accoun
 ts,$SUFFIX")(version 3.0;acl "Add user to default group";allow (wri
 te) groupdn = "ldap:///cn=add_user_to_default_group,cn=taskgroups,cn=accounts
 ,$SUFFIX";)'
add:aci: '(target = "ldap:///uid=*,cn=users,cn=accounts,$SUFFIX")(version
  3.0;acl "Remove Users";allow (delete) groupdn = "ldap:///cn=removeusers,cn=t
 askgroups,cn=accounts,$SUFFIX";)'
add:aci: '(targetattr = "givenName || sn || cn || displayName || title || initials 
 || loginShell || gecos || homePhone || mobile || pager || facsimileTelephoneN
 umber || telephoneNumber || street || roomNumber || l || st || postalCode || 
 manager || secretary || description || carLicense || labeledURI || inetUserHT
 TPURL || seeAlso || employeeType || businessCategory || ou")(target = "ldap:/
 //uid=*,cn=users,cn=accounts,$SUFFIX")(version 3.0;acl "Modify User
 s";allow (write) groupdn = "ldap:///cn=modifyusers,cn=taskgroups,cn=accounts,
 $SUFFIX";)'

# Add the taskgroups referenced by the ACIs for group administration

dn: cn=addgroups,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: addgroups
add:description: Add Groups
add:member:'cn=groupadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=removegroups,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: removegroups
add:description: Remove Groups
add:member:'cn=groupadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=modifygroups,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: modifygroups
add:description: Modify Groups
add:member:'cn=groupadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=modifygroupmembership,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: modifygroupmembership
add:description: Modify Group membership
add:member:'cn=groupadmin,cn=rolegroups,cn=accounts,$SUFFIX'

# Add the ACIs that grant these permissions for group administration

dn: $SUFFIX
add:aci: '(target = "ldap:///cn=*,cn=groups,cn=accounts,$SUFFIX")(version
  3.0;acl "Add Groups";allow (add) groupdn = "ldap:///cn=addgroups,cn=taskgroups
 ,cn=accounts,$SUFFIX";)'
add:aci: '(targetattr = "member")(target = "ldap:///cn=*,cn=groups,cn=accoun
 ts,$SUFFIX")(version 3.0;acl "Modify group membership";allow (wri
 te) groupdn = "ldap:///cn=modifygroupmembership,cn=taskgroups,cn=accounts
 ,$SUFFIX";)'
add:aci: '(target = "ldap:///cn=*,cn=groups,cn=accounts,$SUFFIX")(version
  3.0;acl "Remove Groups";allow (delete) groupdn = "ldap:///cn=removegroups,cn=t
 askgroups,cn=accounts,$SUFFIX";)'
# we need objectclass and gidnumber in modify so a non-posix group can be
# promoted
add:aci: '(targetattr = "cn || description || gidnumber || objectclass")(target
  = "ldap:///cn=*,cn=groups,cn=accounts,$SUFFIX")(version 3.0;acl "Modify Group
 s";allow (write) groupdn = "ldap:///cn=modifygroups,cn=taskgroups,cn=accounts,
 $SUFFIX";)'

# Add the taskgroups referenced by the ACIs for host administration

dn: cn=addhosts,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: addhosts
add:description: Add Hosts
add:member:'cn=hostadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=removehosts,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: removehosts
add:description: Remove Hosts
add:member:'cn=hostadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=modifyhosts,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: modifyhosts
add:description: Modify Hosts
add:member:'cn=hostadmin,cn=rolegroups,cn=accounts,$SUFFIX'

# Add the ACIs that grant these permissions for host administration

dn: $SUFFIX
add:aci: '(target = "ldap:///fqdn=*,cn=computers,cn=accounts,$SUFFIX")(version
  3.0;acl "Add Hosts";allow (add) groupdn = "ldap:///cn=addhosts,cn=taskgroups
 ,cn=accounts,$SUFFIX";)'
add:aci: '(target = "ldap:///fqdn=*,cn=computers,cn=accounts,$SUFFIX")(version
  3.0;acl "Remove Hosts";allow (delete) groupdn = "ldap:///cn=removehosts,cn=
 taskgroups,cn=accounts,$SUFFIX";)'
add:aci: '(targetattr = "cn || description || l || location ||
 nshardwareplatform || nsosversion")
 (target = "ldap:///fqdn=*,cn=computers,cn=accounts,$SUFFIX")(version 3.0;
 acl "Modify Hosts";allow (write) groupdn = "ldap:///cn=modifyhosts,
 cn=taskgroups,cn=accounts,$SUFFIX";)'

# Add the taskgroups referenced by the ACIs for hostgroup administration

dn: cn=addhostgroups,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: addhostgroups
add:description: Add Host Groups
add:member:'cn=hostgroupadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=removehostgroups,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: removehostgroups
add:description: Remove Host Groups
add:member:'cn=hostgroupadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=modifyhostgroups,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: modifyhostgroups
add:description: Modify Host Groups
add:member:'cn=hostgroupadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=modifyhostgroupmembership,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: modifyhostgroupmembership
add:description: Modify Host Group membership
add:member:'cn=hostgroupadmin,cn=rolegroups,cn=accounts,$SUFFIX'

# Add the ACIs that grant these permissions for hostgroup administration

dn: $SUFFIX
add:aci: '(target = "ldap:///cn=*,cn=hostgroups,cn=accounts,$SUFFIX")(version
  3.0;acl "Add Hosts";allow (add) groupdn = "ldap:///cn=addhostgroups,cn=
 taskgroups,cn=accounts,$SUFFIX";)'
add:aci: '(target = "ldap:///cn=*,cn=hostgroups,cn=accounts,$SUFFIX")(version
  3.0;acl "Remove Hosts";allow (delete) groupdn = "ldap:///cn=
 removehostgroups,cn=taskgroups,cn=accounts,$SUFFIX";)'
add:aci: '(targetattr = "cn || description")(target = "ldap:///cn=*,cn=
 hostgroups,cn=accounts,$SUFFIX")(version 3.0; acl "Modify Hosts";allow
  (write) groupdn = "ldap:///cn=modifyhostgroups,cn=taskgroups,
 cn=accounts,$SUFFIX";)'
add:aci: '(targetattr = "member")(target = "ldap:///cn=*,cn=hostgroups,cn=accoun
 ts,$SUFFIX")(version 3.0;acl "Modify host group membership";allow (wri
 te) groupdn = "ldap:///cn=modifyhostgroupmembership,cn=taskgroups,cn=accounts
 ,$SUFFIX";)'

# Add the taskgroups referenced by the ACIs for service administration

dn: cn=addservices,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: addservices
add:description: Add Services
add:member:'cn=serviceadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=removeservices,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: removeservices
add:description: Remove Services
add:member:'cn=serviceadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=modifyservices,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: modifyservices
add:description: Modify Services
add:member:'cn=serviceadmin,cn=rolegroups,cn=accounts,$SUFFIX'

# Add the ACIs that grant these permissions for service administration

dn: $SUFFIX
add:aci: '(target = "ldap:///krbprincipalname=*,cn=services,cn=accounts,
 $SUFFIX")(version 3.0;acl "Add Services";allow (add) groupdn = "ldap:///cn
 =addservices,cn=taskgroups,cn=accounts,$SUFFIX";)'
add:aci: '(target = "ldap:///krbprincipalname=*,cn=services,cn=accounts,
 $SUFFIX")(version 3.0;acl "Remove Services";allow (delete) groupdn = "ldap
 :///cn=removeservices,cn=taskgroups,cn=accounts,$SUFFIX";)'
add:aci: '(targetattr = "userCertificate")(target = "ldap:///krbprincipal
 name=*,cn=services,cn=accounts,$SUFFIX")(version 3.0;acl "Modify Services"
 ;allow (write) groupdn = "ldap:///cn=modifyservices,cn=taskgroups,cn=acco
 unts,$SUFFIX";)'

# Add the taskgroups referenced by the ACIs for delegation administration
# This just lets one manage taskgroup membership and create and delete roles

dn: cn=addroles,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: addhrole
add:description: Add Roles
add:member:'cn=delegationadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=removeroles,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: removeroles
add:description: Remove Roles
add:member:'cn=delegationadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=modifyroles,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: modifyroles
add:description: Modify Roles
add:member:'cn=delegationadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=modifyrolegroupmembership,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: modifyrolegroupmembership
add:description: Modify Role Group membership
add:member:'cn=delegationadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=modifytaskgroupmembership,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: modifytaskgroupmembership
add:description: Modify Task Group membership
add:member:'cn=delegationadmin,cn=rolegroups,cn=accounts,$SUFFIX'

# Add the ACIs that grant these permissions for delegation administration

dn: $SUFFIX
add:aci: '(target = "ldap:///cn=*,cn=rolegroups,cn=accounts,$SUFFIX")(version
  3.0;acl "Add Roles";allow (add) groupdn = "ldap:///cn=addroles,cn=taskgroups
 ,cn=accounts,$SUFFIX";)'
add:aci: '(target = "ldap:///cn=*,cn=rolegroups,cn=accounts,$SUFFIX")(version
  3.0;acl "Remove Roles";allow (delete) groupdn = "ldap:///cn=removeroles,cn=
 taskgroups,cn=accounts,$SUFFIX";)'
add:aci: '(targetattr = "cn || description")(target = "ldap:///cn=*,cn=rolegro
 ups,cn=accounts,$SUFFIX")(version 3.0; acl "Modify Roles";allow (write) grou
 pdn = "ldap:///cn=modifyroles,cn=taskgroups,cn=accounts,$SUFFIX";)'
add:aci: '(targetattr = "member")(target = "ldap:///cn=*,cn=rolegroups,cn=accoun
 ts,$SUFFIX")(version 3.0;acl "Modify role group membership";allow (wri
 te) groupdn = "ldap:///cn=modifyrolegroupmembership,cn=taskgroups,cn=accounts
 ,$SUFFIX";)'
add:aci: '(targetattr = "member")(target = "ldap:///cn=*,cn=taskgroups,cn=accoun
 ts,$SUFFIX")(version 3.0;acl "Modify task group membership";allow (wri
 te) groupdn = "ldap:///cn=modifytaskgroupmembership,cn=taskgroups,cn=accounts
 ,$SUFFIX";)'

# Add the taskgroups referenced by the ACIs for automount administration

dn: cn=addautomount,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: addautomount
add:description: Add Automount maps/keys
add:member:'cn=automountadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=removeautomount,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: removeautomount
add:description: Remove Automount maps/keys
add:member:'cn=automountadmin,cn=rolegroups,cn=accounts,$SUFFIX'

# Add the ACIs that grant these permissions for service administration

dn: $SUFFIX
add:aci: '(target = "ldap:///automountmapname=*,cn=automount,
 $SUFFIX")(version 3.0;acl "Add automount maps";allow (add) groupdn = "ldap
 :///cn=addautomount,cn=taskgroups,cn=accounts,$SUFFIX";)'
add:aci: '(target = "ldap:///automountmapname=*,cn=automount,
 $SUFFIX")(version 3.0;acl "Remove automount maps";allow (delete) groupdn =
  "ldap:///cn=removeautomount,cn=taskgroups,cn=accounts,$SUFFIX";)'
add:aci: '(target = "ldap:///automountkey=*,automountmapname=*,cn=automount,
 $SUFFIX")(version 3.0;acl "Add automount keys";allow (add) groupdn = "ldap
 :///cn=addautomount,cn=taskgroups,cn=accounts,$SUFFIX";)'
add:aci: '(target = "ldap:///automountkey=*,automountmapname=*,cn=automount,
 $SUFFIX")(version 3.0;acl "Remove automount keys";allow (delete) groupdn =
  "ldap:///cn=removeautomount,cn=taskgroups,cn=accounts,$SUFFIX";)'

# Add the taskgroups referenced by the ACIs for netgroup administration

dn: cn=addnetgroups,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: addnetgroups
add:description: Add netgroups
add:member:'cn=netgroupadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=removenetgroups,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: removenetgroups
add:description: Remove netgroups
add:member:'cn=netgroupadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=modifynetgroups,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: modifynetgroups
add:description: Modify netgroups
add:member:'cn=netgroupadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: cn=modifynetgroupmembership,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: modifynetgroupmembership
add:description: Modify netgroup membership
add:member:'cn=netgroupadmin,cn=rolegroups,cn=accounts,$SUFFIX'

# Add the ACIs that grant these permissions for netgroup administration

dn: $SUFFIX
add:aci: '(target = "ldap:///ipauniqueid=*,cn=ng,cn=alt,$SUFFIX")(version
  3.0;acl "Add netgroups";allow (add) groupdn = "ldap:///cn=addnetgroups,cn=
 taskgroups,cn=accounts,$SUFFIX";)'
add:aci: '(target = "ldap:///ipauniqueid=*,cn=ng,cn=alt,$SUFFIX")(version
  3.0;acl "Remove netgroups";allow (delete) groupdn = "ldap:///cn=
 removenetgroups,cn=taskgroups,cn=accounts,$SUFFIX";)'
add:aci: '(targetattr = "description")(target = "ldap:///ipauniqueid=*,cn=ng,
 cn=alt,$SUFFIX")(version 3.0; acl "Modify netgroups";allow (write) groupdn 
 = "ldap:///cn=modifynetgroups,cn=taskgroups,cn=accounts,$SUFFIX";)'
add:aci: '(targetattr = "memberhost || externalhost || memberuser || member")
 (target = "ldap:///ipauniqueid=*,cn=ng,cn=alt,$SUFFIX")(version 3.0;acl "Mo
 dify netgroup membership";allow (write) groupdn = "ldap:///cn=modifynetgrou
 pmembership,cn=taskgroups,cn=accounts,$SUFFIX";)'

# Taskgroup for retrieving host keytabs
dn: cn=manage_host_keytab,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: manage_host_keytab
add:description: Manage host keytab
add:member:'cn=hostadmin,cn=rolegroups,cn=accounts,$SUFFIX'

# Add the ACI needed to do host keytab admin
dn: $SUFFIX
add:aci: '(targetattr = "krbPrincipalKey || krbLastPwdChange")
  (target = "ldap:///fqdn=*,cn=computers,cn=accounts,$SUFFIX")
  (version 3.0;acl "Manage host keytab";
  allow (write) groupdn = "ldap:///cn=manage_host_keytab,cn=taskgroups,
  cn=accounts,$SUFFIX";)'

# Taskgroup for enrolling hosts. Note that this also requires
# manage_host_keytab access
dn: cn=enroll_host,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: enroll_host
add:description: Enroll a host
add:member:'cn=hostadmin,cn=rolegroups,cn=accounts,$SUFFIX'

# Add the ACI needed to do host enrollment. When this occurs we
# set the krbPrincipalName, add krbPrincipalAux to objectClass and
# set enrolledBy to whoever ran join.
dn: $SUFFIX
add:aci: '(targetattr = "krbPrincipalName || enrolledBy || objectClass")
  (target = "ldap:///fqdn=*,cn=computers,cn=accounts,$SUFFIX")
  (version 3.0;acl "Enroll a host";
  allow (write) groupdn = "ldap:///cn=enroll_host,cn=taskgroups,
  cn=accounts,$SUFFIX";)'

# Taskgroup for updating the DNS entries
dn: cn=update_dns,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: update_sn
add:description: Updates DNS
add:member:'cn=dnsadmin,cn=rolegroups,cn=accounts,$SUFFIX'
add:member:'cn=dnsserver,cn=rolegroups,cn=accounts,$SUFFIX'

# Create virtual operations entry. This is used to control access to
# operations that don't rely on LDAP directly.
dn: cn=virtual operations,$SUFFIX
add:objectClass: top
add:objectClass: nsContainer
add:cn: virtual operations

# Retrieve Certificate virtual op
dn: cn=retrieve certificate,cn=virtual operations,$SUFFIX
add:objectClass: top
add:objectClass: nsContainer
add:cn: retrieve certificate

# Taskgroup for retrieving certs
dn: cn=retrieve_certs,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: retrieve_certs
add:description: Retrieve SSL Certificates
add:member:'cn=certadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: $SUFFIX
add: aci: '(targetattr = "objectClass")(target =
 "ldap:///cn=retrieve certificate,cn=virtual operations,
 $SUFFIX" )(version 3.0 ; acl "Retrieve Certificates from the
  CA" ; allow (write) groupdn = "ldap:///cn=retrieve_certs,cn=taskgroups,
 cn=accounts,$SUFFIX";)'

# Request Certificate virtual op
dn: cn=request certificate,cn=virtual operations,$SUFFIX
add:objectClass: top
add:objectClass: nsContainer
add:cn: request certificate

# Taskgroup for requesting certs
dn: cn=request_certs,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: request_certs
add:description: Request a SSL Certificate
add:member:'cn=certadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: $SUFFIX
add: aci: '(targetattr = "objectClass")(target =
 "ldap:///cn=request certificate,cn=virtual operations,
 $SUFFIX" )(version 3.0 ; acl "Request Certificates from the
  CA" ; allow (write) groupdn = "ldap:///cn=request_certs,cn=taskgroups,
 cn=accounts,$SUFFIX";)'

# Request Certificate from different host virtual op
dn: cn=request certificate different host,cn=virtual operations,$SUFFIX
add:objectClass: top
add:objectClass: nsContainer
add:cn: request certificate different host

# Taskgroup for requesting certs from a different host
dn: cn=request_cert_different_host,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: request_cert_different_host
add:description: Request a SSL Certificate from a different host
add:member:'cn=certadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: $SUFFIX
add: aci: '(targetattr = "objectClass")(target =
 "ldap:///cn=request certificate different host,cn=virtual operations,
 $SUFFIX" )(version 3.0 ; acl "Request Certificates from a
  different host" ; allow (write) groupdn = "ldap:///cn=request_cert
 _different_host,cn=taskgroups,cn=accounts,$SUFFIX";)'

# Certificate Status virtual op
dn: cn=certificate status,cn=virtual operations,$SUFFIX
add:objectClass: top
add:objectClass: nsContainer
add:cn: certificate status

# Taskgroup for requesting certs
dn: cn=certificate_status,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: certificate_status
add:description: Status of cert request
add:member:'cn=certadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: $SUFFIX
add: aci: '(targetattr = "objectClass")(target =
 "ldap:///cn=certificate status,cn=virtual operations,
 $SUFFIX" )(version 3.0 ; acl "Get Certificates status from the
  CA" ; allow (write) groupdn = "ldap:///cn=certificate_status,
 cn=taskgroups,cn=accounts,$SUFFIX";)'

# Revoke Certificate virtual op
dn: cn=revoke certificate,cn=virtual operations,$SUFFIX
add:objectClass: top
add:objectClass: nsContainer
add:cn: revoke certificate

# Taskgroup for requesting certs
dn: cn=revoke_certificate,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: revoke_certificate
add:description: Revoke Certificate
add:member:'cn=certadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: $SUFFIX
add: aci: '(targetattr = "objectClass")(target =
 "ldap:///cn=revoke certificate,cn=virtual operations,
 $SUFFIX" )(version 3.0 ; acl "Revoke Certificate"
  ; allow (write) groupdn = "ldap:///cn=revoke_certificate,
 cn=taskgroups,cn=accounts,$SUFFIX";)'

# Revoke Certificate virtual op
dn: cn=revoke certificate,cn=virtual operations,$SUFFIX
add:objectClass: top
add:objectClass: nsContainer
add:cn: revoke certificate

# Taskgroup for requesting certs
dn: cn=revoke_certificate,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: revoke_certificate
add:description: Revoke Certificate
add:member:'cn=certadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: $SUFFIX
add: aci: '(targetattr = "objectClass")(target =
 "ldap:///cn=revoke certificate,cn=virtual operations,
 $SUFFIX" )(version 3.0 ; acl "Revoke Certificate"
  ; allow (write) groupdn = "ldap:///cn=revoke_certificate,
 cn=taskgroups,cn=accounts,$SUFFIX";)'

# Certificate Remove Hold virtual op
dn: cn=certificate remove hold,cn=virtual operations,$SUFFIX
add:objectClass: top
add:objectClass: nsContainer
add:cn: certificate remove hold

# Taskgroup for requesting certs
dn: cn=certificate_remove_hold,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: certificate_remove_hold
add:description: Certificate Remove Hold
add:member:'cn=certadmin,cn=rolegroups,cn=accounts,$SUFFIX'

dn: $SUFFIX
add: aci: '(targetattr = "objectClass")(target =
 "ldap:///cn=certificate remove hold,cn=virtual operations,
 $SUFFIX" )(version 3.0 ; acl "Certificate Remove Hold"
  ; allow (write) groupdn = "ldap:///cn=certificate_remove_hold,
 cn=taskgroups,cn=accounts,$SUFFIX";)'

# Taskgroup for managing replicas
dn: cn=managereplica,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: managereplica
add:description: Manage Replication Agreements
add:member:'cn=replicaadmin,cn=rolegroups,cn=accounts,$SUFFIX'

# Taskgroup for deleting replicas
dn: cn=deletereplica,cn=taskgroups,cn=accounts,$SUFFIX
add:objectClass: top
add:objectClass: nestedgroup
add:cn: deletereplica
add:description: Delete Replication Agreements
add:member:'cn=replicaadmin,cn=rolegroups,cn=accounts,$SUFFIX'

# Add acis allowing admins to read/write/delete replicas
dn: cn="$SUFFIX",cn=mapping tree,cn=config
add: aci: '(targetattr=*)(targetfilter="(|(objectclass=nsds5Replica)
 (objectclass=nsds5replicationagreement)(objectclass=
 nsDSWindowsReplicationAgreement))")(version 3.0; acl "Manage
  replication agreements"; allow (read, write, search) groupdn =
  "ldap:///cn=managereplica,cn=taskgroups,cn=accounts,$SUFFIX";)'

dn: cn="$SUFFIX",cn=mapping tree,cn=config
add: aci: '(targetattr=*)(targetfilter="(|(objectclass=
 nsds5replicationagreement)(objectclass=nsDSWindowsReplicationAgreement
 ))")(version 3.0;acl "Delete replication agreements";allow (delete)
  groupdn = "ldap:///cn=deletereplica,cn=taskgroups,cn=accounts,$SUFFIX";)'