Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.

1 /*2 3 Derby - Class org.apache.derby.iapi.reference.Attribute4 5 Licensed to the Apache Software Foundation (ASF) under one or more6 contributor license agreements. See the NOTICE file distributed with7 this work for additional information regarding copyright ownership.8 The ASF licenses this file to you under the Apache License, Version 2.09 (the "License"); you may not use this file except in compliance with10 the License. You may obtain a copy of the License at11 12 http://www.apache.org/licenses/LICENSE-2.013 14 Unless required by applicable law or agreed to in writing, software15 distributed under the License is distributed on an "AS IS" BASIS,16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.17 See the License for the specific language governing permissions and18 limitations under the License.19 20 */21 22 package org.apache.derby.iapi.reference;23 24 25 /**26 List of all connection (JDBC) attributes by the system.27 28 29 <P>30 This class exists for two reasons31 <Ol>32 <LI> To act as the internal documentation for the attributes. 33 <LI> To remove the need to declare a java static field for the attributes34 name in the protocol/implementation class. This reduces the footprint as35 the string is final and thus can be included simply as a String constant pool entry.36 </OL>37 <P>38 This class should not be shipped with the product.39 40 <P>41 This class has no methods, all it contains are String's which by42 are public, static and final since they are declared in an interface.43 44 <P>45 At some point this class should be replaced by46 org.apache.derby.shared.common.reference.Attribute.47 The issue is that this class is used by ij to check attributes,48 ij uses reflection on this class to get the list of valid attributes.49 The expanded class in shared has the client attributes as well.50 Ideally ij would work of an explicit list of attributes and not51 infer the set from reflection. See DERBY-115152 */53 54 publicinterface Attribute {55 56 /**57 Not an attribute but the root for the JDBC URL that Derby supports.58 */59 String PROTOCOL = "jdbc:derby:";60 61 /**62 * The SQLJ protocol for getting the default connection63 * for server side jdbc64 */65 String SQLJ_NESTED = "jdbc:default:connection";66 67 68 // Network Protocols. These need to be rejected by the embedded driver.69 70 /**71 * The protocol for Derby Network Client 72 */73 String DNC_PROTOCOL = "jdbc:derby://";74 75 /** 76 * The protocol for the IBM Universal JDBC Driver 77 * 78 */79 String JCC_PROTOCOL = "jdbc:derby:net:";80 81 82 /**83 Attribute name to encrypt the database on disk.84 If set to true, all user data is stored encrypted on disk.85 */86 String DATA_ENCRYPTION = "dataEncryption";87 88 /**89 If dataEncryption is true, use this attribute to pass in the 90 secret key. The secret key must be at least 8 characters long.91 This key must not be stored persistently in cleartext anywhere. 92 */93 94 String BOOT_PASSWORD = "bootPassword";95 96 /**97 The attribute that is used to chage the secret key of an encrypted98 database. The secret key must be at least 8 characters long.99 This key must not be stored persistently in cleartext anywhere. 100 */101 102 String NEW_BOOT_PASSWORD = "newBootPassword";103 104 105 106 /**107 The attribute that is used for the database name, from108 the JDBC notion of jdbc:<subprotocol>:<subname>109 */110 String DBNAME_ATTR = "databaseName";111 112 /**113 The attribute that is used to request a shutdown.114 */115 String SHUTDOWN_ATTR = "shutdown";116 117 /**118 The attribute that is used to request a database create.119 */120 String CREATE_ATTR = "create";121 122 /**123 The attribute that is used to set the user name.124 */125 String USERNAME_ATTR = "user";126 127 128 /**129 The attribute that is used to set the user password.130 */131 String PASSWORD_ATTR = "password";132 133 134 /**135 The attribute that is used to set the connection's DRDA ID.136 */137 String DRDAID_ATTR = "drdaID";138 139 /**140 The attribute that is used to allow upgrade.141 */142 String UPGRADE_ATTR = "upgrade";143 144 /**145 Put the log on a different device.146 */147 String LOG_DEVICE = "logDevice";148 149 /**150 Set the territory for the database.151 */152 String TERRITORY = "territory";153 154 /**155 Set the collation sequence of the database, currently on IDENTITY156 will be supported (strings will sort according to binary comparison).157 */158 String COLLATE = "collate";159 160 /**161 Attribute for encrypting a database.162 Specifies the cryptographic services provider.163 */164 String CRYPTO_PROVIDER = "encryptionProvider";165 166 /**167 Attribute for encrypting a database.168 Specifies the cryptographic algorithm.169 */170 String CRYPTO_ALGORITHM = "encryptionAlgorithm";171 172 /**173 Attribute for encrypting a database.174 Specifies the key length in bytes for the specified cryptographic algorithm.175 */176 String CRYPTO_KEY_LENGTH = "encryptionKeyLength";177 178 /**179 Attribute for encrypting a database.180 Specifies the actual key. When this is specified181 all the supplied crypto information is stored182 external to the database, ie by the application.183 */184 String CRYPTO_EXTERNAL_KEY = "encryptionKey";185 186 187 /**188 The attribute that is used to chage the encryption 189 key of an encrypted database. When this is specified190 all the supplied crypto information is stored191 external to the database, ie by the application.192 */193 String NEW_CRYPTO_EXTERNAL_KEY = "newEncryptionKey";194 195 196 /**197 One can encrypt the database with an encryption key at create time.198 For security reasons, this key is not made persistent in the database.199 200 But it is necessary to verify the encryption key whenever booting the database 201 before we access the data/logs to avoid the risk of corrupting the database because202 of a wrong encryption key.203 204 This attribute refers to the name of the file where encrypted data is stored for205 verification of encryption key.206 */207 String CRYPTO_EXTERNAL_KEY_VERIFY_FILE = "verifyKey.dat";208 209 210 /**211 * This attribute is used to request to create a database from backup.212 * This will throw error if a database with same already exists at the 213 * location where we tring to create.214 */215 String CREATE_FROM = "createFrom";216 217 /**218 * This attribute is used to request a database restore from backup.219 * It must be used only when the active database is corrupted,220 * because it will cleanup the existing database and replace 221 * it from the backup.222 */223 String RESTORE_FROM = "restoreFrom";224 225 /**226 The attribute that is used to request a roll-forward recovery of the database.227 */228 String ROLL_FORWARD_RECOVERY_FROM = "rollForwardRecoveryFrom";229 230 /**231 * securityMechanism sets the DRDA mechanism in-use for the client.232 * Internal only.233 */234 String CLIENT_SECURITY_MECHANISM = "securityMechanism";235 236 /**237 * Internal attributes. Mainly used by DRDA and Derby BUILTIN238 * authentication provider in some security mechanism context239 * (SECMEC_USRSSBPWD).240 *241 * DRDA_SECTKN_IN is the random client seed (RDs)242 * DRDA_SECTKN_OUT is the random server seed (RDr)243 */244 String DRDA_SECTKN_IN = "drdaSecTokenIn";245 String DRDA_SECTKN_OUT = "drdaSecTokenOut";246 }247