1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.com * The contents of this file are subject to the terms of the Common Development and
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.com * Distribution License (the License). You may not use this file except in compliance with the
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.com * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.com * specific language governing permission and limitations under the License.
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.com * When distributing Covered Software, include this CDDL Header Notice in each file and include
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.com * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.com * Header, with the fields enclosed by brackets [] replaced by your own identifying
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.com * information: "Portions copyright [year] [name of copyright owner]".
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.com * Copyright 2015 ForgeRock AS.
ed76331d9cc7a5c7df1c84efaa60923621e6af05Craig McDonnellimport org.forgerock.openam.audit.AuditConstants.ConfigOperation;
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.comimport org.forgerock.openam.auditors.SMSAuditFilter;
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.comimport org.forgerock.opendj.ldap.DN;
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.comimport org.forgerock.opendj.ldap.RDN;
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.com * A filter to stop entitlement index changes being audited
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.compublic class EntitlementIndexConfigFilter implements SMSAuditFilter {
ed76331d9cc7a5c7df1c84efaa60923621e6af05Craig McDonnell public boolean isAudited(String objectId, String realm, ConfigOperation operation, Subject subject) {
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.com return !isIndexChange(DN.valueOf(objectId));
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.com private boolean isIndexChange(DN dn) {
1d220b52ff470e682af30735b255f1d9ab04df21tom.rumsey@forgerock.com if (rdn.toString().equals("ou=sunEntitlementIndexes")) {