Download the PHP package nedsbeds/blt-secrets-management without Composer

On this page you can find all versions of the php package nedsbeds/blt-secrets-management. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package blt-secrets-management

Acquia BLT Secret management

This is an Acquia BLT plugin providing an easy way to control secrets storage .

This plugin is community-created and community-supported. Acquia does not provide any direct support for this software or provide any warranty as to its stability.

The plugin uses ansible and ansible-vault to store secrets credentials encrypted in your repository. It then allows you to deploy these credentials in a secure and repeatable way, ensuring that secret settings files have correct syntax and are up to date.

Installation and usage

To use this plugin, you must already have a Drupal project using BLT. The plugin assumes your drush aliases have ssh hostnames and usernames, and that you have SSH keys to access those environments already configured.

In your project, require the plugin with Composer:

composer require nedsbeds/blt-secrets-management

Creating a new vault

Initialize the new vault by calling secrets:vault:init which will prompt you for a new password to encrypt your vault. It will create a minimal vault file for adding your secrets.

Editing your vault

Call the command secrets:edit which will prompt for your password to decrypt the vault file. Your default editor will open with a temp file where you can make your changes. Once done, save and close the file for it to be re-enccrypted. You should now commit the vault file to your repository

Note: You can change the default editor by setting the environment variable DEFAULT_EDITOR

e.g. export DEFAULT_EDITOR=subl -w

Diff command

Call the command secrets:diff with a drush alias and the plugin will first create your secrets.settings.php file from your encrypted information, then run a php lint to ensure it is valid PHP. It will then show you any differences between the generated settings file and the file on that environment.

Deploy command

Call the command secrets:deploy with a drush alias and the plugin will first create your secrets.settings.php file from your encrypted information, then run a php lint to ensure it is valid PHP. It will then overwrite the settings file on that environment with your new values.

Adding new settings

The plugin requires to elements.

The vault file is in JSON format and allows you to have a different credential per environment.

You should add your own credentials in the secrets array, and update the environment names to match your drush aliases

To edit this file, run secrets:edit

The secrets.settings.php template is located in /secrets/secrets.settings.php.j2 and uses the jinja templating language.

The jinja variable {{secrets['example_api_key'][drush_alias]}} will get data from your vault.

Add new settings as needed.

Passwords in keychain

To make dealing with the vault easier, you can run secrets:keychain:init which will prompt you for your vault password, add it to your keychain and then use that in future instead of prompting for your password each time.

Example workflow

The imagined workflow for this tool is

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.


All versions of blt-secrets-management with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nedsbeds/blt-secrets-management contains the following files

Loading the files please wait ....