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