Fix global ACI target evaluation to support root DSE. Issue 1623.
| | |
| | | ds-cfg-global-aci: (targetattr!="userPassword||authPassword")(version 3.0; acl "Anonymous read access"; allow (read,search,compare) userdn="ldap:///anyone";) |
| | | ds-cfg-global-aci: (targetattr="*")(version 3.0; acl "Self entry modification"; allow (write) userdn="ldap:///self";) |
| | | ds-cfg-global-aci: (target="ldap:///cn=schema")(targetscope="base")(targetattr="attributeTypes||dITContentRules||dITStructureRules||ldapSyntaxes||matchingRules||matchingRuleUse||nameForms||objectClasses")(version 3.0; acl "User-Visible Schema Operational Attributes"; allow (read,search,compare) userdn="ldap:///anyone";) |
| | | ds-cfg-global-aci: (targetattr="namingContexts||supportedAuthPasswordSchemes||supportedControl||supportedExtension||supportedFeatures||supportedSASLMechanisms||vendorName||vendorVersion")(version 3.0; acl "User-Visible Root DSE Operational Attributes"; allow (read,search,compare) userdn="ldap:///anyone";) |
| | | ds-cfg-global-aci: (target="ldap:///")(targetscope="base")(targetattr="namingContexts||supportedAuthPasswordSchemes||supportedControl||supportedExtension||supportedFeatures||supportedSASLMechanisms||vendorName||vendorVersion")(version 3.0; acl "User-Visible Root DSE Operational Attributes"; allow (read,search,compare) userdn="ldap:///anyone";) |
| | | ds-cfg-global-aci: (targetattr="createTimestamp||creatorsName||modifiersName||modifyTimestamp||entryDN||subschemaSubentry")(version 3.0; acl "User-Visible Operational Attributes"; allow (read,search,compare) userdn="ldap:///anyone";) |
| | | cn: Access Control Handler |
| | | ds-cfg-acl-handler-class: org.opends.server.authorization.dseecompat.AciProvider |
| | |
| | | "(ldap:///[^\\|]+)"; |
| | | |
| | | /** |
| | | * String used to check for NULL ldap URL. |
| | | */ |
| | | public static final String NULL_LDAP_URL = "ldap:///"; |
| | | |
| | | /** |
| | | * Regular expression used to match token that joins expressions (||). |
| | | */ |
| | | public static final String LOGICAL_OR = "\\|\\|"; |
| | |
| | | throws AciException { |
| | | this.operator = operator; |
| | | try { |
| | | if (!Pattern.matches(LDAP_URL, target)) { |
| | | //The NULL_LDAP_URL corresponds to the root DSE. |
| | | if((!target.equals(NULL_LDAP_URL)) && |
| | | (!Pattern.matches(LDAP_URL, target))) { |
| | | int msgID = MSGID_ACI_SYNTAX_INVALID_TARGETKEYWORD_EXPRESSION; |
| | | String message = getMessage(msgID, target); |
| | | throw new AciException(msgID, message); |