Integration with Key module

Created on 25 August 2025, 23 days ago

Problem/Motivation

Currently, the Acquia Optimize module stores API key and URL within the configuration, which poses security risks. The Drupal Key module provides a mechanism to manage secrets securely by storing keys outside of Drupal config (e.g., in environment variables or external files) and providing them when needed.

Proposed resolution

This module should enhance security in this module by integrating with the Drupal Key module. This integration will ensure sensitive API key and URL are not stored directly in the module's configuratio but are instead securely retrieved via the Key module on demand.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇮🇳India vipin.mittal18 Greater Noida

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @vipin.mittal18
  • First commit to issue fork.
  • First commit to issue fork.
  • Pipeline finished with Failed
    20 days ago
    Total: 297s
    #584145
  • Pipeline finished with Failed
    20 days ago
    #584284
  • Pipeline finished with Failed
    20 days ago
    #584294
  • Pipeline finished with Success
    20 days ago
    #584355
  • 🇮🇳India ankitv18

    ankitv18 changed the visibility of the branch 3542913-integration-with-key to hidden.

  • 🇮🇳India rajeshreeputra Pune

    Created MR with following:

    • Add key module in dev dependency
    • Update configuration form allowing to use the Key module to get api key.
    • Manually created a simple authentication key using file key provider and used in config form for key based authentication.
    • Added new getCredentials() to retrieve API key and url from keyValue or config as per key module used.
    • Verified the functionality.
    • Added test coverage for key module integration.

    How to use key module with Acquia Optimize:

    1. Require and install key module.
    2. Create new key with file key provider or any other, I am using the file key provider to create the Acquia Optimize credentials key.
    3. Add required details to file, i.e. api_key and api_url as json.
    4. Visit /admin/config/content/acquia-optimize:
      • You will see a new checkbox option(Use Key module for API key storage) under the API Key Configuration.
      • Check the checkbox option.
      • The API Key dropdown field will appear, allowing you to select the key from the list.
      • Choose the Acquia Optimize credentials key.
      • Click on Save configurations.

    5. You will receive a success or error message based on the data in the file path provided in the key.

    Remaining work:

    • Update Acquia Optimize extention to support key module integration.
  • Pipeline finished with Failed
    16 days ago
    Total: 223s
    #586911
  • Pipeline finished with Failed
    16 days ago
    Total: 253s
    #586928
Production build 0.71.5 2024