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.server; 027 028 029 030import java.util.SortedSet; 031import org.opends.server.admin.server.ConfigurationChangeListener; 032import org.opends.server.types.AttributeType; 033 034 035 036/** 037 * A server-side interface for querying Attribute Value Password 038 * Validator settings. 039 * <p> 040 * The Attribute Value Password Validator attempts to determine 041 * whether a proposed password is acceptable for use by determining 042 * whether that password is contained in any attribute within the 043 * user's entry. 044 */ 045public interface AttributeValuePasswordValidatorCfg extends PasswordValidatorCfg { 046 047 /** 048 * Gets the configuration class associated with this Attribute Value Password Validator. 049 * 050 * @return Returns the configuration class associated with this Attribute Value Password Validator. 051 */ 052 Class<? extends AttributeValuePasswordValidatorCfg> configurationClass(); 053 054 055 056 /** 057 * Register to be notified when this Attribute Value Password Validator is changed. 058 * 059 * @param listener 060 * The Attribute Value Password Validator configuration change listener. 061 */ 062 void addAttributeValueChangeListener(ConfigurationChangeListener<AttributeValuePasswordValidatorCfg> listener); 063 064 065 066 /** 067 * Deregister an existing Attribute Value Password Validator configuration change listener. 068 * 069 * @param listener 070 * The Attribute Value Password Validator configuration change listener. 071 */ 072 void removeAttributeValueChangeListener(ConfigurationChangeListener<AttributeValuePasswordValidatorCfg> listener); 073 074 075 076 /** 077 * Gets the "check-substrings" property. 078 * <p> 079 * Indicates whether this password validator is to match portions of 080 * the password string against attribute values. 081 * <p> 082 * If "false" then only match the entire password against attribute 083 * values otherwise ("true") check whether the password contains 084 * attribute values. 085 * 086 * @return Returns the value of the "check-substrings" property. 087 */ 088 boolean isCheckSubstrings(); 089 090 091 092 /** 093 * Gets the "java-class" property. 094 * <p> 095 * Specifies the fully-qualified name of the Java class that 096 * provides the password validator implementation. 097 * 098 * @return Returns the value of the "java-class" property. 099 */ 100 String getJavaClass(); 101 102 103 104 /** 105 * Gets the "match-attribute" property. 106 * <p> 107 * Specifies the name(s) of the attribute(s) whose values should be 108 * checked to determine whether they match the provided password. If 109 * no values are provided, then the server checks if the proposed 110 * password matches the value of any attribute in the user's entry. 111 * 112 * @return Returns an unmodifiable set containing the values of the "match-attribute" property. 113 */ 114 SortedSet<AttributeType> getMatchAttribute(); 115 116 117 118 /** 119 * Gets the "min-substring-length" property. 120 * <p> 121 * Indicates the minimal length of the substring within the password 122 * in case substring checking is enabled. 123 * <p> 124 * If "check-substrings" option is set to true, then this parameter 125 * defines the length of the smallest word which should be used for 126 * substring matching. Use with caution because values below 3 might 127 * disqualify valid passwords. 128 * 129 * @return Returns the value of the "min-substring-length" property. 130 */ 131 int getMinSubstringLength(); 132 133 134 135 /** 136 * Gets the "test-reversed-password" property. 137 * <p> 138 * Indicates whether this password validator should test the 139 * reversed value of the provided password as well as the order in 140 * which it was given. 141 * 142 * @return Returns the value of the "test-reversed-password" property. 143 */ 144 boolean isTestReversedPassword(); 145 146}