001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the 004 * License. 005 * 006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 007 * specific language governing permission and limitations under the License. 008 * 009 * When distributing Covered Software, include this CDDL Header Notice in each file and include 010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 011 * Header, with the fields enclosed by brackets [] replaced by your own identifying 012 * information: "Portions Copyright [year] [name of copyright owner]". 013 * 014 * Copyright 2008 Sun Microsystems, Inc. 015 */ 016package org.forgerock.opendj.server.config.client; 017 018 019 020import org.forgerock.opendj.config.ManagedObjectDefinition; 021import org.forgerock.opendj.config.PropertyException; 022import org.forgerock.opendj.server.config.server.FileBasedTrustManagerProviderCfg; 023 024 025 026/** 027 * A client-side interface for reading and modifying File Based Trust 028 * Manager Provider settings. 029 * <p> 030 * The file-based trust manager provider determines whether to trust a 031 * presented certificate based on whether that certificate exists in a 032 * server trust store file. 033 */ 034public interface FileBasedTrustManagerProviderCfgClient extends TrustManagerProviderCfgClient { 035 036 /** 037 * Get the configuration definition associated with this File Based Trust Manager Provider. 038 * 039 * @return Returns the configuration definition associated with this File Based Trust Manager Provider. 040 */ 041 ManagedObjectDefinition<? extends FileBasedTrustManagerProviderCfgClient, ? extends FileBasedTrustManagerProviderCfg> definition(); 042 043 044 045 /** 046 * Gets the "java-class" property. 047 * <p> 048 * The fully-qualified name of the Java class that provides the File 049 * Based Trust Manager Provider implementation. 050 * 051 * @return Returns the value of the "java-class" property. 052 */ 053 String getJavaClass(); 054 055 056 057 /** 058 * Sets the "java-class" property. 059 * <p> 060 * The fully-qualified name of the Java class that provides the File 061 * Based Trust Manager Provider implementation. 062 * 063 * @param value The value of the "java-class" property. 064 * @throws PropertyException 065 * If the new value is invalid. 066 */ 067 void setJavaClass(String value) throws PropertyException; 068 069 070 071 /** 072 * Gets the "trust-store-file" property. 073 * <p> 074 * Specifies the path to the file containing the trust information. 075 * It can be an absolute path or a path that is relative to the 076 * OpenDJ instance root. 077 * <p> 078 * Changes to this configuration attribute take effect the next time 079 * that the trust manager is accessed. 080 * 081 * @return Returns the value of the "trust-store-file" property. 082 */ 083 String getTrustStoreFile(); 084 085 086 087 /** 088 * Sets the "trust-store-file" property. 089 * <p> 090 * Specifies the path to the file containing the trust information. 091 * It can be an absolute path or a path that is relative to the 092 * OpenDJ instance root. 093 * <p> 094 * Changes to this configuration attribute take effect the next time 095 * that the trust manager is accessed. 096 * 097 * @param value The value of the "trust-store-file" property. 098 * @throws PropertyException 099 * If the new value is invalid. 100 */ 101 void setTrustStoreFile(String value) throws PropertyException; 102 103 104 105 /** 106 * Gets the "trust-store-pin" property. 107 * <p> 108 * Specifies the clear-text PIN needed to access the File Based 109 * Trust Manager Provider . 110 * 111 * @return Returns the value of the "trust-store-pin" property. 112 */ 113 String getTrustStorePin(); 114 115 116 117 /** 118 * Sets the "trust-store-pin" property. 119 * <p> 120 * Specifies the clear-text PIN needed to access the File Based 121 * Trust Manager Provider . 122 * 123 * @param value The value of the "trust-store-pin" property. 124 * @throws PropertyException 125 * If the new value is invalid. 126 */ 127 void setTrustStorePin(String value) throws PropertyException; 128 129 130 131 /** 132 * Gets the "trust-store-pin-environment-variable" property. 133 * <p> 134 * Specifies the name of the environment variable that contains the 135 * clear-text PIN needed to access the File Based Trust Manager 136 * Provider . 137 * 138 * @return Returns the value of the "trust-store-pin-environment-variable" property. 139 */ 140 String getTrustStorePinEnvironmentVariable(); 141 142 143 144 /** 145 * Sets the "trust-store-pin-environment-variable" property. 146 * <p> 147 * Specifies the name of the environment variable that contains the 148 * clear-text PIN needed to access the File Based Trust Manager 149 * Provider . 150 * 151 * @param value The value of the "trust-store-pin-environment-variable" property. 152 * @throws PropertyException 153 * If the new value is invalid. 154 */ 155 void setTrustStorePinEnvironmentVariable(String value) throws PropertyException; 156 157 158 159 /** 160 * Gets the "trust-store-pin-file" property. 161 * <p> 162 * Specifies the path to the text file whose only contents should be 163 * a single line containing the clear-text PIN needed to access the 164 * File Based Trust Manager Provider . 165 * 166 * @return Returns the value of the "trust-store-pin-file" property. 167 */ 168 String getTrustStorePinFile(); 169 170 171 172 /** 173 * Sets the "trust-store-pin-file" property. 174 * <p> 175 * Specifies the path to the text file whose only contents should be 176 * a single line containing the clear-text PIN needed to access the 177 * File Based Trust Manager Provider . 178 * 179 * @param value The value of the "trust-store-pin-file" property. 180 * @throws PropertyException 181 * If the new value is invalid. 182 */ 183 void setTrustStorePinFile(String value) throws PropertyException; 184 185 186 187 /** 188 * Gets the "trust-store-pin-property" property. 189 * <p> 190 * Specifies the name of the Java property that contains the 191 * clear-text PIN needed to access the File Based Trust Manager 192 * Provider . 193 * 194 * @return Returns the value of the "trust-store-pin-property" property. 195 */ 196 String getTrustStorePinProperty(); 197 198 199 200 /** 201 * Sets the "trust-store-pin-property" property. 202 * <p> 203 * Specifies the name of the Java property that contains the 204 * clear-text PIN needed to access the File Based Trust Manager 205 * Provider . 206 * 207 * @param value The value of the "trust-store-pin-property" property. 208 * @throws PropertyException 209 * If the new value is invalid. 210 */ 211 void setTrustStorePinProperty(String value) throws PropertyException; 212 213 214 215 /** 216 * Gets the "trust-store-type" property. 217 * <p> 218 * Specifies the format for the data in the trust store file. 219 * <p> 220 * Valid values always include 'JKS' and 'PKCS12', but different 221 * implementations can allow other values as well. If no value is 222 * provided, then the JVM default value is used. Changes to this 223 * configuration attribute take effect the next time that the trust 224 * manager is accessed. 225 * 226 * @return Returns the value of the "trust-store-type" property. 227 */ 228 String getTrustStoreType(); 229 230 231 232 /** 233 * Sets the "trust-store-type" property. 234 * <p> 235 * Specifies the format for the data in the trust store file. 236 * <p> 237 * Valid values always include 'JKS' and 'PKCS12', but different 238 * implementations can allow other values as well. If no value is 239 * provided, then the JVM default value is used. Changes to this 240 * configuration attribute take effect the next time that the trust 241 * manager is accessed. 242 * 243 * @param value The value of the "trust-store-type" property. 244 * @throws PropertyException 245 * If the new value is invalid. 246 */ 247 void setTrustStoreType(String value) throws PropertyException; 248 249}