Skip to content

Drupal module to integrate the Key module with Pantheon secrets

Notifications You must be signed in to change notification settings

pantheon-systems/pantheon_secrets

Repository files navigation

Pantheon Secrets

Pantheon Secrets integration with the Key module.

Pantheon Secrets

Limited Availability

Requirements

This module is for you if you meet the following requirements:

  • Using Drupal >= 9.4

  • Use PHP >= 8.0

  • Part of the Secrets EA Program

  • Hosting the Drupal site on Pantheon's platform

  • Have Dashboard access to the platform (necessary to deploy code changes)

  • Comfortable using terminus

  • Using the Secrets Manager Plugin to set your secrets.

What it provides

This module provides Drupal integration with the Secrets EA Program in the form of a Key Provider plugin for the Key module.

Install

To require this module in your composer file:

composer require drupal/pantheon_secrets:^1 --prefer-dist

Install the module and push an updated composer.lock file to your Pantheon environment.

Usage

  1. Use terminus to set some secrets like this:

    terminus secret:set <site> --scope=web --type=runtime <secret_name> <secret_value>
    

    Please note that you should be using scope "web" for secrets to be available to the Drupal application.

  2. Now that the secret is available, you could add the corresponding Key entity in one of the different available ways:

    1. Add a new key through the Key module UI. Select Pantheon Secret as the key provider and your secret name from the dropdown
    2. Go to /admin/config/system/keys/pantheon and click on the "Sync Keys" button to get all of the available secrets into Key entities.
    3. Use the provided drush command to sync all of your secrets into Key entities:
      terminus drush <site>.<env> -- pantheon-secrets:sync
      
  3. Use the Key where it is needed.

See our detailed example for an end to end example on how to set things up.

Feedback and collaboration

For real time discussion of the module find Pantheon developers in our Community Slack. Bug reports and feature requests should be posted in the drupal.org issue queue. For code changes, please submit pull requests against the GitHub repository rather than posting patches to drupal.org.

About

Drupal module to integrate the Key module with Pantheon secrets

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •