Kris Hicks
85ed8ddd4f
Add gosimple linter ( #9590 )
2020-12-09 11:05:18 -08:00
Michael Schurter
523586a6e6
vault: remove dead lease code
2019-10-25 15:08:35 -07:00
Michael Schurter
b135d28450
vault: fix data races
2019-04-16 11:22:44 -07:00
Michael Schurter
0e6da17a8f
vault: fix renewal time
...
Renewal time was being calculated as 10s+Intn(lease-10s), so the renewal
time could be very rapid or within 1s of the deadline: [10s, lease)
This commit fixes the renewal time by calculating it as:
(lease/2) +/- 10s
For a lease of 60s this means the renewal will occur in [20s, 40s).
2019-04-16 11:22:44 -07:00
Chris Baker
20a3884559
docs: -vault-namespace, VAULT_NAMESPACE, and config
...
agent: added VAULT_NAMESPACE env-based configuration
2019-04-10 10:34:10 -05:00
Chris Baker
1349497152
config/docs: added namespace to vault config
...
server/client: process `namespace` config, setting on the instantiated vault client
2019-04-10 10:34:10 -05:00
Alex Dadgar
95297c608c
goimports
2019-01-22 15:44:31 -08:00
Mahmood Ali
0fc84f4cfb
address review comments
2018-11-20 17:10:54 -05:00
Mahmood Ali
88c1698ef5
Emit metric counters for Vault token and renewal failures
2018-11-20 17:10:54 -05:00
Mahmood Ali
feaf6214f9
Set User-Agent header when hitting Vault API
2018-11-20 17:10:54 -05:00
Michael Schurter
9da25adc54
client: hclog-ify most of the client
...
Leaving fingerprinters in case that interface changes with plugins.
2018-10-16 16:53:30 -07:00
Josh Soref
02a8be09f9
spelling: semantics
2018-03-11 19:00:26 +00:00
Filip Ochnik
38996137cf
Recognize renewing non-renewable Vault lease as fatal
2018-01-08 20:32:31 +01:00
Alex Dadgar
a9e3a41407
Enable more linters
2017-09-26 15:26:33 -07:00
Alex Dadgar
c6a796e67f
Stop Vault token renew on task exit
...
This PR fixes an oversight in which the client would attempt to renew a
token even after the task exits.
Fixes https://github.com/hashicorp/nomad/issues/2475
2017-03-28 10:53:15 -07:00
Alex Dadgar
22b64a53cf
Better derive token logging
2017-02-14 16:46:54 -08:00
Alex Dadgar
9e822a2e8f
Fix race condition with Deriving vault tokens
...
This PR fixes a race condition in which the client was not locked while
deriving Vault tokens. This allowed the token to be set which would
cause subsequent Vault requests to fail with permission denied because
the incorrect Vault token was being used.
Further this PR makes the unsetting and unlocking of the client atomic
to avoid an even harder to hit race condition (not sure it was ever hit
but was still incorrect).
2017-02-01 16:25:59 -08:00
Alex Dadgar
e34902ae8a
Large refactor of task runner and Vault token rehandling
2016-10-18 11:24:20 -07:00
Alex Dadgar
9ff2bf0bff
Fix Vault parsing of booleans
2016-10-10 18:04:39 -07:00
Alex Dadgar
5532e911cb
Fix token renewal
2016-09-15 11:20:51 -07:00
Alex Dadgar
c89fd0eb08
Clean up vault client
2016-09-14 18:10:56 -07:00
Alex Dadgar
bec6adb2ee
Vault token threaded
2016-09-14 13:30:01 -07:00
Alex Dadgar
f9391f041c
Fingerprint
2016-09-01 11:10:14 -07:00
vishalnayak
13d97f01bb
Print debug message only when error is non-nil
2016-08-30 13:14:34 -04:00
vishalnayak
68b1b30bf5
Addressed review feedback
2016-08-30 13:08:13 -04:00
vishalnayak
082d5e58a4
Return only fatal error to renewal error channel
2016-08-30 12:46:59 -04:00
vishalnayak
72d2e9d2dd
tokenDeriver function pointer to derive tokens.
...
Remove rpc*, connPool, node and region from vaultclient.
2016-08-29 20:32:05 -04:00
vishalnayak
603d7b09d8
Use Job.LookupTaskGroup
2016-08-29 16:34:39 -04:00
vishalnayak
7f919c9d74
Address review feedback
2016-08-29 12:47:33 -04:00
vishalnayak
04fab3bc81
Employ DeriveVaultToken API and flesh-up DeriveToken
2016-08-24 12:29:59 -04:00
vishalnayak
6b83d07070
VaultClient for Nomad Client
2016-08-24 09:43:45 -04:00