public class DefaultSecretsGroupManager extends java.lang.Object implements SecretsGroupManager
Constructor and Description |
---|
DefaultSecretsGroupManager() |
DefaultSecretsGroupManager(com.amazonaws.auth.AWSCredentialsProvider awsCredentials) |
DefaultSecretsGroupManager(com.amazonaws.auth.AWSCredentialsProvider awsCredentials,
com.schibsted.security.strongbox.sdk.internal.types.config.UserConfig userConfig) |
DefaultSecretsGroupManager(com.amazonaws.auth.AWSCredentialsProvider awsCredentials,
com.schibsted.security.strongbox.sdk.internal.types.config.UserConfig userConfig,
EncryptionStrength encryptionStrength) |
DefaultSecretsGroupManager(com.amazonaws.auth.AWSCredentialsProvider awsCredentials,
com.schibsted.security.strongbox.sdk.internal.types.config.UserConfig userConfig,
EncryptionStrength encryptionStrength,
ClientConfiguration clientConfiguration) |
Modifier and Type | Method and Description |
---|---|
void |
attachAdmin(SecretsGroupIdentifier group,
Principal principal)
Attach the
Principal to the SecretsGroup as an admin. |
void |
attachReadOnly(SecretsGroupIdentifier group,
Principal principal)
Attach the
Principal to the SecretsGroup as a read-only user. |
void |
backup(SecretsGroupIdentifier group,
com.schibsted.security.strongbox.sdk.internal.kv4j.generated.Store backupStore,
boolean failIfBackupStoreAlreadyExists) |
SecretsGroupInfo |
create(SecretsGroupIdentifier group)
Create a new secrets group.
|
SecretsGroupInfo |
create(SecretsGroupIdentifier group,
com.schibsted.security.strongbox.sdk.internal.types.store.StorageReference storageReference) |
SecretsGroupInfo |
create(SecretsGroupIdentifier group,
com.schibsted.security.strongbox.sdk.internal.types.store.StorageReference storageReference,
boolean allowExistingPendingDeletedOrDisabledKey) |
void |
delete(SecretsGroupIdentifier group)
Delete a
SecretsGroup and its underlying resources. |
void |
detachAdmin(SecretsGroupIdentifier group,
Principal principal)
Remove the
Principal 's admin privileges from the SecretsGroup . |
void |
detachReadOnly(SecretsGroupIdentifier group,
Principal principal)
Remove the
Principal 's read-only privileges from the SecretsGroup . |
com.schibsted.security.strongbox.sdk.internal.encryption.Encryptor |
encryptor(SecretsGroupIdentifier group) |
SecretsGroup |
get(SecretsGroupIdentifier group)
Get an instance of the
SecretsGroup . |
java.util.Set<SecretsGroupIdentifier> |
identifiers()
List the identifiers that are under management.
|
SecretsGroupInfo |
info(SecretsGroupIdentifier group)
Get information about a
SecretsGroup . |
SecretsGroupInfo |
migrate(SecretsGroupIdentifier group,
com.schibsted.security.strongbox.sdk.internal.types.store.StorageReference newStorageReference) |
void |
restore(SecretsGroupIdentifier group,
com.schibsted.security.strongbox.sdk.internal.kv4j.generated.Store backupStore,
boolean failIfStoreToRestoreAlreadyExists) |
SRN |
srn(SecretsGroupIdentifier group) |
public DefaultSecretsGroupManager()
public DefaultSecretsGroupManager(com.amazonaws.auth.AWSCredentialsProvider awsCredentials)
public DefaultSecretsGroupManager(com.amazonaws.auth.AWSCredentialsProvider awsCredentials, com.schibsted.security.strongbox.sdk.internal.types.config.UserConfig userConfig)
public DefaultSecretsGroupManager(com.amazonaws.auth.AWSCredentialsProvider awsCredentials, com.schibsted.security.strongbox.sdk.internal.types.config.UserConfig userConfig, EncryptionStrength encryptionStrength)
public DefaultSecretsGroupManager(com.amazonaws.auth.AWSCredentialsProvider awsCredentials, com.schibsted.security.strongbox.sdk.internal.types.config.UserConfig userConfig, EncryptionStrength encryptionStrength, ClientConfiguration clientConfiguration)
public SRN srn(SecretsGroupIdentifier group)
public SecretsGroupInfo create(SecretsGroupIdentifier group)
SecretsGroupManager
create
in interface SecretsGroupManager
group
- the identifier of the SecretsGroup
to be createdpublic SecretsGroupInfo create(SecretsGroupIdentifier group, com.schibsted.security.strongbox.sdk.internal.types.store.StorageReference storageReference)
public SecretsGroupInfo create(SecretsGroupIdentifier group, com.schibsted.security.strongbox.sdk.internal.types.store.StorageReference storageReference, boolean allowExistingPendingDeletedOrDisabledKey)
public com.schibsted.security.strongbox.sdk.internal.encryption.Encryptor encryptor(SecretsGroupIdentifier group)
public SecretsGroup get(SecretsGroupIdentifier group)
SecretsGroupManager
SecretsGroup
. The underlying implementation is responsible
for tracking the necessary resources needed to construct the object.get
in interface SecretsGroupManager
group
- the identifier of the SecretsGroup
to be retrievedSecretsGroup
public java.util.Set<SecretsGroupIdentifier> identifiers()
SecretsGroupManager
identifiers
in interface SecretsGroupManager
SecretsGroupIdentifier
that is under managementpublic SecretsGroupInfo info(SecretsGroupIdentifier group)
SecretsGroupManager
SecretsGroup
. This method is best effort,
and may return partial information. This is useful if debugging the underlying
resources of a SecretsGroup
.info
in interface SecretsGroupManager
group
- the identifier of the SecretsGroup
to get information aboutSecretsGroupInfo
related to the SecretsGroup
public void delete(SecretsGroupIdentifier group)
SecretsGroupManager
SecretsGroup
and its underlying resources. This method will attempt to delete all
resources of the given (@code SecretsGroup}, and will simply ignore any resource that does not exists.delete
in interface SecretsGroupManager
group
- the identifier of the SecretsGroup
to deletepublic void attachAdmin(SecretsGroupIdentifier group, Principal principal)
SecretsGroupManager
Principal
to the SecretsGroup
as an admin. This will give the
Principal
full access to the SecretsGroup
.attachAdmin
in interface SecretsGroupManager
group
- identifier of the SecretsGroup
to attach the principal
toprincipal
- Principal
to be attachedpublic void detachAdmin(SecretsGroupIdentifier group, Principal principal)
SecretsGroupManager
Principal
's admin privileges from the SecretsGroup
.detachAdmin
in interface SecretsGroupManager
group
- identifier of the SecretsGroup
to detach principal
fromprincipal
- Principal
to be detachedpublic void detachReadOnly(SecretsGroupIdentifier group, Principal principal)
SecretsGroupManager
Principal
's read-only privileges from the SecretsGroup
.detachReadOnly
in interface SecretsGroupManager
group
- identifier of the SecretsGroup
to detach the principal
fromprincipal
- Principal
to be detachedpublic void attachReadOnly(SecretsGroupIdentifier group, Principal principal)
SecretsGroupManager
Principal
to the SecretsGroup
as a read-only user. This will give the
Principal
read-only access to the SecretsGroup
(i.e. ability to read secrets).attachReadOnly
in interface SecretsGroupManager
group
- identifier of the SecretsGroup
to attach the principal
toprincipal
- Principal
to be attachedpublic void backup(SecretsGroupIdentifier group, com.schibsted.security.strongbox.sdk.internal.kv4j.generated.Store backupStore, boolean failIfBackupStoreAlreadyExists)
public void restore(SecretsGroupIdentifier group, com.schibsted.security.strongbox.sdk.internal.kv4j.generated.Store backupStore, boolean failIfStoreToRestoreAlreadyExists)
public SecretsGroupInfo migrate(SecretsGroupIdentifier group, com.schibsted.security.strongbox.sdk.internal.types.store.StorageReference newStorageReference)