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.server;
017
018
019
020import org.forgerock.opendj.config.server.ConfigurationChangeListener;
021
022
023
024/**
025 * A server-side interface for querying File Based Trust Manager
026 * Provider settings.
027 * <p>
028 * The file-based trust manager provider determines whether to trust a
029 * presented certificate based on whether that certificate exists in a
030 * server trust store file.
031 */
032public interface FileBasedTrustManagerProviderCfg extends TrustManagerProviderCfg {
033
034  /**
035   * Gets the configuration class associated with this File Based Trust Manager Provider.
036   *
037   * @return Returns the configuration class associated with this File Based Trust Manager Provider.
038   */
039  Class<? extends FileBasedTrustManagerProviderCfg> configurationClass();
040
041
042
043  /**
044   * Register to be notified when this File Based Trust Manager Provider is changed.
045   *
046   * @param listener
047   *          The File Based Trust Manager Provider configuration change listener.
048   */
049  void addFileBasedChangeListener(ConfigurationChangeListener<FileBasedTrustManagerProviderCfg> listener);
050
051
052
053  /**
054   * Deregister an existing File Based Trust Manager Provider configuration change listener.
055   *
056   * @param listener
057   *          The File Based Trust Manager Provider configuration change listener.
058   */
059  void removeFileBasedChangeListener(ConfigurationChangeListener<FileBasedTrustManagerProviderCfg> listener);
060
061
062
063  /**
064   * Gets the "java-class" property.
065   * <p>
066   * The fully-qualified name of the Java class that provides the File
067   * Based Trust Manager Provider implementation.
068   *
069   * @return Returns the value of the "java-class" property.
070   */
071  String getJavaClass();
072
073
074
075  /**
076   * Gets the "trust-store-file" property.
077   * <p>
078   * Specifies the path to the file containing the trust information.
079   * It can be an absolute path or a path that is relative to the
080   * OpenDJ instance root.
081   * <p>
082   * Changes to this configuration attribute take effect the next time
083   * that the trust manager is accessed.
084   *
085   * @return Returns the value of the "trust-store-file" property.
086   */
087  String getTrustStoreFile();
088
089
090
091  /**
092   * Gets the "trust-store-pin" property.
093   * <p>
094   * Specifies the clear-text PIN needed to access the File Based
095   * Trust Manager Provider .
096   *
097   * @return Returns the value of the "trust-store-pin" property.
098   */
099  String getTrustStorePin();
100
101
102
103  /**
104   * Gets the "trust-store-pin-environment-variable" property.
105   * <p>
106   * Specifies the name of the environment variable that contains the
107   * clear-text PIN needed to access the File Based Trust Manager
108   * Provider .
109   *
110   * @return Returns the value of the "trust-store-pin-environment-variable" property.
111   */
112  String getTrustStorePinEnvironmentVariable();
113
114
115
116  /**
117   * Gets the "trust-store-pin-file" property.
118   * <p>
119   * Specifies the path to the text file whose only contents should be
120   * a single line containing the clear-text PIN needed to access the
121   * File Based Trust Manager Provider .
122   *
123   * @return Returns the value of the "trust-store-pin-file" property.
124   */
125  String getTrustStorePinFile();
126
127
128
129  /**
130   * Gets the "trust-store-pin-property" property.
131   * <p>
132   * Specifies the name of the Java property that contains the
133   * clear-text PIN needed to access the File Based Trust Manager
134   * Provider .
135   *
136   * @return Returns the value of the "trust-store-pin-property" property.
137   */
138  String getTrustStorePinProperty();
139
140
141
142  /**
143   * Gets the "trust-store-type" property.
144   * <p>
145   * Specifies the format for the data in the trust store file.
146   * <p>
147   * Valid values always include 'JKS' and 'PKCS12', but different
148   * implementations can allow other values as well. If no value is
149   * provided, then the JVM default value is used. Changes to this
150   * configuration attribute take effect the next time that the trust
151   * manager is accessed.
152   *
153   * @return Returns the value of the "trust-store-type" property.
154   */
155  String getTrustStoreType();
156
157}