public final class MasterKeyRequest extends Authentication
The MasterKey Request Object is needed to change the internally used MasterKey. The MasterKey is not persisted but must be set when the system is started to "unlock" it. The same request can also be used to lock a running system, so nothing will work.
MasterKey's is used to encrypt/decrypt the "salt" of a member, which is a piece of static information used to check the member credentials. The MasterKey is also used to encrypt/decrypt all IVs or Initial Vectors, which is the initial random information used to encrypt and decrypt a piece of data in the system. So, without the MasterKey, neither Member accounts nor data can be retrieved, as it acts as a second lock for both parts.
Either the secret or a URL to a secret must be given. This is mandatory information, which must be provided to alter the MasterKey. Setting a new MasterKey can only be performed before adding Member Accounts, since it is not possible to re-encrypt the Member Accounts later, as the keys are all stores encrypted and can only be decrypted with member secrets.
Please see Authentication
for information about the account and
credentials information.
Constructor and Description |
---|
MasterKeyRequest() |
Modifier and Type | Method and Description |
---|---|
byte[] |
getSecret() |
String |
getUrl() |
void |
setSecret(byte[] secret) |
void |
setUrl(String url) |
Map<String,String> |
validate()
Simple Validation method, which checks if the required values are usable
or not.
|
getAccountName, getCredential, getCredentialType, setAccountName, setCredential, setCredentialType
checkIntegerWithMax, checkNotNull, checkNotNullAndValidId, checkNotNullEmptyOrTooLong, checkNotNullOrEmpty, checkNotNullOrEmpty, checkNotTooLong, checkUrl, checkValidId, isEmpty
public void setSecret(byte[] secret)
public byte[] getSecret()
public void setUrl(String url)
public String getUrl()
public Map<String,String> validate()
validate
in class Authentication
Copyright © 2019 JavaDog.io. All rights reserved.