Skip to content

Commit

Permalink
Reduce character escaping in example, add note (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximthomas authored Oct 1, 2024
1 parent c19cb1e commit 7f9b45d
Showing 1 changed file with 19 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# information: "Portions Copyright [year] [name of copyright owner]".
#
# Portions Copyright 2015 ForgeRock AS.
# Portions Copyright 2024 3A Systems LLC.

# Captured dsconfig command to replace anonymous read access with authenticated access.
# Edit this script to match your deployment.
Expand All @@ -24,15 +25,23 @@
# If the global-aci settings are different on your OpenDJ server,
# generate this script for that server as described in the documentation.
#
# The following command sequence utilizes single quote encapsulation
# of the `global-aci` value. This is simply to avoid
# the need for extensive character escapes. If the quotes are removed,
# the user will need to manually escape certain characters, such as pipe
# (`|`) or exclamation points (`!`) to
# avoid shell errors.

dsconfig set-access-control-handler-prop \
--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\"\;\) \
--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\"\;\) \
--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\"\;\) \
--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\"\;\) \
--hostname opendj.example.com \
--port 4444 \
--trustStorePath /path/to/opendj/config/admin-truststore \
--bindDN cn=Directory\ Manager \
--bindPassword ****** \
--no-prompt
--remove=global-aci:'(targetattr!="userPassword||authPassword||changes||
changeNumber||changeType||changeTime||targetDN||newRDN||
newSuperior||deleteOldRDN||targetEntryUUID||changeInitiatorsName||
changeLogCookie||includedAttributes")(version 3.0; acl "Anonymous
read access"; allow (read,search,compare) userdn="ldap:///anyone";)' \
--hostname=opendj.example.com \
--port=4444 \
--bindDN=cn=Directory\ Manager \
--bindPassword=password \
--trustAll \
--no-prompt

0 comments on commit 7f9b45d

Please sign in to comment.