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 org.opends.server.admin.server.ConfigurationChangeListener;
031import org.opends.server.admin.std.meta.BackendCfgDefn.WritabilityMode;
032
033
034
035/**
036 * A server-side interface for querying Trust Store Backend settings.
037 * <p>
038 * The Trust Store Backend provides an LDAP view of a file-based trust
039 * store. It is used by the administrative cryptographic framework.
040 */
041public interface TrustStoreBackendCfg extends BackendCfg {
042
043  /**
044   * Gets the configuration class associated with this Trust Store Backend.
045   *
046   * @return Returns the configuration class associated with this Trust Store Backend.
047   */
048  Class<? extends TrustStoreBackendCfg> configurationClass();
049
050
051
052  /**
053   * Register to be notified when this Trust Store Backend is changed.
054   *
055   * @param listener
056   *          The Trust Store Backend configuration change listener.
057   */
058  void addTrustStoreChangeListener(ConfigurationChangeListener<TrustStoreBackendCfg> listener);
059
060
061
062  /**
063   * Deregister an existing Trust Store Backend configuration change listener.
064   *
065   * @param listener
066   *          The Trust Store Backend configuration change listener.
067   */
068  void removeTrustStoreChangeListener(ConfigurationChangeListener<TrustStoreBackendCfg> listener);
069
070
071
072  /**
073   * Gets the "java-class" property.
074   * <p>
075   * Specifies the fully-qualified name of the Java class that
076   * provides the backend implementation.
077   *
078   * @return Returns the value of the "java-class" property.
079   */
080  String getJavaClass();
081
082
083
084  /**
085   * Gets the "trust-store-file" property.
086   * <p>
087   * Specifies the path to the file that stores the trust information.
088   * <p>
089   * It may be an absolute path, or a path that is relative to the
090   * OpenDJ instance root.
091   *
092   * @return Returns the value of the "trust-store-file" property.
093   */
094  String getTrustStoreFile();
095
096
097
098  /**
099   * Gets the "trust-store-pin" property.
100   * <p>
101   * Specifies the clear-text PIN needed to access the Trust Store
102   * Backend .
103   *
104   * @return Returns the value of the "trust-store-pin" property.
105   */
106  String getTrustStorePin();
107
108
109
110  /**
111   * Gets the "trust-store-pin-environment-variable" property.
112   * <p>
113   * Specifies the name of the environment variable that contains the
114   * clear-text PIN needed to access the Trust Store Backend .
115   *
116   * @return Returns the value of the "trust-store-pin-environment-variable" property.
117   */
118  String getTrustStorePinEnvironmentVariable();
119
120
121
122  /**
123   * Gets the "trust-store-pin-file" property.
124   * <p>
125   * Specifies the path to the text file whose only contents should be
126   * a single line containing the clear-text PIN needed to access the
127   * Trust Store Backend .
128   *
129   * @return Returns the value of the "trust-store-pin-file" property.
130   */
131  String getTrustStorePinFile();
132
133
134
135  /**
136   * Gets the "trust-store-pin-property" property.
137   * <p>
138   * Specifies the name of the Java property that contains the
139   * clear-text PIN needed to access the Trust Store Backend .
140   *
141   * @return Returns the value of the "trust-store-pin-property" property.
142   */
143  String getTrustStorePinProperty();
144
145
146
147  /**
148   * Gets the "trust-store-type" property.
149   * <p>
150   * Specifies the format for the data in the key store file.
151   * <p>
152   * Valid values should always include 'JKS' and 'PKCS12', but
153   * different implementations may allow other values as well.
154   *
155   * @return Returns the value of the "trust-store-type" property.
156   */
157  String getTrustStoreType();
158
159
160
161  /**
162   * Gets the "writability-mode" property.
163   * <p>
164   * Specifies the behavior that the backend should use when
165   * processing write operations.
166   *
167   * @return Returns the value of the "writability-mode" property.
168   */
169  WritabilityMode getWritabilityMode();
170
171}