9692 Commits

Author SHA1 Message Date
Jeff Mitchell
15a365c76f
Updated for new syntax 2018-05-17 09:14:12 -07:00
Jeff Mitchell
2a6f08a0b8
Merge pull request #4575 from avoidik/patch-2
Add more essential notes into production hardening guide
2018-05-17 09:05:34 -07:00
Jeff Mitchell
f058a82010
Update production.html.md 2018-05-17 09:05:08 -07:00
Jim Kalafut
e47c602654
Fix GCP API parameter docs 2018-05-17 08:54:25 -07:00
Seth Vargo
4479d42688 Move UI docs from enterprise to OSS (#4565) 2018-05-17 08:48:10 -07:00
Andrew Slattery
e1eafc78b5 Update KV response code (#4568)
Creating/Updating a secret in KV-V2 produces a status code `200` with a response body of `application/json`, whereas the previous documentation notated a `204 (empty body)` expected response code.
2018-05-17 08:46:19 -07:00
Tavis Wilson
215b89d363
Update policies.html.md 2018-05-16 14:35:30 -05:00
Jeff Mitchell
8d228fed98 changelog++ 2018-05-16 13:31:56 -04:00
Matthew Surabian
1886e45e36 DynamoDB Nested Values Bug (#4570)
* Add tests to ExerciseBackend to expose nested-values bug

* Update DynamoDB physical backend Delete and hasChildren logic to prevent overzealous cleanup of folders and values
2018-05-16 13:30:56 -04:00
Jeff Mitchell
305a45e24f changelog++ 2018-05-16 12:14:22 -04:00
Jeff Mitchell
9a9638c93d Update website ldap url text 2018-05-16 11:58:10 -04:00
Jeff Mitchell
da367a6cb3
Check allowed/denied/required params on read calls. (#4579)
We added support a bit ago for some read operations to take in
parameters, so we should now apply these checks against them.
2018-05-16 11:28:46 -04:00
Viacheslav Vasilyev
47d8604fe5
Update production.html.md 2018-05-16 11:16:04 +03:00
Jacob Friedman
36f3f61ac5 fixed spelling error in step 1 (#4572) 2018-05-15 17:43:35 -07:00
Jeff Mitchell
fd66cc5ec8 Re-add capability to unwrap pre-0.6.2 wrapping tokens 2018-05-15 20:01:58 -04:00
Peter Schultz
a84362531d Fix capability test for policies in UI (#4566)
Fix incorrect path for capability check in the policies UI.

Fixes #4564.
2018-05-14 17:20:07 -05:00
Jeff Mitchell
476b150a19 Mention that you can actually rekey when using an HSM 2018-05-13 16:49:42 -04:00
Jeff Mitchell
112510da63 Update HSM documentation and fix GCP docs build 2018-05-13 16:39:22 -04:00
Becca Petrin
136555a0e0
export EscapeLDAPValue (#4556) 2018-05-11 15:51:20 -07:00
Lucy Davinhart
1db9c4969a Fix syntax errors causing api package to fail tests (#4555) 2018-05-11 16:28:03 -04:00
Calvin Leung Huang
1e23751a6e
Token store tests (#4549)
* Expand revocation test to cover non-registered tokens case

* Bump sleep times back down a bit
2018-05-11 12:12:44 -04:00
Jeff Mitchell
a3aa73ff8e changelog++ 2018-05-11 11:58:52 -04:00
Jeff Mitchell
cb54688f59
Fix panic when running capabilities CLI command with multiple paths (#4553)
* Fix panic using 'vault token capabilities' with more than one path

Fixes #4552

* Add test
2018-05-11 11:58:12 -04:00
Jeff Mitchell
e80234b4a7 Fix fmt 2018-05-11 11:50:10 -04:00
Robbie McKinstry
fd6f676f8f Client side rate limiting (#4421) 2018-05-11 10:42:06 -04:00
Jeff Mitchell
dcde52e340 Fix two failing tests due to the fact that the expiration manager now
needs to be running to properly revoke tests.
2018-05-10 18:22:04 -04:00
Matthew Irish
dee9f11655
Enterprise version detection fix (#4547)
* fix version service parsing of .hsm in a version string

* remove race condition where the replication menu would show the enterprise upsell in an enterprise binary

* fix styling and layout of replication status menu

* move version check to beforeModel
2018-05-10 16:44:17 -05:00
Becca Petrin
8ea9efd297
Move LDAP client and config code to helper (#4532) 2018-05-10 14:12:42 -07:00
Matthew Irish
03a48f217e
install JS assets on Travis and run ember tests (#4544) 2018-05-10 15:59:15 -05:00
Seth Vargo
5769fb4416 Update GCP secrets to be example-driven (#4539)
👍
2018-05-10 16:58:22 -04:00
Tyler Marshall
9e059e65e9 Fix minor spelling mistake (#4548) 2018-05-10 13:42:01 -07:00
Becca Petrin
5f342b4aa0
Shorten code by using ParseAddrs (#4546) 2018-05-10 13:21:55 -07:00
Calvin Leung Huang
0678d6ba4b
Token revocation refactor (#4512)
* Hand off lease expiration to expiration manager via timers

* Use sync.Map as the cache to track token deletion state

* Add CreateOrFetchRevocationLeaseByToken to hand off token revocation to exp manager

* Update revoke and revoke-self handlers

* Fix tests

* revokeSalted: Move token entry deletion into the deferred func

* Fix test race

* Add blocking lease revocation test

* Remove test log

* Add HandlerFunc on NoopBackend, adjust locks, and add test

* Add sleep to allow for revocations to settle

* Various updates

* Rename some functions and variables to be more clear
* Change step-down and seal to use expmgr for revoke functionality like
during request handling
* Attempt to WAL the token as being invalid as soon as possible so that
further usage will fail even if revocation does not fully complete

* Address feedback

* Return invalid lease on negative TTL

* Revert "Return invalid lease on negative TTL"

This reverts commit a39597ecdc23cf7fc69fe003eef9f10d533551d8.

* Extend sleep on tests
2018-05-10 15:50:02 -04:00
Jeff Mitchell
2ef3635858 changelog++ 2018-05-10 15:40:45 -04:00
Jeff Mitchell
146e8f6c9c
Fix response wrapping from K/V version 2 (#4511)
This takes place in two parts, since working on this exposed an issue
with response wrapping when there is a raw body set. The changes are (in
diff order):

* A CurrentWrappingLookupFunc has been added to return the current
value. This is necessary for the lookahead call since we don't want the
lookahead call to be wrapped.

* Support for unwrapping < 0.6.2 tokens via the API/CLI has been
removed, because we now have backends returning 404s with data and can't
rely on the 404 trick. These can still be read manually via
cubbyhole/response.

* KV preflight version request now ensures that its calls is not
wrapped, and restores any given function after.

* When responding with a raw body, instead of always base64-decoding a
string value and erroring on failure, on failure we assume that it
simply wasn't a base64-encoded value and use it as is.

* A test that fails on master and works now that ensures that raw body
responses that are wrapped and then unwrapped return the expected
values.

* A flag for response data that indicates to the wrapping handling that
the data contained therein is already JSON decoded (more later).

* RespondWithStatusCode now defaults to a string so that the value is
HMAC'd during audit. The function always JSON encodes the body, so
before now it was always returning []byte which would skip HMACing. We
don't know what's in the data, so this is a "better safe than sorry"
issue. If different behavior is needed, backends can always manually
populate the data instead of relying on the helper function.

* We now check unwrapped data after unwrapping to see if there were raw
flags. If so, we try to detect whether the value can be unbase64'd. The
reason is that if it can it was probably originally a []byte and
shouldn't be audit HMAC'd; if not, it was probably originally a string
and should be. In either case, we then set the value as the raw body and
hit the flag indicating that it's already been JSON decoded so not to
try again before auditing. Doing it this way ensures the right typing.

* There is now a check to see if the data coming from unwrapping is
already JSON decoded and if so the decoding is skipped before setting
the audit response.
2018-05-10 15:40:03 -04:00
Brian Kassouf
790465fc3b
physical/cache: Add a list of prefixes to not cache (#4515)
* physical/cache: Add a list of prefixes to not cache

* Rename the pathmanager

* Move cache back to the beggining of postUnseal

* Fix comment
2018-05-10 10:29:26 -07:00
Becca Petrin
20c6a57d68
dont reuse err on multiple goroutines (#4545) 2018-05-10 10:10:08 -07:00
Matthew Surabian
39f2d66eb7 DynamoDB Deprecation Fixes (#4534)
* Use the AWS SDK's UnmarshalMap method for dynamodb backend, not the deprecated ConvertFromMap method

* Use the AWS SDK's MarshalMap method for dynamodb backend, not the deprecated ConvertToMap method

* Use the AWS SDK's session.NewSession method for dynamodb backend, not the deprecated session.New method

* Fix variable name awserr that colides with imported package in dynamodb backend
2018-05-10 08:25:51 -04:00
emily
2f6fb5b460 update gcputil deps (#4537) 2018-05-10 08:24:53 -04:00
Jeff Mitchell
9b718f27f9 Fix retryable dep 2018-05-09 20:52:44 -04:00
Jeff Mitchell
6386f486c3 Update retryable dep 2018-05-09 20:49:32 -04:00
Jeff Mitchell
5bd7a41e26 Update comment around legacy bool in API 2018-05-09 20:35:51 -04:00
Becca Petrin
df4b650e61
Restrict cert auth by CIDR (#4478) 2018-05-09 15:39:55 -07:00
Jeff Mitchell
79cdd34286 Update retryable vendor 2018-05-09 18:34:05 -04:00
Jeff Mitchell
a5a8206560 Change retry timing to be a little less long 2018-05-09 18:33:51 -04:00
Jeff Mitchell
cc9d29d456 Adjust MaxRetries for retryablehttp 2018-05-09 18:24:41 -04:00
Jeff Mitchell
004aec9611 Update go-retryablehttp and use PassthroughErrorHandler 2018-05-09 18:11:08 -04:00
Jeff Mitchell
0519f8634e Remove unneeeded dep 2018-05-09 17:50:49 -04:00
Jeff Mitchell
891ce7a975 Update go-retryablehttp vendor 2018-05-09 17:44:53 -04:00
Jeff Kohrman
47aab6e22e Add link to updated privacy policy in layout.erb (#4533)
Added link to updated privacy policy in footer of `layout.erb` for the OSS website.
2018-05-09 16:11:57 -04:00