Use Key module for API keys

Created on 8 July 2024, 2 months ago
Updated 9 July 2024, 2 months ago

Problem/Motivation

Key module ( https://www.drupal.org/project/key ) provides a variety of secure ways to store API keys.

It would be good to integrated with this.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom joachim

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

Comments & Activities

  • Issue created by @joachim
  • 🇳🇱Netherlands seanB Netherlands

    I think you can technically already use ENV variables or external services to fetch values for the settings.
    $settings['media.external_provider.unsplash.access_key'] = getenv('UNSPLASH_ACCESS_KEY');

    I'm not opposed to adding support for the key module. Does the key module allows overrides for settings as well, or only for configuration?

  • 🇬🇧United Kingdom joachim

    Key module is just for storing API keys.

    You declare a key as a config entity. It can then be obtained in a variety of ways -- set in config for local development, or from a file or environment variable on prod.

Production build 0.71.5 2024