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.FileBasedKeyManagerProviderCfg;
023
024
025
026/**
027 * A client-side interface for reading and modifying File Based Key
028 * Manager Provider settings.
029 * <p>
030 * The File Based Key Manager Provider can be used to obtain the
031 * server certificate from a key store file on the local file system.
032 */
033public interface FileBasedKeyManagerProviderCfgClient extends KeyManagerProviderCfgClient {
034
035  /**
036   * Get the configuration definition associated with this File Based Key Manager Provider.
037   *
038   * @return Returns the configuration definition associated with this File Based Key Manager Provider.
039   */
040  ManagedObjectDefinition<? extends FileBasedKeyManagerProviderCfgClient, ? extends FileBasedKeyManagerProviderCfg> definition();
041
042
043
044  /**
045   * Gets the "java-class" property.
046   * <p>
047   * The fully-qualified name of the Java class that provides the File
048   * Based Key Manager Provider implementation.
049   *
050   * @return Returns the value of the "java-class" property.
051   */
052  String getJavaClass();
053
054
055
056  /**
057   * Sets the "java-class" property.
058   * <p>
059   * The fully-qualified name of the Java class that provides the File
060   * Based Key Manager Provider implementation.
061   *
062   * @param value The value of the "java-class" property.
063   * @throws PropertyException
064   *           If the new value is invalid.
065   */
066  void setJavaClass(String value) throws PropertyException;
067
068
069
070  /**
071   * Gets the "key-store-file" property.
072   * <p>
073   * Specifies the path to the file that contains the private key
074   * information. This may be an absolute path, or a path that is
075   * relative to the OpenDJ instance root.
076   * <p>
077   * Changes to this property will take effect the next time that the
078   * key manager is accessed.
079   *
080   * @return Returns the value of the "key-store-file" property.
081   */
082  String getKeyStoreFile();
083
084
085
086  /**
087   * Sets the "key-store-file" property.
088   * <p>
089   * Specifies the path to the file that contains the private key
090   * information. This may be an absolute path, or a path that is
091   * relative to the OpenDJ instance root.
092   * <p>
093   * Changes to this property will take effect the next time that the
094   * key manager is accessed.
095   *
096   * @param value The value of the "key-store-file" property.
097   * @throws PropertyException
098   *           If the new value is invalid.
099   */
100  void setKeyStoreFile(String value) throws PropertyException;
101
102
103
104  /**
105   * Gets the "key-store-pin" property.
106   * <p>
107   * Specifies the clear-text PIN needed to access the File Based Key
108   * Manager Provider .
109   *
110   * @return Returns the value of the "key-store-pin" property.
111   */
112  String getKeyStorePin();
113
114
115
116  /**
117   * Sets the "key-store-pin" property.
118   * <p>
119   * Specifies the clear-text PIN needed to access the File Based Key
120   * Manager Provider .
121   *
122   * @param value The value of the "key-store-pin" property.
123   * @throws PropertyException
124   *           If the new value is invalid.
125   */
126  void setKeyStorePin(String value) throws PropertyException;
127
128
129
130  /**
131   * Gets the "key-store-pin-environment-variable" property.
132   * <p>
133   * Specifies the name of the environment variable that contains the
134   * clear-text PIN needed to access the File Based Key Manager
135   * Provider .
136   *
137   * @return Returns the value of the "key-store-pin-environment-variable" property.
138   */
139  String getKeyStorePinEnvironmentVariable();
140
141
142
143  /**
144   * Sets the "key-store-pin-environment-variable" property.
145   * <p>
146   * Specifies the name of the environment variable that contains the
147   * clear-text PIN needed to access the File Based Key Manager
148   * Provider .
149   *
150   * @param value The value of the "key-store-pin-environment-variable" property.
151   * @throws PropertyException
152   *           If the new value is invalid.
153   */
154  void setKeyStorePinEnvironmentVariable(String value) throws PropertyException;
155
156
157
158  /**
159   * Gets the "key-store-pin-file" property.
160   * <p>
161   * Specifies the path to the text file whose only contents should be
162   * a single line containing the clear-text PIN needed to access the
163   * File Based Key Manager Provider .
164   *
165   * @return Returns the value of the "key-store-pin-file" property.
166   */
167  String getKeyStorePinFile();
168
169
170
171  /**
172   * Sets the "key-store-pin-file" property.
173   * <p>
174   * Specifies the path to the text file whose only contents should be
175   * a single line containing the clear-text PIN needed to access the
176   * File Based Key Manager Provider .
177   *
178   * @param value The value of the "key-store-pin-file" property.
179   * @throws PropertyException
180   *           If the new value is invalid.
181   */
182  void setKeyStorePinFile(String value) throws PropertyException;
183
184
185
186  /**
187   * Gets the "key-store-pin-property" property.
188   * <p>
189   * Specifies the name of the Java property that contains the
190   * clear-text PIN needed to access the File Based Key Manager
191   * Provider .
192   *
193   * @return Returns the value of the "key-store-pin-property" property.
194   */
195  String getKeyStorePinProperty();
196
197
198
199  /**
200   * Sets the "key-store-pin-property" property.
201   * <p>
202   * Specifies the name of the Java property that contains the
203   * clear-text PIN needed to access the File Based Key Manager
204   * Provider .
205   *
206   * @param value The value of the "key-store-pin-property" property.
207   * @throws PropertyException
208   *           If the new value is invalid.
209   */
210  void setKeyStorePinProperty(String value) throws PropertyException;
211
212
213
214  /**
215   * Gets the "key-store-type" property.
216   * <p>
217   * Specifies the format for the data in the key store file.
218   * <p>
219   * Valid values should always include 'JKS' and 'PKCS12', but
220   * different implementations may allow other values as well. If no
221   * value is provided, the JVM-default value is used. Changes to this
222   * configuration attribute will take effect the next time that the
223   * key manager is accessed.
224   *
225   * @return Returns the value of the "key-store-type" property.
226   */
227  String getKeyStoreType();
228
229
230
231  /**
232   * Sets the "key-store-type" property.
233   * <p>
234   * Specifies the format for the data in the key store file.
235   * <p>
236   * Valid values should always include 'JKS' and 'PKCS12', but
237   * different implementations may allow other values as well. If no
238   * value is provided, the JVM-default value is used. Changes to this
239   * configuration attribute will take effect the next time that the
240   * key manager is accessed.
241   *
242   * @param value The value of the "key-store-type" property.
243   * @throws PropertyException
244   *           If the new value is invalid.
245   */
246  void setKeyStoreType(String value) throws PropertyException;
247
248}