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 org.opends.server.admin.ManagedObjectDefinition; 031import org.opends.server.admin.PropertyException; 032import org.opends.server.admin.std.server.DictionaryPasswordValidatorCfg; 033 034 035 036/** 037 * A client-side interface for reading and modifying Dictionary 038 * Password Validator settings. 039 * <p> 040 * The Dictionary Password Validator determines whether a proposed 041 * password is acceptable based on whether the given password value 042 * appears in a provided dictionary file. 043 */ 044public interface DictionaryPasswordValidatorCfgClient extends PasswordValidatorCfgClient { 045 046 /** 047 * Get the configuration definition associated with this Dictionary Password Validator. 048 * 049 * @return Returns the configuration definition associated with this Dictionary Password Validator. 050 */ 051 ManagedObjectDefinition<? extends DictionaryPasswordValidatorCfgClient, ? extends DictionaryPasswordValidatorCfg> definition(); 052 053 054 055 /** 056 * Gets the "case-sensitive-validation" property. 057 * <p> 058 * Indicates whether this password validator is to treat password 059 * characters in a case-sensitive manner. 060 * <p> 061 * If it is set to true, then the validator rejects a password only 062 * if it appears in the dictionary with exactly the same 063 * capitalization as provided by the user. 064 * 065 * @return Returns the value of the "case-sensitive-validation" property. 066 */ 067 boolean isCaseSensitiveValidation(); 068 069 070 071 /** 072 * Sets the "case-sensitive-validation" property. 073 * <p> 074 * Indicates whether this password validator is to treat password 075 * characters in a case-sensitive manner. 076 * <p> 077 * If it is set to true, then the validator rejects a password only 078 * if it appears in the dictionary with exactly the same 079 * capitalization as provided by the user. 080 * 081 * @param value The value of the "case-sensitive-validation" property. 082 * @throws PropertyException 083 * If the new value is invalid. 084 */ 085 void setCaseSensitiveValidation(boolean value) throws PropertyException; 086 087 088 089 /** 090 * Gets the "check-substrings" property. 091 * <p> 092 * Indicates whether this password validator is to match portions of 093 * the password string against dictionary words. 094 * <p> 095 * If "false" then only match the entire password against words 096 * otherwise ("true") check whether the password contains words. 097 * 098 * @return Returns the value of the "check-substrings" property. 099 */ 100 boolean isCheckSubstrings(); 101 102 103 104 /** 105 * Sets the "check-substrings" property. 106 * <p> 107 * Indicates whether this password validator is to match portions of 108 * the password string against dictionary words. 109 * <p> 110 * If "false" then only match the entire password against words 111 * otherwise ("true") check whether the password contains words. 112 * 113 * @param value The value of the "check-substrings" property. 114 * @throws PropertyException 115 * If the new value is invalid. 116 */ 117 void setCheckSubstrings(Boolean value) throws PropertyException; 118 119 120 121 /** 122 * Gets the "dictionary-file" property. 123 * <p> 124 * Specifies the path to the file containing a list of words that 125 * cannot be used as passwords. 126 * <p> 127 * It should be formatted with one word per line. The value can be 128 * an absolute path or a path that is relative to the OpenDJ instance 129 * root. 130 * 131 * @return Returns the value of the "dictionary-file" property. 132 */ 133 String getDictionaryFile(); 134 135 136 137 /** 138 * Sets the "dictionary-file" property. 139 * <p> 140 * Specifies the path to the file containing a list of words that 141 * cannot be used as passwords. 142 * <p> 143 * It should be formatted with one word per line. The value can be 144 * an absolute path or a path that is relative to the OpenDJ instance 145 * root. 146 * 147 * @param value The value of the "dictionary-file" property. 148 * @throws PropertyException 149 * If the new value is invalid. 150 */ 151 void setDictionaryFile(String value) throws PropertyException; 152 153 154 155 /** 156 * Gets the "java-class" property. 157 * <p> 158 * Specifies the fully-qualified name of the Java class that 159 * provides the password validator implementation. 160 * 161 * @return Returns the value of the "java-class" property. 162 */ 163 String getJavaClass(); 164 165 166 167 /** 168 * Sets the "java-class" property. 169 * <p> 170 * Specifies the fully-qualified name of the Java class that 171 * provides the password validator implementation. 172 * 173 * @param value The value of the "java-class" property. 174 * @throws PropertyException 175 * If the new value is invalid. 176 */ 177 void setJavaClass(String value) throws PropertyException; 178 179 180 181 /** 182 * Gets the "min-substring-length" property. 183 * <p> 184 * Indicates the minimal length of the substring within the password 185 * in case substring checking is enabled. 186 * <p> 187 * If "check-substrings" option is set to true, then this parameter 188 * defines the length of the smallest word which should be used for 189 * substring matching. Use with caution because values below 3 might 190 * disqualify valid passwords. 191 * 192 * @return Returns the value of the "min-substring-length" property. 193 */ 194 int getMinSubstringLength(); 195 196 197 198 /** 199 * Sets the "min-substring-length" property. 200 * <p> 201 * Indicates the minimal length of the substring within the password 202 * in case substring checking is enabled. 203 * <p> 204 * If "check-substrings" option is set to true, then this parameter 205 * defines the length of the smallest word which should be used for 206 * substring matching. Use with caution because values below 3 might 207 * disqualify valid passwords. 208 * 209 * @param value The value of the "min-substring-length" property. 210 * @throws PropertyException 211 * If the new value is invalid. 212 */ 213 void setMinSubstringLength(Integer value) throws PropertyException; 214 215 216 217 /** 218 * Gets the "test-reversed-password" property. 219 * <p> 220 * Indicates whether this password validator is to test the reversed 221 * value of the provided password as well as the order in which it 222 * was given. 223 * <p> 224 * For example, if the user provides a new password of "password" 225 * and this configuration attribute is set to true, then the value 226 * "drowssap" is also tested against attribute values in the user's 227 * entry. 228 * 229 * @return Returns the value of the "test-reversed-password" property. 230 */ 231 boolean isTestReversedPassword(); 232 233 234 235 /** 236 * Sets the "test-reversed-password" property. 237 * <p> 238 * Indicates whether this password validator is to test the reversed 239 * value of the provided password as well as the order in which it 240 * was given. 241 * <p> 242 * For example, if the user provides a new password of "password" 243 * and this configuration attribute is set to true, then the value 244 * "drowssap" is also tested against attribute values in the user's 245 * entry. 246 * 247 * @param value The value of the "test-reversed-password" property. 248 * @throws PropertyException 249 * If the new value is invalid. 250 */ 251 void setTestReversedPassword(boolean value) throws PropertyException; 252 253}