Storage encryption

Updated at:

Enabling storage encryption protects sensitive data in MaxCompute projects, such as personally identifiable information, financial records, and health records, from unauthorized access. MaxCompute supports encrypting data at rest by using Key Management Service (KMS) to meet enterprise regulatory and security compliance requirements.

How it works

MaxCompute uses KMS-managed keys to encrypt and decrypt data:

  • Encryption and decryption operate at the project level.

  • KMS generates, manages, and secures the customer master key (CMK).

  • MaxCompute supports the AES256, AESCTR, and RC4 encryption algorithms.

  • MaxCompute supports two key types: the MaxCompute Default Key and bring-your-own-key (BYOK).

    • MaxCompute Default Key

      • MaxCompute automatically creates a key in KMS to use as the CMK. You can view the details of this key in the KMS console.

    • If you have specific business or security requirements, you can use a BYOK to encrypt and decrypt data.

      • To use a BYOK, manually activate KMS and call CreateKey to create a key.

      • Follow the on-screen instructions to complete RAM authorization, allowing MaxCompute to create a project that uses your BYOK.

  • MaxCompute supports custom RAM permission policies to control whether new projects are encrypted. For more information about the policies, see RAM permissions.

Usage notes

  • To use a BYOK, activate KMS in the same region as your MaxCompute project.

  • To access MaxCompute data from a Hologres external table:

    • Hologres must be V1.1 or later with KMS permissions granted. For regions in the China mainland, BYOK supports only KMS in the China (Shanghai) region. For the China (Hong Kong) region and regions outside the China mainland, KMS in the corresponding region is supported. For more information, see Query encrypted MaxCompute data.

    • Starting from Hologres V3.2, you can use the Common Table access path to query encrypted MaxCompute data. This mode requires no additional policy configuration and supports projects encrypted with either the Default Key or a KMS key. For more information, see Common Table.

  • Actions on your BYOK in KMS, such as disabling or deleting the key, affect MaxCompute encryption and decryption. Due to service caching, KMS changes take effect within 24 hours.

  • You cannot change storage encryption settings after a project is created, including disabling encryption or changing the algorithm.

  • Enabling storage encryption for an existing project does not automatically encrypt existing data or affect read/write operations. To encrypt existing data, manually read and rewrite it.

Billing

Storage encryption itself is free, but KMS API calls during encryption and decryption incur KMS charges. For more information, see KMS billing.

Enable storage encryption for a new project

When storage encryption is enabled, MaxCompute automatically encrypts and decrypts all data read from and written to the project.

Method 1: Enable in the MaxCompute console

  1. If KMS is already activated in your target region, you can skip this step.

    On the Key Management Service activation page, click Activate Now.

  2. Log in to the MaxCompute console and select a region in the upper-left corner.

  3. In the left-side navigation pane, choose Manage Configurations > Projects.

  4. On the Internal Project tab, click Create Project.

  5. In the Create Project dialog box, configure the settings and click OK.

    • Set Storage Encryption to Yes, and then select a Key and the corresponding Algorithm.

    • Key: The key type used by the project. Options include the default key created internally by MaxCompute (MaxCompute Default Key) and bring-your-own-key (BYOK).

      • To use the default key, select MaxCompute Default Key.

      • To use a BYOK, select CMK.

    • Algorithm: The encryption algorithm. Supported: AES256, AESCTR, and RC4.

Method 2: Enable in DataWorks

  1. If KMS is already activated in your target region, you can skip this step.

    On the Key Management Service activation page, click Activate Now.

  2. Log in to the DataWorks console and select a region in the upper-left corner.

  3. In the navigation pane on the left, choose Workspace.

  4. On the Workspaces page, click Create Workspace.

    For more information, see Create a workspace.

  5. Associate a MaxCompute compute resource.

    1. After the workspace is created, go to the Workspaces page, find the target workspace, and click Manage in the Actions column.

    2. On the Workspace Details page, click Computing Resource in the navigation pane on the left.

    3. On the Computing Resource page, click Associate Computing Resources, and select MaxCompute.

    4. Configure the Basic Information for Associate MaxCompute Computing Resource.

      • For MaxCompute Project, click Create.

      • Set Storage Encryption to Yes, and then select a Key and the corresponding Algorithm.

      • Key: The key type used by the project. Options include the default key created internally by MaxCompute (MaxCompute Default Key) and bring-your-own-key (BYOK).

        • To use the default key, select MaxCompute Default Key.

        • To use a BYOK, select CMK.

      • Algorithm: The encryption algorithm. Supported: AES256, AESCTR, and RC4.

Enable storage encryption for an existing project

You can enable storage encryption only for unencrypted projects. Once enabled, you cannot disable encryption or change the algorithm.

  1. Configure permissions

    • Enabling storage encryption requires modifying the parameters in the MaxCompute project's Basic Properties. This operation uses RAM for authorization and requires the Super_Administrator role for the corresponding project.

    • Configuring the permission properties and IP address whitelist parameters of a MaxCompute project requires administrative permissions for the corresponding project, such as the Super_Administrator or Admin role, or custom administrative permissions.

    • Project management permissions. Use RAM for access control.

  2. Log in to the MaxCompute console and select a region in the upper-left corner.

  3. In the left-side navigation pane, choose Manage Configurations > Projects.

  4. On the Projects page, click Manage in the Actions column for the target project.

  5. On the Project Settings page, click the Parameter Configuration tab.

  6. In the Basic Properties section, click Edit.

    • Set Storage Encryption to Yes, and then select a Key and the corresponding Algorithm.

    • Key: The key type used by the project. Options include the default key created internally by MaxCompute (MaxCompute Default Key) and bring-your-own-key (BYOK).

      • To use the default key, select MaxCompute Default Key.

      • To use a BYOK, select CMK.

    • Algorithm: The encryption algorithm. Supported: AES256, AESCTR, and RC4.

  7. Click Submit to enable storage encryption for the existing project.

References