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 TypeMethodDescriptionvoid
close()
boolean
containsMetadata
(byte[] key) Returnstrue
if the specified key exists.void
deleteObjectId
(byte[] metadataKey, byte[] key) Deletes the specified keys.void
deleteRepositoryData
(String projectName, String repoName) Deletes all data related to the specified project and repository.boolean
enabled()
Returnstrue
if the encryption at rest is enabled.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 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.void
putObject
(byte[] metadataKey, byte[] metadataValue, byte[] key, byte[] value) Stores the specified key-value object with metadata.void
putObjectId
(byte[] metadataKey, byte[] metadataValue, byte[] key, byte[] value, byte[] previousKeyToRemove) Stores the specified key-value pair with metadata.void
removeWdek
(String projectName, String repoName) Removes the wrapped data encryption key (WDEK) for the specified project and repository.void
Stores the wrapped data encryption key (WDEK) for the specified project and repository.static NoopEncryptionStorageManager
Returns 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:EncryptionStorageManager
Returnstrue
if the encryption at rest is enabled.- Specified by:
enabled
in interfaceEncryptionStorageManager
-
generateWdek
Description copied from interface:EncryptionStorageManager
Generates a new data encryption key (DEK) and wraps it.- Specified by:
generateWdek
in interfaceEncryptionStorageManager
-
getDek
Description copied from interface:EncryptionStorageManager
Returns the data encryption key (DEK) for the specified project and repository.- Specified by:
getDek
in interfaceEncryptionStorageManager
-
getCurrentDek
Description copied from interface:EncryptionStorageManager
Returns the current wrapped data encryption key (WDEK) for the specified project and repository.- Specified by:
getCurrentDek
in interfaceEncryptionStorageManager
-
storeWdek
Description copied from interface:EncryptionStorageManager
Stores the wrapped data encryption key (WDEK) for the specified project and repository. This raises an exception if the WDEK already exists.- Specified by:
storeWdek
in interfaceEncryptionStorageManager
-
removeWdek
Description copied from interface:EncryptionStorageManager
Removes the wrapped data encryption key (WDEK) for the specified project and repository.- Specified by:
removeWdek
in interfaceEncryptionStorageManager
-
getObject
public byte[] getObject(byte[] key, byte[] metadataKey) Description copied from interface:EncryptionStorageManager
Returns the object associated with the specified key.- Specified by:
getObject
in interfaceEncryptionStorageManager
-
getObjectId
public byte[] getObjectId(byte[] key, byte[] metadataKey) Description copied from interface:EncryptionStorageManager
Returns the object ID bytes associated with the specified key.- Specified by:
getObjectId
in interfaceEncryptionStorageManager
-
getMetadata
public byte[] getMetadata(byte[] metadataKey) Description copied from interface:EncryptionStorageManager
Returns the value of the specified metadata key.- Specified by:
getMetadata
in interfaceEncryptionStorageManager
-
putObject
public void putObject(byte[] metadataKey, byte[] metadataValue, byte[] key, byte[] value) Description copied from interface:EncryptionStorageManager
Stores the specified key-value object with metadata.- Specified by:
putObject
in interfaceEncryptionStorageManager
-
putObjectId
public void putObjectId(byte[] metadataKey, byte[] metadataValue, byte[] key, byte[] value, @Nullable byte[] previousKeyToRemove) Description copied from interface:EncryptionStorageManager
Stores the specified key-value pair with metadata. ThepreviousKeyToRemove
will be removed.- Specified by:
putObjectId
in interfaceEncryptionStorageManager
-
containsMetadata
public boolean containsMetadata(byte[] key) Description copied from interface:EncryptionStorageManager
Returnstrue
if the specified key exists.- Specified by:
containsMetadata
in interfaceEncryptionStorageManager
-
deleteObjectId
public void deleteObjectId(byte[] metadataKey, byte[] key) Description copied from interface:EncryptionStorageManager
Deletes the specified keys.- Specified by:
deleteObjectId
in interfaceEncryptionStorageManager
-
deleteRepositoryData
Description copied from interface:EncryptionStorageManager
Deletes all data related to the specified project and repository.- Specified by:
deleteRepositoryData
in interfaceEncryptionStorageManager
-
getAllData
Description copied from interface:EncryptionStorageManager
Returns all data stored in the encryption storage manager.- Specified by:
getAllData
in interfaceEncryptionStorageManager
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSafeCloseable
-