Enum Class NoopEncryptionStorageManager
java.lang.Object
java.lang.Enum<NoopEncryptionStorageManager>
com.linecorp.centraldogma.server.storage.encryption.NoopEncryptionStorageManager
- All Implemented Interfaces:
SafeCloseable,EncryptionStorageManager,Serializable,AutoCloseable,Comparable<NoopEncryptionStorageManager>,java.lang.constant.Constable
public enum NoopEncryptionStorageManager
extends Enum<NoopEncryptionStorageManager>
implements EncryptionStorageManager
A no-operation implementation of
EncryptionStorageManager that does not perform any encryption.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleancontainsMetadata(byte[] key) Returnstrueif the specified key exists.voiddeleteObjectId(byte[] metadataKey, byte[] key) Deletes the specified keys.voiddeleteRepositoryData(String projectName, String repoName) Deletes all data related to the specified project and repository.booleanenabled()Returnstrueif the encryption at rest is enabled.booleanReturnstrueif the session cookie should be encrypted.Generates a new session master key.CompletableFuture<byte[]> Generates a new data encryption key (DEK) and wraps it.Returns all data stored in the encryption storage manager.getCurrentDek(String projectName, String repoName) Returns the current wrapped data encryption key (WDEK) for the specified project and repository.Returns the current session master key.Returns the data encryption key (DEK) for the specified project and repository.byte[]getMetadata(byte[] metadataKey) Returns the value of the specified metadata key.byte[]getObject(byte[] key, byte[] metadataKey) Returns the object associated with the specified key.byte[]getObjectId(byte[] key, byte[] metadataKey) Returns the object ID bytes associated with the specified key.voidputObject(byte[] metadataKey, byte[] metadataValue, byte[] key, byte[] value) Stores the specified key-value object with metadata.voidputObjectId(byte[] metadataKey, byte[] metadataValue, byte[] key, byte[] value, byte[] previousKeyToRemove) Stores the specified key-value pair with metadata.voidremoveWdek(String projectName, String repoName) Removes the wrapped data encryption key (WDEK) for the specified project and repository.voidstoreSessionMasterKey(SessionMasterKey sessionMasterKey) Stores the session master key.voidStores the wrapped data encryption key (WDEK) for the specified project and repository.static NoopEncryptionStorageManagerReturns the enum constant of this class with the specified name.static NoopEncryptionStorageManager[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
Singleton instance ofNoopEncryptionStorageManager.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
enabled
public boolean enabled()Description copied from interface:EncryptionStorageManagerReturnstrueif the encryption at rest is enabled.- Specified by:
enabledin interfaceEncryptionStorageManager
-
encryptSessionCookie
public boolean encryptSessionCookie()Description copied from interface:EncryptionStorageManagerReturnstrueif the session cookie should be encrypted.- Specified by:
encryptSessionCookiein interfaceEncryptionStorageManager
-
generateWdek
Description copied from interface:EncryptionStorageManagerGenerates a new data encryption key (DEK) and wraps it.- Specified by:
generateWdekin interfaceEncryptionStorageManager
-
generateSessionMasterKey
Description copied from interface:EncryptionStorageManagerGenerates a new session master key.- Specified by:
generateSessionMasterKeyin interfaceEncryptionStorageManager
-
storeSessionMasterKey
Description copied from interface:EncryptionStorageManagerStores the session master key.- Specified by:
storeSessionMasterKeyin interfaceEncryptionStorageManager
-
getCurrentSessionKey
Description copied from interface:EncryptionStorageManagerReturns the current session master key.- Specified by:
getCurrentSessionKeyin interfaceEncryptionStorageManager
-
getDek
Description copied from interface:EncryptionStorageManagerReturns the data encryption key (DEK) for the specified project and repository.- Specified by:
getDekin interfaceEncryptionStorageManager
-
getCurrentDek
Description copied from interface:EncryptionStorageManagerReturns the current wrapped data encryption key (WDEK) for the specified project and repository.- Specified by:
getCurrentDekin interfaceEncryptionStorageManager
-
storeWdek
Description copied from interface:EncryptionStorageManagerStores the wrapped data encryption key (WDEK) for the specified project and repository. This raises an exception if the WDEK already exists.- Specified by:
storeWdekin interfaceEncryptionStorageManager
-
removeWdek
Description copied from interface:EncryptionStorageManagerRemoves the wrapped data encryption key (WDEK) for the specified project and repository.- Specified by:
removeWdekin interfaceEncryptionStorageManager
-
getObject
public byte[] getObject(byte[] key, byte[] metadataKey) Description copied from interface:EncryptionStorageManagerReturns the object associated with the specified key.- Specified by:
getObjectin interfaceEncryptionStorageManager
-
getObjectId
public byte[] getObjectId(byte[] key, byte[] metadataKey) Description copied from interface:EncryptionStorageManagerReturns the object ID bytes associated with the specified key.- Specified by:
getObjectIdin interfaceEncryptionStorageManager
-
getMetadata
public byte[] getMetadata(byte[] metadataKey) Description copied from interface:EncryptionStorageManagerReturns the value of the specified metadata key.- Specified by:
getMetadatain interfaceEncryptionStorageManager
-
putObject
public void putObject(byte[] metadataKey, byte[] metadataValue, byte[] key, byte[] value) Description copied from interface:EncryptionStorageManagerStores the specified key-value object with metadata.- Specified by:
putObjectin interfaceEncryptionStorageManager
-
putObjectId
public void putObjectId(byte[] metadataKey, byte[] metadataValue, byte[] key, byte[] value, @Nullable byte[] previousKeyToRemove) Description copied from interface:EncryptionStorageManagerStores the specified key-value pair with metadata. ThepreviousKeyToRemovewill be removed.- Specified by:
putObjectIdin interfaceEncryptionStorageManager
-
containsMetadata
public boolean containsMetadata(byte[] key) Description copied from interface:EncryptionStorageManagerReturnstrueif the specified key exists.- Specified by:
containsMetadatain interfaceEncryptionStorageManager
-
deleteObjectId
public void deleteObjectId(byte[] metadataKey, byte[] key) Description copied from interface:EncryptionStorageManagerDeletes the specified keys.- Specified by:
deleteObjectIdin interfaceEncryptionStorageManager
-
deleteRepositoryData
Description copied from interface:EncryptionStorageManagerDeletes all data related to the specified project and repository.- Specified by:
deleteRepositoryDatain interfaceEncryptionStorageManager
-
getAllData
Description copied from interface:EncryptionStorageManagerReturns all data stored in the encryption storage manager.- Specified by:
getAllDatain interfaceEncryptionStorageManager
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSafeCloseable
-