filesecretbackend

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2017 License: BSD-3-Clause Imports: 5 Imported by: 0

README

File Secret Backend

Warning: This Secret Backend is not secure: use it only for development or test

Files structure

  • Create a .secrets directory
  • Each secret is defined as a file and must have a .key extension
  • Each file is must be composed of two parts :
    • secret name: the first line of the file always starting with cds/ prefix
    • secret value: the other lines

CDS Setup

File Secret Backend is the default mode in CDS. So you don't have to set any option. You can set the path to your .secrets directory (or use a different name) with option --secret-backend-option "secret_directory=/path/to/my_directory". If this option is not set, .secrets directory will be loaded.

Sample usage

Storing CDS Stash private key
  • Create a my_stash.key file in our .secrets directory. We consider that the repository manager is named my_stash.
  • Set the following file content
$ cat my_stash.key
cds/repositoriesmanager-secrets-my_stash-privatekey
-----BEGIN PRIVATE KEY-----
A7qVvdqxevEuUkW4K+jfdkshjfjksdhfhgfhjdhf+0LYmVjPKlJGNXHDGuy5Fw/d
[...]
Lw03eHTNQghS0A==
-----END PRIVATE KEY-----
Storing CDS Github client secret
  • Create a github.key file in our .secrets directory. We consider that the repository manager is named github.
  • Set the following file content
$ cat github.key
cds/repositoriesmanager-secrets-github-client-secret
8ed279e27119a85f990e82c7f0b895dd193c6666

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client(opts map[string]string) secretbackend.Driver

Client return a SecretBackend

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL