Git Product home page Git Product logo

summon's Introduction

summon

GitHub release

Github commits (since latest release)


summon is a command-line tool to make working with secrets easier.

It provides an interface for

  • Reading a secrets.yml file
  • Fetching secrets from a trusted store
  • Exporting secret values to a sub-process environment

Install

Note installing summon alone is not sufficient; you need to also install a provider of your choice before it's ready for use.

Pre-built binaries and packages are available from GitHub releases here.

Using Summon with Conjur Open Source

Are you using this project with Conjur Open Source? Then we strongly recommend choosing the version of this project to use from the latest Conjur OSS suite release. Conjur maintainers perform additional testing on the suite release versions to ensure compatibility. When possible, upgrade your Conjur version to match the latest suite release; when using integrations, choose the latest suite release that matches your Conjur version. For any questions, please contact us on Discourse.

Homebrew

brew tap cyberark/tools
brew install summon

Linux (Debian and Red Hat flavors)

deb and rpm files are attached to new releases. These can be installed with dpkg -i summon_v*.deb and rpm -ivh summon_v*.rpm, respectively.

Auto Install

Note Check the release notes and select an appropriate release to ensure support for your version of Conjur.

Use the auto-install script. This will install the latest version of summon. The script requires sudo to place summon in /usr/local/bin.

curl -sSL https://raw.githubusercontent.com/cyberark/summon/main/install.sh | bash

Manual Install

Otherwise, download the latest release and extract it to /usr/local/bin/summon.

Usage

By default, summon will look for secrets.yml in the directory it is called from and export the secret values to the environment of the command it wraps.

Example

You want to run a script that requires AWS keys to list your EC2 instances.

Define your keys in a secrets.yml file

AWS_ACCESS_KEY_ID: !var aws/iam/user/robot/access_key_id
AWS_SECRET_ACCESS_KEY: !var aws/iam/user/robot/secret_access_key

The script uses the Python library boto, which looks for AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in the environment.

import boto
botoEC2 = boto.connect_ec2()
print(botoEC2.get_all_instances())

Wrap the Python script in summon:

summon python listEC2.py

python listEC2.py is the command that summon wraps. Once the Python program exits, the secrets stored in temp files and in the Python process environment are gone.

secrets.yml Flags

Currently, you can define how the value of a variable will be processed using YAML tags. Multiple tags can be defined per variable by spearating them with :. By default, values are resolved as literal values.

  • !file: Resolves the variable value, places it into a tempfile, and returns the path to that file.
  • !var: Resolves the value as a variable ID from the provider.
  • !str: Resolves the value as a literal (default).
  • !default='<value>': If the value resolution returns an empty string, use this literal value instead for it.

Examples

# Resolved summon-env string (eg. `production/sentry/api_key`) is sent to the provider
# and the value returned is saved in the variable.
API_KEY: !var $env/sentry/api_key

# Resolved summon-env string (eg. `production/aws/ec2/private_key`) is sent to the provider.
# The returned value is put into a tempfile and the path for that file is saved in the
# variable.
API_KEY_PATH: !file:var $env/aws/ec2/private_key

# Literal value `my content` is saved into a tempfile and the path for that file is saved
# in the variable.
SECRET_DATA: !file my content

# Resolved summon-env string (eg. `production/sentry/api_user`) is sent to the provider.
# The returned value is put into a tempfile. If the value from the provider is an empty
# string then the default value (`admin`) is put into that tempfile. The path to that
# tempfile is saved in the variable.
API_USER: !var:default='admin':file $env/sentry/api_user

Default values

Default values can be set by using the default='yourdefaultvalue' as an addtional tag on the variable:

VARIABLE_WITH_DEFAULT: !var:default='defaultvalue' path/to/variable

Flags

summon supports a number of flags.

  • -p, --provider <path-to-provider> specify the path to the provider summon should use.

    If you do not provide Summon with the full path to the provider, Summon will look for the named executable in the directory defined by the SUMMON_PROVIDER_PATH environment variable. If this environment variable is not set, Summon will look by default at /usr/local/lib/summon on Linux / Mac or %ProgramW6432%\Cyberark Conjur\Summon\Providers on Windows.

  • -f <path> specify a location to a secrets.yml file, default 'secrets.yml' in current directory.

  • --up searches for secrets.yml going up, starting from the current working directory.

    Stops at the first file found or when the root of the current file system is reached. This allows to be at any directory depth in a project and simply do summon -u <command>.

  • -D 'var=value' causes substitution of value to $var.

    You can use the same secrets.yml file for different environments, using -D to substitute variables. This flag can be used multiple times.

    Example

    summon -D ENV=production --yaml 'SQL_PASSWORD: !var env/$ENV/db-password' deploy.sh
    
  • --yaml <YAML-string> Passes secrets.yml as a literal string.

    This flag is used to pass a literal YAML string to the provider in place of the secrets.yml file (see example above).

  • -i, --ignore <path-to-provider> A secret path for which to ignore provider errors.

    This flag can be useful for when you have secrets that you don't need access to for development. For example API keys for monitoring tools. This flag can be used multiple times.

  • -I, --ignore-all A boolean to ignore any missing secret paths.

    This flag can be useful when the underlying system that's going to be using the values implements defaults. For example, when using summon as a bridge to confd.

  • -V, --all-provider-versions List of all of the providers in the default path and their versions (if they have the --version tag).

  • -v, --version Print the Summon version.

  • -e, --environment Specify section (environment) to parse from secret YAML.

    This flag specifies which specific environment/section to parse from the secrets YAML file (or string). In addition, it will also enable the usage of a common (or default) section which will be inherited by other sections/environments. In other words, if your secrets.yaml looks something like this:

common:
  DB_USER: db-user
  DB_NAME: db-name
  DB_HOST: db-host.example.com

staging:
  DB_PASS: some_password

production:
  DB_PASS: other_password

Doing something along the lines of: summon -f secrets.yaml -e staging printenv | grep DB_, summon will populate DB_USER, DB_NAME, DB_HOST with values from common and set DB_PASS to some_password.

Note: default is an alias for common section. You can use either one.

  • -h View help and all flags.

env-file

Using Docker? When you run summon it also exports the variables and values from secrets.yml in VAR=VAL format to a memory-mapped file, its path made available as @SUMMONENVFILE.

You can then pass secrets to your container using Docker's --env-file flag like so:

summon docker run --env-file @SUMMONENVFILE myorg/myimage

This file is created on demand - only when @SUMMONENVFILE appears in the arguments of the command summon is wrapping. This feature is not Docker-specific; if you have another tools that reads variables in VAR=VAL format you can use @SUMMONENVFILE just the same.

Fixed tempfile name

There are times when you would like to have certain secrets values available at fixed locations, e.g. /etc/ssl/cert.pem for an SSL certificate. This can be accomplished by using symbolic links as described in the symbolic link example.

Contributing

For more info on contributing, please see CONTRIBUTING.md.

Troubleshooting

For assistance with some issues encountered when first using Summon, please refer to the troubleshooting guide in CONTRIBUTING.md.

Can't find your problem in the troubleshooting guide? File an issue or ask us on Discourse.

License

Copyright (c) 2020 CyberArk Software Ltd. All rights reserved.

Summon is available under the MIT License.

summon's People

Contributors

andytinkham avatar bradleyboutcher avatar bsilverthorn avatar ckolumbus avatar codelingobot avatar diverdane avatar dividedmind avatar doodlesbykumbi avatar dselans avatar dustinmm80 avatar firefishy avatar garymoon avatar gl-johnson avatar ismarc avatar izgeri avatar jakequilty avatar jmervine avatar john-odonnell avatar jtuttle avatar juniortaeza avatar jvanderhoof avatar kgilpin avatar marco-m avatar martinhoefling avatar mcanevet avatar micahlee avatar rpothier avatar ryanprior avatar sgnn7 avatar szh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

summon's Issues

Summon should not panic on unrecognized flags

Summon needs to fail more gracefully and not panic when an unknown flag is passed.

Current behavior:

panic: flag provided but not defined: -e

goroutine 1 [running]:
main.main()
    /go/src/github.com/conjurinc/summon/main.go:5 +0x59

Docs: `common` section and root vars injection rules should be better documented

Given the following secrets.yml:

common:
    FOO: foo

production:
    BAR: bar

Here is some observed behavior:

$ summon -e production printenv | egrep 'FOO|BAR'
BAR=bar
FOO=foo
$ summon -e common printenv | egrep 'FOO|BAR'
FOO=foo
$ summon printenv | egrep 'FOO|BAR'
$

The first two observations match my expectations based on the documentation.

The third example's behavior isn't mentioned in the documentation, so I won't go so far as to call it a bug.

However, it is mildly surprising. Since common is always inherited by other sections, I kinda had a weak expectation that its values would always get injected, even if we do not pass -e on the command line.

Docs should be elaborated with examples to describe the behavior in more details between root vars and common section as it changes when using and omitting the -e variable.

Install script throws on curl

Install script throws on curl, looks like misplaced flag

root@3621d7cc3971:/# curl -sSL https://raw.githubusercontent.com/cyberark/summon/master/install.sh | bash
curl: option -C: expected a positive numerical parameter
curl: try 'curl --help' or 'curl --manual' for more information
cat: /tmp/install.sh.3281/summon.version: No such file or directory
Downloading https://github.com/cyberark/summon/releases/download/v/summon-linux-amd64.tar.gz
curl: option -C: expected a positive numerical parameter
curl: try 'curl --help' or 'curl --manual' for more information

Here's a workaround

install=$(curl -sSL https://raw.githubusercontent.com/cyberark/summon/master/install.sh); echo "${install/curl -sSL -C/curl -sSL}" | bash

Add installation notes

Unless you read documentation from top to bottom It's not clear that except downloading Summon itself it is necessary to download provider implementation in addition and put into /usr/local/lib/summon/dir. Please add installation notes section and explain it explicitly. Another option would be to provide friendly installer which will do this automatically

Fails to install into container

When I try to install into a running container (without sudo, the install script fails with the following:

root@0a35bbc43151:/# curl -sSL https://raw.githubusercontent.com/cyberark/summon/master/install.sh | bash
Downloading https://github.com/cyberark/summon/releases/download/v0.6.6/summon-linux-amd64.tar.gz
Installing summon v0.6.6 into /usr/local/bin
bash: line 58: sudo: command not found

@SUMMONENVFILE does not include trailing newline

it looks like the generated @SUMMONENVFILE does not include a newline character on the last line. This leads to shell utilities adhering to POSIX standards ignoring the last line when reading the file.

Default value for substitution variable

It would be useful to support default values for substitution variables in secrets.yml using bash syntax:

ENV=${a:-default}

This will allow to have more flexibility without having to specify a lot of parameters that you don't care about.

Installer tests contain a circular dependency

To test install.sh, we run it in Docker containers to test that it works okay. This is fine, but creates a problem for releases. install.sh inspects the local version and tries to pull that from github releases, but when you're releasing a new version that release isn't up yet and the build fails.

Examples

We need to rethink how we run this test as part of our release process.

Add support for rendering templates

Many software packages read secret from configuration files and would have to be modified to source them from the environment instead. This makes it cumbersome to use them with summon; the usual solution is to write a wrapper script which seds the secrets into place before handing off to target command and use summon to call that script instead.

Not only is this inconvenient, but also risks introducing security problems: the script author needs to remember to clean up the files afterwards, give them correct permissions to limit exposure, etc. This would much better be handled by summon itself, at the small cost of not being agnostic about templating engine.

I propose thus to design and implement functionality in summon that would allow using file templates into which the secrets would get substituted. The templates would be rendered into temporary files as with !file entries currently, to be cleaned up after exiting; additionally these temp files could be symlinked into a required place before calling the target process so that the target can find them (on the assumption that it cannot use environment variables for that), or alternatively we could provide a mechanism to substitute the temp file path into the command line.

Note this functionality would replace the obsolete conjur env command of https://github.com/cyberark/conjur-cli.

Installing the summon-s3 provider

Hi

Possibly a dumb question, but how should the summon-s3 provider be installed? Is it clone from git, build, package and then move the dist package to /usr/libexec/summon/?

Thanks
Rob

Could this be used with a docker volume plugin?

I am currently evaluating summon to be a solution for secrets inside docker. I see there is an example of injecting it into the ENV by wrapping the docker command with a summon command and I am currently running this to see how it behaves.

I don't think this will work with my longer term goal which is to interact with docker through docker APIs &&|| cli thereby bypassing the summon wrapper type interface.

Essentially I need to be able to do something like:

docker run -v secrets:/secrets:ro --volume-driver summon alpine

and either have /secrets be a file of newline separated K:V pairs, a directory tree of /secrets/:key where the contents of the files are the corresponding values, somehow have it be a memory mapped file, or somehow be able to inject it via the --env-file flag.

I am currently prototyping some things, but I am curious to get the communities thoughts on this as well.

Thanks in advance!

No support for symlinking

One use case I'm solving for involves fetching a secret via Summon's !var:file tag and then symlinking a known path to the temp file stored in that environment variable.

Native support for this kind of symlinking would help me avoid my current undesired solution of running summon -p ... -f ... symlinker.sh myscript.sh

Provide secrets via file descriptor

Probably the most secure way for one application to give information is through a file which was created, opened, then removed. Here's a suggestion about how it might be implemented on UNIX-like systems:

  • Create a tmp file readable only by owner (mode 0600), and opened for read-write
  • unlink (remove) the temporary file
  • Write the name=value contents into it
  • seek to the beginning
  • pass the file descriptor number to the client program

The client program then reads the file, gets the secrets it wants, then closes the file. No other process on the system can at any time see the contents unless they open it before its been removed. Of course, someone with access to the block devices under the OS could read it. But then you're screwed anyway ;-).

Summon doesn't attach to psql correctly

Launching a subprocess with summon that has flags that summon also has causes summon to fail.

Example:

summon psql -p 7432 -h conjur -U postgres

summon and psql both use the -p flag. summon doesn't know this is a flag for the psql process. This needs to be fixed.

Multi-provider secrets

This issue is to track the enhancement of the secrets.yml spec to allow an optional provider specifier. This will allow you to use different providers to resolve secrets in the same secrets.yml file.

Proposal is to add a provider YML field to specify what provider should resolve a secret. If no provider field exists, the default provider is used.

How can I map an SSH key into Docker?

My SUMMONENVFILE can't be interpreted by Docker.

✗ summon docker run --env-file "@SUMMONENVFILE" myapp
docker: poorly formatted environment: variable '-----END RSA PRIVATE KEY-----' has white spaces.

Here's what it looks like:

✗ summon cat @SUMMONENVFILE                                        
SSH_PRIVATE_KEY_PATH=-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAqLVITDJKy1KHfHG/SKvM07CjP/D7XrAr3Mz2UKzslnxgJKgeA8hENPGuj83Q
...
iY5dzCLuKMiIiPUHfDtrqaNLH+anyJtjmW9Fb1cWFOJLhWVkJAvYeVawwFBooUK1h9cPR728ngsa
5F7/sDUzQZBmRYnpwWFrWrEE1NwvsIWsQ31WIRhs/Xxp9A36ZPnxXWyOtw0XTbd8PmBaYA==
-----END RSA PRIVATE KEY-----

Inject `-e <SECTION>` as a new variable with that value into the subprocess

Feature request that if the -e foo switch is used, that the value foo be injected into the subprocess as well as a new variable - perhaps it would be something like SUMMON_ENV or similar.

The use case here is for the subprocess to exhibit different behavior, depending on which environment it detects while preventing the need to keep redefining the same variable in multiple sections.

Expected behavior:

$ summon -e foo env
...
SUMMON_ENV=foo
...

$ summon -e bar env
...
SUMMON_ENV=bar
...

$ summon env
...
<No extra variables>
...

Thanks for writing summon, we've found it very useful!

fatal error: runtime: out of memory

We have seen this several times and it kills the process called from summon.

fatal error: runtime: out of memory
runtime stack:
runtime.throw(0x5b044f, 0x16)
/usr/local/go/src/runtime/panic.go:596 +0x95
runtime.sysMap(0xc49d500000, 0x7d0d0000, 0x0, 0x695738)
/usr/local/go/src/runtime/mem_linux.go:216 +0x1d0
runtime.(*mheap).sysAlloc(0x67d5c0, 0x7d0d0000, 0xc420247e18)
/usr/local/go/src/runtime/malloc.go:440 +0x374
runtime.(*mheap).grow(0x67d5c0, 0x3e868, 0x0)
/usr/local/go/src/runtime/mheap.go:774 +0x62
runtime.(*mheap).allocSpanLocked(0x67d5c0, 0x3e868, 0x44dc0a)
/usr/local/go/src/runtime/mheap.go:678 +0x44f
runtime.(*mheap).alloc_m(0x67d5c0, 0x3e868, 0x100000000, 0x0)
/usr/local/go/src/runtime/mheap.go:562 +0xe2
runtime.(*mheap).alloc.func1()
/usr/local/go/src/runtime/mheap.go:627 +0x4b
runtime.systemstack(0xc420247f10)
/usr/local/go/src/runtime/asm_amd64.s:343 +0xab
runtime.(*mheap).alloc(0x67d5c0, 0x3e868, 0x10100000000, 0x42f7c1)
/usr/local/go/src/runtime/mheap.go:628 +0xa0
runtime.largeAlloc(0x7d0cfd77, 0xc42001d301, 0xc4203f2680)
/usr/local/go/src/runtime/malloc.go:807 +0x93
runtime.mallocgc.func1()
/usr/local/go/src/runtime/malloc.go:702 +0x3e
runtime.systemstack(0xc42001c000)
/usr/local/go/src/runtime/asm_amd64.s:327 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1132
goroutine 143 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:281 fp=0xc42045fc60 sp=0xc42045fc58
runtime.mallocgc(0x7d0cfd77, 0x574520, 0xc420416001, 0x0)
/usr/local/go/src/runtime/malloc.go:703 +0x930 fp=0xc42045fd00 sp=0xc42045fc60
runtime.makeslice(0x574520, 0x7d0cfd77, 0x7d0cfd77, 0x8ed, 0x8000, 0x0)
/usr/local/go/src/runtime/slice.go:54 +0x7b fp=0xc42045fd50 sp=0xc42045fd00
bytes.makeSlice(0x7d0cfd77, 0x0, 0x0, 0x0)
/usr/local/go/src/bytes/buffer.go:201 +0x77 fp=0xc42045fd90 sp=0xc42045fd50
bytes.(*Buffer).grow(0xc42040dce0, 0x8ed, 0x0)
/usr/local/go/src/bytes/buffer.go:109 +0x177 fp=0xc42045fde0 sp=0xc42045fd90
bytes.(*Buffer).Write(0xc42040dce0, 0xc4204a8000, 0x8ed, 0x8000, 0x8ed, 0x0, 0x0)
/usr/local/go/src/bytes/buffer.go:137 +0x41 fp=0xc42045fe10 sp=0xc42045fde0
io.(*multiWriter).Write(0xc4203c52e0, 0xc4204a8000, 0x8ed, 0x8000, 0x8ed, 0x0, 0x0)
/usr/local/go/src/io/multi.go:60 +0x72 fp=0xc42045fe70 sp=0xc42045fe10
io.copyBuffer(0x664420, 0xc4203c52e0, 0x6644a0, 0xc4200a84e0, 0xc4204a8000, 0x8000, 0x8000, 0x0, 0x0, 0x0)
/usr/local/go/src/io/io.go:392 +0x20b fp=0xc42045fed8 sp=0xc42045fe70
io.Copy(0x664420, 0xc4203c52e0, 0x6644a0, 0xc4200a84e0, 0x0, 0x0, 0x0)
/usr/local/go/src/io/io.go:360 +0x68 fp=0xc42045ff38 sp=0xc42045fed8
os/exec.(*Cmd).writerDescriptor.func1(0x0, 0x0)
/usr/local/go/src/os/exec/exec.go:254 +0x4d fp=0xc42045ff98 sp=0xc42045ff38
os/exec.(*Cmd).Start.func1(0xc4200a2420, 0xc4203c5340)
/usr/local/go/src/os/exec/exec.go:371 +0x27 fp=0xc42045ffd0 sp=0xc42045ff98
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc42045ffd8 sp=0xc42045ffd0
created by os/exec.(*Cmd).Start
/usr/local/go/src/os/exec/exec.go:372 +0x4e4
goroutine 1 [syscall, 2358 minutes]:
syscall.Syscall6(0xf7, 0x1, 0x12d, 0xc4200b1688, 0x1000004, 0x0, 0x0, 0x7f24929e74b0, 0x0, 0xc4203c5320)
/usr/local/go/src/syscall/asm_linux_amd64.s:44 +0x5
os.(*Process).blockUntilWaitable(0xc420417bc0, 0xc4200a2420, 0xc4203c5340, 0x2)
/usr/local/go/src/os/wait_waitid.go:28 +0xa5
os.(*Process).wait(0xc420417bc0, 0x0, 0xc4200a84f8, 0xc4203c5220)
/usr/local/go/src/os/exec_unix.go:22 +0x4d
os.(*Process).Wait(0xc420417bc0, 0x0, 0x0, 0x5b7490)
/usr/local/go/src/os/exec.go:115 +0x2b
os/exec.(*Cmd).Wait(0xc4200a2420, 0x0, 0x0)
/usr/local/go/src/os/exec/exec.go:435 +0x62
os/exec.(*Cmd).Run(0xc4200a2420, 0x2, 0x2)
/usr/local/go/src/os/exec/exec.go:280 +0x5c
github.com/conjurinc/summon/command.runSubcommand(0xc42000e140, 0x2, 0x2, 0xc42006a480, 0x42, 0x48, 0x40, 0x30, 0x0, 0xc4200c6380)
/go/src/github.com/conjurinc/summon/command/subcommand.go:21 +0x1cf
github.com/conjurinc/summon/command.runAction(0xc42005a100, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/conjurinc/summon/command/action.go:130 +0x8ad
github.com/conjurinc/summon/command.glob..func1(0xc4200880e0)
/go/src/github.com/conjurinc/summon/command/action.go:47 +0x3fd
github.com/conjurinc/summon/vendor/github.com/codegangsta/cli.(*App).Run(0xc42008a000, 0xc42000e0b0, 0xb, 0xb, 0x0, 0x0)
/go/src/github.com/conjurinc/summon/vendor/github.com/codegangsta/cli/app.go:159 +0x54a
main.RunCLI(0x0, 0x0)
/go/src/github.com/conjurinc/summon/cli.go:27 +0x149
main.main()
/go/src/github.com/conjurinc/summon/main.go:9 +0x26

Conjur installation that reduces installation Reduce complexity of install experience

As an automated system, I want a minimal Summon install script without any providers so that I can install only the providers I want, using my own tools, into my preferred location.

As a human, I want a single install script that includes with Summon a few common useful providers in a sensible default location.

Right now, the Summon install experience is catered to the first (automation) persona, and humans have to go through multiple manual steps to install Summon + providers.

Summon should rename the current minimal install script to install-minimal.sh and create a new install.sh script which includes some providers, so that after one step a human user is ready to ~ begin ~ summoning ~

Acceptance criteria:

GIVEN I am looking at the Summon readme,
WHEN I follow the "install" instructions,
THEN I get Summon + providers installed into the default location so that I can immediately fetch secrets;
WHEN I follow the "minimal install (expert)" directions,
THEN I get Summon alone

Doesn't work on Windows

Summon checks for executable bit when executing a provider and fails if it's not present.

Unfortunately, this doesn't work on Windows which doesn't have executable bits.

Errors when run on Alpine Linux

When attempting to create a docker image for summon on alpine linux, I am unable to get summon to retrieve secrets. I have only tried the s3 provider. It works just fine if I use ubuntu as a base image rather than Alpine. I'm at a loss and not sure how to debug further. Any ideas? Below is the sh trace

/ # summon --yaml 'test: !var myorg-creds/test' cat @SUMMONENVFILE
Error fetching variable test: 

Secrets With Constant Integer Values Not Exported

If in my secrets.yml I set the value of a key to an integer the key is not exported

example of exported and not exported specifications in secrets.yml

EXPORTED: '3306'
NOT_EXPORTED: 3306

no error is thrown either way.
In the erroneous case the only difference is the secret is not exported

`summon --version` should also show version of installed providers

At present, summon --version only gives you part of the story, because it doesn't include the versions of known providers. It could be more useful if those versions were also printed.

The question of how to identify all installed providers is an interesting one, because any program or script could perhaps be a Summon provider. I propose that Summon provider installers ought to register themselves somehow, and that using Summon with any script as a provider should register that script.

When you run summon --version it can run $provider --version for each provider, and on a zero exit status it will include the provider's version alongside Summon's.

Install.sh

After #84 I can no longer install summon using install.sh, it also fails installing it on docker container during deployment.
It stops at do_download and returns status code 8.
Do you guys know what's the issue? Is there any easy way to manage installed summon versions in Dockerfile with ubuntu image?

How does this work with Pre-forking servers?

Hello,

We are interested in using summon for secret management but we use a pre forking server like Unicorn. This means that the forked process wont have the ENV variables,

How does this work with summon? Couldn't find any documentation on it

Regards,

Summon fails to pass SIGTERM to child process

Summon fails to pass signals into the child process, instead, it simply terminates the child process when receiving a kill signal. This means it can't be used in environments that depend on graceful shutdown of an application (like rolling restarts in OpenShift/Kuberneted).

Desired Result : Summon passes the common kill signals to the child process, waiting a reasonable period of time to terminate the process, before killing it.

summon is buffering all of the process stdout output

We recently discovered that summon memory usage can increase significantly over the course of its lifetime. By looking at the code, it seems that it is tee-ing stdout to an internal buffer. For long running processes that prints to stdout (like a server using a console appender for example) or any process that writes a lot to stdout, this can lead to very high memory consumption by summon and ultimately, the death of the process.

To reproduce, use a script like

#!/bin/sh

while true; do cat SOME_BIG_FILE; done

Then run this script with summon.

Found in summon version 0.6.5

add support for inheritance

common should always be inherited but it would be awesome to be able to inherit other sections

common:
  key1:
  key2:

appShare:
  pathA:
  keyB:

appA:
  - inherit appShare
  keyC:

appB:
  - inherit appShare
  keyD:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.