Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public class KMS {
private static final String KEY_NAME_VALIDATION = "[a-z,A-Z,0-9](?!.*--)(?!.*__)(?!.*-_)(?!.*_-)[\\w\\-\\_]*";
private static final int MAX_NUM_PER_BATCH = 10000;
private static final String GENERATE_DEK_PATH_CONST = "_dek";
private static final int DEFAULT_KEY_SIZE = 256;

private final KeyProviderCryptoExtension provider;
private final KMSAudit kmsAudit;
Expand Down Expand Up @@ -113,7 +114,7 @@ public Response createKey(Map jsonKey, @Context HttpServletRequest request) thro

final String cipher = (String) jsonKey.get(KMSRESTConstants.CIPHER_FIELD);
final String material = (String) jsonKey.get(KMSRESTConstants.MATERIAL_FIELD);
final int length = (jsonKey.containsKey(KMSRESTConstants.LENGTH_FIELD)) ? (Integer) jsonKey.get(KMSRESTConstants.LENGTH_FIELD) : 0;
final int length = (jsonKey.containsKey(KMSRESTConstants.LENGTH_FIELD)) ? (Integer) jsonKey.get(KMSRESTConstants.LENGTH_FIELD) : DEFAULT_KEY_SIZE;
final String description = (String) jsonKey.get(KMSRESTConstants.DESCRIPTION_FIELD);

LOG.debug("Creating key: name={}, cipher={}, keyLength={}, description={}", name, cipher, length, description);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class VXKmsKey extends VXDataObject implements java.io.Serializable {
/**
* Length
*/
protected int length;
protected int length = 256;
/**
* Description
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ function KeyCreate(props) {
initialValues={{
attributes: [{ name: "", value: "" }],
cipher: "AES/CTR/NoPadding",
length: "128"
length: "256"
}}
render={({
handleSubmit,
Expand Down
Loading