|
11 | 11 | # information: "Portions Copyright [year] [name of copyright owner]".
|
12 | 12 | #
|
13 | 13 | # Portions Copyright 2015 ForgeRock AS.
|
| 14 | +# Portions Copyright 2024 3A Systems LLC. |
14 | 15 |
|
15 | 16 | # Captured dsconfig command to replace anonymous read access with authenticated access.
|
16 | 17 | # Edit this script to match your deployment.
|
|
24 | 25 | # If the global-aci settings are different on your OpenDJ server,
|
25 | 26 | # generate this script for that server as described in the documentation.
|
26 | 27 | #
|
| 28 | +# The following command sequence utilizes single quote encapsulation |
| 29 | +# of the `global-aci` value. This is simply to avoid |
| 30 | +# the need for extensive character escapes. If the quotes are removed, |
| 31 | +# the user will need to manually escape certain characters, such as pipe |
| 32 | +# (`|`) or exclamation points (`!`) to |
| 33 | +# avoid shell errors. |
| 34 | + |
27 | 35 | dsconfig set-access-control-handler-prop \
|
28 |
| - --remove global-aci:\(targetattr!=\"userPassword\|\|authPassword\|\|debugsearchindex\|\|changes\|\|changeNumber\|\|changeType\|\|changeTime\|\|targetDN\|\|newRDN\|\|newSuperior\|\|deleteOldRDN\"\)\(version\ 3.0\;\ acl\ \"Anonymous\ read\ access\"\;\ allow\ \(read,search,compare\)\ userdn=\"ldap:///anyone\"\;\) \ |
29 |
| - --remove global-aci:\(targetattr=\"createTimestamp\|\|creatorsName\|\|modifiersName\|\|modifyTimestamp\|\|entryDN\|\|entryUUID\|\|subschemaSubentry\|\|etag\|\|governingStructureRule\|\|structuralObjectClass\|\|hasSubordinates\|\|numSubordinates\"\)\(version\ 3.0\;\ acl\ \"User-Visible\ Operational\ Attributes\"\;\ allow\ \(read,search,compare\)\ userdn=\"ldap:///anyone\"\;\) \ |
30 |
| - --add global-aci:\(targetattr!=\"userPassword\|\|authPassword\|\|debugsearchindex\|\|changes\|\|changeNumber\|\|changeType\|\|changeTime\|\|targetDN\|\|newRDN\|\|newSuperior\|\|deleteOldRDN\"\)\(version\ 3.0\;\ acl\ \"Authenticated\ read\ access\"\;\ allow\(read,search,compare\)\ userdn=\"ldap:///all\"\;\) \ |
31 |
| - --add global-aci:\(targetattr=\"createTimestamp\|\|creatorsName\|\|modifiersName\|\|modifyTimestamp\|\|entryDN\|\|entryUUID\|\|subschemaSubentry\|\|etag\|\|governingStructureRule\|\|structuralObjectClass\|\|hasSubordinates\|\|numSubordinates\"\)\(version\ 3.0\;\ acl\ \"User-Visible\ Operational\ Attributes\"\;\ allow\(read,search,compare\)\ userdn=\"ldap:///all\"\;\) \ |
32 |
| - --hostname opendj.example.com \ |
33 |
| - --port 4444 \ |
34 |
| - --trustStorePath /path/to/opendj/config/admin-truststore \ |
35 |
| - --bindDN cn=Directory\ Manager \ |
36 |
| - --bindPassword ****** \ |
37 |
| - --no-prompt |
| 36 | + --remove=global-aci:'(targetattr!="userPassword||authPassword||changes|| |
| 37 | + changeNumber||changeType||changeTime||targetDN||newRDN|| |
| 38 | + newSuperior||deleteOldRDN||targetEntryUUID||changeInitiatorsName|| |
| 39 | + changeLogCookie||includedAttributes")(version 3.0; acl "Anonymous |
| 40 | + read access"; allow (read,search,compare) userdn="ldap:///anyone";)' \ |
| 41 | + --hostname=opendj.example.com \ |
| 42 | + --port=4444 \ |
| 43 | + --bindDN=cn=Directory\ Manager \ |
| 44 | + --bindPassword=password \ |
| 45 | + --trustAll \ |
| 46 | + --no-prompt |
38 | 47 |
|
0 commit comments