open-vault/sdk/helper
Clint 245935447b
Vault Agent Template (#7652)
* Vault Agent Template: parse templates  (#7540)

* add template config parsing, but it's wrong b/c it's not using mapstructure

* parsing consul templates in agent config

* add additional test to configuration parsing, to cover basics

* another test fixture, rework simple test into table

* refactor into table test

* rename test

* remove flattenKeys and add other test fixture

* Update command/agent/config/config.go

Co-Authored-By: Jim Kalafut <jkalafut@hashicorp.com>

* return the decode error instead of swallowing it

* Update command/agent/config/config_test.go

Co-Authored-By: Jim Kalafut <jkalafut@hashicorp.com>

* go mod tidy

* change error checking style

* Add agent template doc

* TemplateServer: render secrets with Consul Template (#7621)

* add template config parsing, but it's wrong b/c it's not using mapstructure

* parsing consul templates in agent config

* add additional test to configuration parsing, to cover basics

* another test fixture, rework simple test into table

* refactor into table test

* rename test

* remove flattenKeys and add other test fixture

* add template package

* WIP: add runner

* fix panic, actually copy templates, etc

* rework how the config.Vault is created and enable reading from the environment

* this was supposed to be a part of the prior commit

* move/add methods to testhelpers for converting some values to pointers

* use new methods in testhelpers

* add an unblock channel to block agent until a template has been rendered

* add note

* unblock if there are no templates

* cleanups

* go mod tidy

* remove dead code

* simple test to starT

* add simple, empty templates test

* Update package doc, error logs, and add missing close() on channel

* update code comment to be clear what I'm referring to

* have template.NewServer return a (<- chan) type, even though it's a normal chan, as a better practice to enforce reading only

* Update command/agent.go

Co-Authored-By: Jim Kalafut <jkalafut@hashicorp.com>

* update with test

* Add README and doc.go to the command/agent directory (#7503)

* Add README and doc.go to the command/agent directory

* Add link to website

* address feedback for agent.go

* updated with feedback from Calvin

* Rework template.Server to export the unblock channel, and remove it from the NewServer function

* apply feedback from Nick

* fix/restructure rendering test

* Add pointerutil package for converting types to their pointers

* Remove pointer helper methods; use sdk/helper/pointerutil instead

* update newRunnerConfig to use pointerutil and empty strings

* only wait for unblock if template server is initialized

* drain the token channel in this test

* conditionally send on channel
2019-10-18 16:21:46 -05:00
..
base62 oss changes for entropy augmentation feature (#7670) 2019-10-17 10:33:00 -07:00
certutil Raft Storage Backend (#6888) 2019-06-20 12:14:58 -07:00
cidrutil Move cidrutil to sdk 2019-04-12 18:03:59 -04:00
compressutil Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
consts Vault Agent Cache Auto-Auth SSRF Protection (#7627) 2019-10-11 18:56:07 -04:00
cryptoutil Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
dbtxn Migrate database plugin methods to sdk 2019-04-15 11:36:10 -04:00
entropy oss changes for entropy augmentation feature (#7670) 2019-10-17 10:33:00 -07:00
errutil Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
hclutil Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
jsonutil Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
kdf Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
keysutil oss changes for entropy augmentation feature (#7670) 2019-10-17 10:33:00 -07:00
ldaputil Port LDAP getCN changes to 1.2 branch (#7209) 2019-07-29 15:43:34 -04:00
license Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
locksutil Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
logging Add 'log-format' CLI flag, along with associated config flag, for 'vault server' command. (#6840) 2019-07-18 15:59:27 -04:00
mlock Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
parseutil Unify time.Duration handling across framework and parseutil (#6935) 2019-06-20 14:28:32 -04:00
password Move password to sdk 2019-04-12 18:12:13 -04:00
pathmanager Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
pluginutil Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
pointerutil Vault Agent Template (#7652) 2019-10-18 16:21:46 -05:00
policyutil Move policyutil to sdk 2019-04-12 18:08:46 -04:00
salt salt: fix DidGenerate docstring (#7372) 2019-08-27 14:41:23 -07:00
strutil gofmt fixes. 2019-05-02 16:29:41 -07:00
tlsutil Raft tests (#7008) 2019-06-28 14:08:53 -04:00
tokenutil Enable generated items for more auth methods (#7513) 2019-10-17 16:19:14 -07:00
useragent Move useragent to sdk 2019-04-12 18:17:49 -04:00
wrapping Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00