Customer managed encryption key (CMEK)
Veracode uses a root encryption key to encrypt your data and assets that are transmitted across networks for security scans. For each asset, such as binary uploads and PDF reports of scan results, Veracode generates a data key from the root encryption key to encrypt and decrypt the corresponding asset at various stages of security testing.
Veracode Customer Managed Encryption Key (CMEK) provides an additional level of isolation and control over your assets by giving you the option to provide your own root encryption key. When CMEK is enabled, Veracode uses your root encryption key instead of Veracode's key. You manage your root key within your environment and you can revoke access to assets secured by it at any time.
CMEK is particularly important when regulatory requirements or internal policy require you to maintain greater control over how your assets are secured and how quickly access can be revoked.
CMEKs encrypt the following data:
- Packaged application binaries uploaded to the Veracode Platform
- Results and index files generated by the Veracode Platform
- Downloadable PDF reports generated by the Veracode Platform
Prerequisites and limitations
Veracode CMEK uses a root encryption key located and managed in the key management system of your environment.
Veracode CMEK currently supports only the AWS key management system.
CMEK relies on access policies configured in your AWS environment. As the customer, you are responsible for ensuring that you provide only the required access to Veracode and inhibit the exposure of other AWS Key Management Service (KMS) secrets or assets in the account.
In AWS, select an AWS region according to the following table or an AWS region geographically nearest to the Veracode account region.
Veracode account region | AWS region |
---|---|
US | us-east-1 |
EU | eu-central-1 |
To select an AWS region:
- Log into your AWS account.
- Locate the AWS banner on the top of the AWS page.
- The option to select a region is on the right side of the banner.
Activate Customer Managed Encryption Key
To activate Customer Managed Encryption Key, contact your Veracode customer support manager.
Set up Customer Managed Encryption Key
To setup CMEK, complete the following tasks:
- Configure user and permissions in AWS KMS
- Configure a root encryption key
- Enable the Veracode Platform to access the AWS account
- Configure a new Veracode application to use CMEK
- Reconfigure an application to use CMEK
- Validate CMEK configuration
Configure user and permissions in AWS KMS
For Veracode to access your root encryption key, you must provision an AWS IAM user with the required permissions.
To complete this task:
- Create an AWS IAM Policy
- Attach the IAM policy to an AWS IAM user
- Generate access credentials for the IAM user
Create an AWS IAM policy
-
Sign in to your AWS account.
-
Under Console Home, select IAM.
-
Under Access Management, select Policies.
-
Select Create policy.
-
For Policy editor, select JSON.
-
Copy the JSON policy below and paste it into the policy editor:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"kms:Decrypt",
"kms:Encrypt",
"kms:GenerateDataKeyWithoutPlaintext",
"kms:DescribeKey"
],
"Resource": "*"
}
]
}ImportantYou must review the IAM policy to ensure that it provides only the necessary access to Veracode to enable CMEK, prohibits unnecessary actions, inhibits the exposure of unrelated information, and complies with your security policies and practices.
-
Select Next. The Review and create page opens.
-
For Policy name, enter a policy name.
-
Select Create policy.
Attach the IAM policy to an AWS IAM user
In this step, create an AWS IAM user and attach the policy you created to the user.
-
Sign in to your AWS account.
-
Under Console Home, select IAM.
-
Select Create user.
-
For User name, enter a user name.
ImportantVeracode recommends that this user is not provided access to the AWS Management console. So, do not select Provide user access to the AWS Management console.
-
Select Next. The Set permissions page opens.
-
Under Permissions options, select Attach policies directly.
-
Under Permissions policies, search for the policy that you created.
-
Select your policy and then select Next.
-
Select Create user.
Generate access credentials for the IAM user
- Log into your AWS account.
- Under Console Home, select IAM.
- Select the user you created.
- Select the Security credentials tab.
- Under Access keys, select Create access key.
- In Access key best practices & alternatives, under Use case, select Application running outside AWS. Then, select Next.
- In Set description, you may optionally provide a tag. Then, select Next.
- In Retrieve access keys, you will find the Access key and Secret access key. Select Show under Secret access key to see the key.
- Copy the access key and the secret access key and save it in a secure location. The only time the access key and secret access key is available is when you are creating it. Hence, make sure that you save this in a secure location.
- Select Done. The user information page is displayed.
Configure a root encryption key
You may use an AWS-generated key to create the root key, or create the root key using a key that has been generated outside AWS KMS. If you decide to use a key that is generated outside AWS, ensure you have the key before proceeding.
To complete this task:
-
Sign in to your AWS account.
-
Under Console Home, select Key Management Service.
-
Select Create key. The Configure key page opens.
-
Select the options in one of the following tables based on whether you want to generate a root key from a new AWS KMS key or an external key:
If you decide to use an AWS-generated key to create the root key, use the options in the following table:
Key type Key usage Advanced options, Key material origin Regionality Symmetric Encrypt and Decrypt KMS – recommended Single-Region key If you decide to use an external key to create the root key, use the options in the following table:
Key type Key usage Advanced options, Key material origin Regionality Symmetric Encrypt and Decrypt External (Import Key material) Single-Region key Follow the guidelines provided by AWS for using an external key.
-
Select Next. The Add labels page opens.
-
Enter an alias. Optionally, you can provide a description and assign tags based on your organization’s policies.
-
Select Next. The Define key administrative permissions - Optional page opens.
-
Under Key administrators, select the AWS administrative user who is allowed to manage the key.
-
Under Key deletion, select Allow key administrators to delete this key.
-
Select Next. The Define key usage permissions - Optional page opens. Select AWS IAM user that we created earlier. This is the user who will use this key.
-
Select Next. The Edit key policy - optional page opens. Review the policy key to ensure the correct permissions and restrictions are in place for using the key securely.
You must review the KMS Key policy to ensure that it provides only the required access to Veracode to enable CMEK, prohibits unnecessary actions, inhibits the exposure of unrelated information, and complies with your security policies and practices.
- Select Next. The Review page opens.
- Review the KMS key configuration, and then select Finish.
You have completed generating the root key. Save the alias of the AWS key to a secure location. You will need it to configure Veracode applications to use CMEK.
Enable the Veracode Platform to access the AWS account
After you have configured user permissions, generated access credentials, and configured the root key, the next step is to contact Veracode support to enable CMEK on the Veracode Platform. Veracode support will request the following information to enable the Veracode Platform to access the root encryption key stored in your AWS KMS:
- Access key
- Secret access key
- AWS region
- AWS account
After you provide this information, Veracode will configure the Veracode Platform to access the root encryption key stored in AWS KMS.
Configure a new Veracode application to use CMEK
To configure a new Veracode application to use Customer Managed Encryption Key (CMEK), run the application profile creation API with the field custom_kms_alias
in the payload.
You can enable CMEK for a new application only using the Veracode REST API. You cannot do this from the Veracode Platform user interface. If you set up a new application from the Veracode Platform user interface, it will always use Veracode Managed Key.
The field custom_kms_alias
is a key-value pair that takes the alias of the root key as the input.
In the following code snippet from the application creation REST API, the custom_kms_alias
field takes the alias of the root key (string datatype) as the input.
"custom_fields": [
{
"name": "string",
"value": "string"
}
],
"custom_kms_alias": "string",
"description": "string",
"name": "string",
"policies": [
{
"guid": "string",
"is_default": true,
"name": "string",
"policy_compliance_status": "DETERMINING"
}
],
Reconfigure an application to use CMEK
You can reconfigure applications that use Veracode Managed Key to, instead, use CMEK.
To reconfigure an existing application to use CMEK, complete the same steps as configuring a new Veracode application to use CMEK.
After you configure an existing application to use CMEK, all new assets will be encrypted using the CMEK. In addition, the key rotation process will be initiated to encrypt all existing assets, that were previously encrypted with Veracode Managed Key, with the new CMEK.
To display applications that use Veracode Managed key, in Analytics, create a query that will show the Custom KMS Alias for applications. Then, apply a filter to display only applications that have an empty Custom CMK Alias field. Refer Validate CMEK configuration.
Validate CMEK configuration
You can validate that CMEK has been properly configured on an application using Analytics.
To complete this task:
-
In the Veracode Platform, select Analytics and then select Explore Your Data.
-
Under Explore Your Data, select Applications.
-
Create a query that will show the Custom KMS Alias for applications. To do so, select the dimensions Application ID, Application Name and Custom KMS Alias.
-
To display only applications with a CMK alias, use the Filters option.
-
To run the query, select Run.
If the custom KMS alias is configured properly for an application, you will see your application displayed along with the corresponding custom KMS alias.
Rotate your key
You should periodically rotate or change your CMEK as per the requirements of your regulatory, compliance, or internal policy.
To rotate your CMEK, configure a new root encryption key and reconfigure your applications to use the new root encryption key.
Revoke access to CMEK
You can temporarily withhold or permanently revoke Veracode access to your assets stored on the Veracode Platform. However, be careful to ensure that you do not unintentionally permanently revoke access to your assets.
Veracode cannot recover your root key or your assets on Veracode platform if you intentionally or unintentionally delete your AWS KMS root key and revoke access.
If you don't properly configure AWS KMS key and access permissions for applications that use CMEK, Veracode cannot provide support for these applications.
CMEK only encrypts specific types of data on the Veracode Platform. If you want all data in your account to be encrypted, contact Veracode Support.
The following table shows the actions that you can perform on your root key to revoke access. It also displays the result of each action, and how you may be able to undo the action.
Action | Effect | Recovery procedure |
---|---|---|
Delete AWS KMS key | Permanent access revocation | You cannot undo this action unless you cancel the scheduled key deletion within the configured waiting period. |
Disable AWS KMS key | Temporary access revocation | Your AWS KMS administrator can enable the key again in AWS KMS. |
Remove IAM permissions from the AWS IAM user | Temporary access revocation | You can provide the IAM permissions to the AWS IAM user again. |
Remove access credentials from the AWS IAM user | Temporary access revocation | You can create new access credentials for the AWS IAM user and provide them to Veracode Support. |