001/* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt 010 * or http://forgerock.org/license/CDDLv1.0.html. 011 * See the License for the specific language governing permissions 012 * and limitations under the License. 013 * 014 * When distributing Covered Code, include this CDDL HEADER in each 015 * file and include the License file at legal-notices/CDDLv1_0.txt. 016 * If applicable, add the following below this CDDL HEADER, with the 017 * fields enclosed by brackets "[]" replaced with your own identifying 018 * information: 019 * Portions Copyright [yyyy] [name of copyright owner] 020 * 021 * CDDL HEADER END 022 * 023 * 024 * Copyright 2008 Sun Microsystems, Inc. 025 */ 026package org.opends.server.admin.std.client; 027 028 029 030import java.util.Collection; 031import java.util.SortedSet; 032import org.opends.server.admin.ManagedObjectDefinition; 033import org.opends.server.admin.PropertyException; 034import org.opends.server.admin.std.server.AttributeValuePasswordValidatorCfg; 035import org.opends.server.types.AttributeType; 036 037 038 039/** 040 * A client-side interface for reading and modifying Attribute Value 041 * Password Validator settings. 042 * <p> 043 * The Attribute Value Password Validator attempts to determine 044 * whether a proposed password is acceptable for use by determining 045 * whether that password is contained in any attribute within the 046 * user's entry. 047 */ 048public interface AttributeValuePasswordValidatorCfgClient extends PasswordValidatorCfgClient { 049 050 /** 051 * Get the configuration definition associated with this Attribute Value Password Validator. 052 * 053 * @return Returns the configuration definition associated with this Attribute Value Password Validator. 054 */ 055 ManagedObjectDefinition<? extends AttributeValuePasswordValidatorCfgClient, ? extends AttributeValuePasswordValidatorCfg> definition(); 056 057 058 059 /** 060 * Gets the "check-substrings" property. 061 * <p> 062 * Indicates whether this password validator is to match portions of 063 * the password string against attribute values. 064 * <p> 065 * If "false" then only match the entire password against attribute 066 * values otherwise ("true") check whether the password contains 067 * attribute values. 068 * 069 * @return Returns the value of the "check-substrings" property. 070 */ 071 boolean isCheckSubstrings(); 072 073 074 075 /** 076 * Sets the "check-substrings" property. 077 * <p> 078 * Indicates whether this password validator is to match portions of 079 * the password string against attribute values. 080 * <p> 081 * If "false" then only match the entire password against attribute 082 * values otherwise ("true") check whether the password contains 083 * attribute values. 084 * 085 * @param value The value of the "check-substrings" property. 086 * @throws PropertyException 087 * If the new value is invalid. 088 */ 089 void setCheckSubstrings(Boolean value) throws PropertyException; 090 091 092 093 /** 094 * Gets the "java-class" property. 095 * <p> 096 * Specifies the fully-qualified name of the Java class that 097 * provides the password validator implementation. 098 * 099 * @return Returns the value of the "java-class" property. 100 */ 101 String getJavaClass(); 102 103 104 105 /** 106 * Sets the "java-class" property. 107 * <p> 108 * Specifies the fully-qualified name of the Java class that 109 * provides the password validator implementation. 110 * 111 * @param value The value of the "java-class" property. 112 * @throws PropertyException 113 * If the new value is invalid. 114 */ 115 void setJavaClass(String value) throws PropertyException; 116 117 118 119 /** 120 * Gets the "match-attribute" property. 121 * <p> 122 * Specifies the name(s) of the attribute(s) whose values should be 123 * checked to determine whether they match the provided password. If 124 * no values are provided, then the server checks if the proposed 125 * password matches the value of any attribute in the user's entry. 126 * 127 * @return Returns the values of the "match-attribute" property. 128 */ 129 SortedSet<AttributeType> getMatchAttribute(); 130 131 132 133 /** 134 * Sets the "match-attribute" property. 135 * <p> 136 * Specifies the name(s) of the attribute(s) whose values should be 137 * checked to determine whether they match the provided password. If 138 * no values are provided, then the server checks if the proposed 139 * password matches the value of any attribute in the user's entry. 140 * 141 * @param values The values of the "match-attribute" property. 142 * @throws PropertyException 143 * If one or more of the new values are invalid. 144 */ 145 void setMatchAttribute(Collection<AttributeType> values) throws PropertyException; 146 147 148 149 /** 150 * Gets the "min-substring-length" property. 151 * <p> 152 * Indicates the minimal length of the substring within the password 153 * in case substring checking is enabled. 154 * <p> 155 * If "check-substrings" option is set to true, then this parameter 156 * defines the length of the smallest word which should be used for 157 * substring matching. Use with caution because values below 3 might 158 * disqualify valid passwords. 159 * 160 * @return Returns the value of the "min-substring-length" property. 161 */ 162 int getMinSubstringLength(); 163 164 165 166 /** 167 * Sets the "min-substring-length" property. 168 * <p> 169 * Indicates the minimal length of the substring within the password 170 * in case substring checking is enabled. 171 * <p> 172 * If "check-substrings" option is set to true, then this parameter 173 * defines the length of the smallest word which should be used for 174 * substring matching. Use with caution because values below 3 might 175 * disqualify valid passwords. 176 * 177 * @param value The value of the "min-substring-length" property. 178 * @throws PropertyException 179 * If the new value is invalid. 180 */ 181 void setMinSubstringLength(Integer value) throws PropertyException; 182 183 184 185 /** 186 * Gets the "test-reversed-password" property. 187 * <p> 188 * Indicates whether this password validator should test the 189 * reversed value of the provided password as well as the order in 190 * which it was given. 191 * 192 * @return Returns the value of the "test-reversed-password" property. 193 */ 194 Boolean isTestReversedPassword(); 195 196 197 198 /** 199 * Sets the "test-reversed-password" property. 200 * <p> 201 * Indicates whether this password validator should test the 202 * reversed value of the provided password as well as the order in 203 * which it was given. 204 * 205 * @param value The value of the "test-reversed-password" property. 206 * @throws PropertyException 207 * If the new value is invalid. 208 */ 209 void setTestReversedPassword(boolean value) throws PropertyException; 210 211}