Commit Graph

8625 Commits

Author SHA1 Message Date
brianvans
801eddf5f8 Add ha_enabled for mysql backend (#5122)
* Slight cleanup around mysql ha lock implementation

* Removes some duplication around lock table naming
* Escapes lock table name with backticks to handle weird characters
* Lock table defaults to regular table name + "_lock"
* Drop lock table after tests run

* Add `ha_enabled` option for mysql storage

It defaults to false, and we gate a few things like creating the lock
table and preparing lock related statements on it
2018-08-16 11:03:16 -07:00
Matthew Irish
c3e733623e UI namespaces (#5119)
* add namespace sidebar item

* depend on ember-inflector directly

* list-view and list-item components

* fill out components and render empty namespaces page

* list namespaces in access

* add menu contextual component to list item

* popup contextual component

* full crud for namespaces

* add namespaces service and picker component

* split application and vault.cluster templates and controllers, add namespace query param, add namespace-picker to vault.namespace template

* remove usage of href-to

* remove ember-href-to from deps

* add ember-responsive

* start styling the picker and link to appropriate namespaces, use ember-responsive to render picker in different places based on the breakpoint

* get query param working and save ns to authdata when authenticating, feed through ns in application adapter

* move to observer on the controller for setting state on the service

* set state in the beforeModel hook and clear the ember data model cache

* nav to secrets on change and make error handling more resilient utilizing the method that atlas does to eagerly update URLs

* add a list of sys endpoints in a helper

* hide header elements if not in the root namespace

* debounce namespace input on auth, fix 404 for auth method fetch, move auth method fetch to a task on the auth-form component and refretch on namespace change

* fix display of supported engines and exclusion of sys and identity engines

* don't fetch replication status if you're in a non-root namespace

* hide seal sub-menu if not in the root namespace

* don't autocomplete auth form inputs

* always send some requests to the root namespace

* use methodType and engineType instead of type in case there it is ns_ prefixed

* use sys/internal/ui/namespaces to fetch the list in the dropdown

* don't use model for namespace picker and always make the request to the token namespace

* fix header handling for fetch calls

* use namespace-reminder component on creation and edit forms throughout the application

* add namespace-reminder to the console

* add flat

* add deepmerge for creating the tree in the menu

* delayed rendering for animation timing

* design and code feedback on the first round

* white text in the namespace picker

* fix namespace picker issues with root keys

* separate path-to-tree

* add tests for path-to-tree util

* hide picker if you're in the root ns and you can't access other namespaces

* show error message if you enter invalid characters for namespace path

* return a different model if we dont have the namespaces feature and show upgrade page

* if a token has a namespace_path, use that as the root user namespace and transition them there on login

* use token namespace for user, but use specified namespace to log in

* always renew tokens in the token namespace

* fix edition-badge test
2018-08-16 12:48:24 -05:00
Joshua Ogle
7f2a5c2f76 Merge pull request #5110 from hashicorp/ui-tier-icons
Update Edition Tier Icons
2018-08-16 10:44:34 -06:00
Joshua Ogle
c5a8d73c71 Fix footer upgrade link 2018-08-16 10:43:46 -06:00
Joshua Ogle
c622aeafe5 Merge branch 'master' into ui-tier-icons 2018-08-16 10:11:04 -06:00
Adam Medziński
cfd09d9767 Change selected text color in code editor (#4860)
This commit changes the selected text background color to a more
contrasting one. It also unifies colors of focused/not focused editor.
Focused editor is now indicated by the blinking cursor, which is a
more popular solution.
2018-08-16 11:07:19 -05:00
Yamamoto, Hirotaka
088e73b854 [etcd] fix the deafult prefix in website (#5116)
etcd storage stores all Vault data under a prefix.
The default prefix is "/vault/" according to source codes.

However, the default prefix shown in the website is "vault/".
If the access to etcd is restricted to this wrong prefix, vault
cannot use etcd.
2018-08-16 10:38:11 -04:00
Matthew Irish
95ba500136 UI unauthed auth methods fix (#5113)
* lowercase auth method type so that hardcoded and unauthed methods both use the same key

* don't rely on top level data for capabilities serializer
2018-08-16 08:16:24 -05:00
Joel Thompson
8275802ac9 Make AWS credential types more explicit (#4360)
* Make AWS credential types more explicit

The AWS secret engine had a lot of confusing overloading with role
paramemters and how they mapped to each of the three credential types
supported. This now adds parameters to remove the overloading while
maintaining backwards compatibility.

With the change, it also becomes easier to add other feature requests.
Attaching multiple managed policies to IAM users and adding a policy
document to STS AssumedRole credentials is now also supported.

Fixes #4229
Fixes #3751
Fixes #2817

* Add missing write action to STS endpoint

* Allow unsetting policy_document with empty string

This allows unsetting the policy_document by passing in an empty string.
Previously, it would fail because the empty string isn't a valid JSON
document.

* Respond to some PR feedback

* Refactor and simplify role reading/upgrading

This gets rid of the duplicated role upgrade code between both role
reading and role writing by handling the upgrade all in the role
reading.

* Eliminate duplicated AWS secret test code

The testAccStepReadUser and testAccStepReadSTS were virtually identical,
so they are consolidated into a single method with the path passed in.

* Switch to use AWS ARN parser
2018-08-16 06:38:13 -04:00
Clint
d2f3abf02e Update apis.html.md (#5071)
We disable TLS for example purposes, not exemplary purposes 😄
2018-08-15 19:41:29 -04:00
Christoph Ludwig
d74fae41ef Add support for "sovereign" Azure cloud environments (#4997)
* Add support for "sovereign" Azure cloud environments

* Shorten variable names
2018-08-15 19:40:36 -04:00
Jim Kalafut
d5403f7fe9 Add check of truncated length (#5109) 2018-08-15 13:16:17 -07:00
Joshua Ogle
ef98c46283 Don't float tag in sidebar unless fullhd 2018-08-15 13:55:20 -06:00
Joshua Ogle
aa1b3bab12 Update Edition Tier Icons 2018-08-15 13:41:43 -06:00
Brian Kassouf
1a518deed5 changelog++ 2018-08-15 11:47:00 -07:00
Jeff Mitchell
9ccbb91a22 ACL Templating (#4994)
* Initial work on templating

* Add check for unbalanced closing in front

* Add missing templated assignment

* Add first cut of end-to-end test on templating.

* Make template errors be 403s and finish up testing

* Review feedback
2018-08-15 11:42:56 -07:00
RichardWLaub
3f0c33937d Update usage section for kv-v1 docs (#5105)
While following along with the usage section in the kv-v1 docs I noticed this error.
Running the given command gives:

```text
$ vault kv list kv/my-secret
No value found at kv/my-secret/
```

Running `vault kv list kv/` gives the desired output. 

Also, I removed some trailing whitespace.
2018-08-15 10:57:36 -07:00
Seth Vargo
f927f29d18 Fix docs typo (service-account => service_account) (#5102)
Fixes hashicorp/vault-plugin-auth-gcp#47
2018-08-14 15:46:41 -07:00
Jeff Mitchell
5ea76bda9c Fix http tests 2018-08-14 17:09:55 -04:00
Jeff Mitchell
9cf497f688 Remove injection into top routes (#5101) 2018-08-14 15:29:22 -04:00
Jeff Mitchell
e6a6b65ba9 Fix read test 2018-08-14 14:20:49 -04:00
Jim Kalafut
181cacdd3d Make base62.Random truncation optional (#5100) 2018-08-14 12:38:25 -04:00
Jim Kalafut
fc3281e880 Consolidate base62 functions (#5099) 2018-08-14 08:44:30 -07:00
Seth Vargo
19f1a94a69 Fix Google Cloud races (#5081)
* storage/gcs: fix race condition in releasing lock

Previously we were deleting a lock without first checking if the lock we were deleting was our own. There existed a small period of time where vault-0 would lose leadership and vault-1 would get leadership. vault-0 would delete the lock key while vault-1 would write it. If vault-0 won, there'd be another leader election, etc.

This fixes the race by using a CAS operation instead.

* storage/gcs: properly break out of loop during stop

* storage/spanner: properly break out of loop during stop
2018-08-14 09:53:36 -04:00
Gerald
8754694e80 Add ttl params into csr signing docs (#5094) 2018-08-13 23:38:03 -04:00
Jeff Mitchell
7bd104dd9a changelog++ 2018-08-13 22:01:05 -04:00
Jeff Mitchell
f562a71808 Add support for passing args via vault read (#5093)
We support this in the API as of 0.10.2 so read should support it too.

Trivially tested with some log info:

`core: data: data="map[string]interface {}{"zip":[]string{"zap", "zap2"}}"`
2018-08-13 22:00:26 -04:00
Jeff Mitchell
635a0e5b1a changelog++ 2018-08-13 21:19:28 -04:00
Stephen J. Butler
b65961e3b6 Add tokenGroups and tokenGroupsGlobalAndUniversal (#4936) 2018-08-13 14:57:10 -07:00
Yoko
84e8c92e44 [Guide] Control Groups (#5072)
* Control Group guide

* Fixed user policy list

* Fixed a typo

* Replaced the wrong screenshot

* Added missing period
2018-08-13 14:51:32 -07:00
Frank Allenby
716faadbbd Added a link to the "previous section" mentioned (#5018)
This is for clarity since I had to check back to remember where it was mentioned.
2018-08-13 17:13:42 -04:00
Jim Kalafut
90203b7924 Clarify "Commands" docs (#5092)
Fixes #4890
2018-08-13 14:09:48 -07:00
Nándor István Krácser
23d89841d7 Alibaba Object Storage support (#4783) 2018-08-13 17:03:24 -04:00
Michael Schuett
88fe0fad24 MySQL HA Backend Support (#4686) 2018-08-13 17:02:31 -04:00
Becca Petrin
13a2bb152e Add a header type field (#4993) 2018-08-13 11:02:44 -07:00
Jim Kalafut
f4882fee74 Revert "Add ttl parameter to pki api docs (#5063)"
This reverts commit 7824826ca72c503677559cf9e5c1a7193433b34a.
2018-08-13 09:34:05 -07:00
Vishal Nayak
786aff98aa don't ignore errors (#5087) 2018-08-10 22:32:10 -04:00
Vishal Nayak
6ed2462786 Adjust ACL error checking (#5086)
* Adjust acl error checking

* address review feedback

* unlock before checks
2018-08-10 21:05:10 -04:00
Jim Kalafut
8dff953597 changelog++ 2018-08-10 16:42:51 -07:00
bohr
9cd4c31cf6 add backtick to fix mysql database name contain special characters (#5054)
when use mysql storage, set` database = "dev-dassets-bc"` , create database and create table will throw exceptions as follows:

    Error initializing storage of type mysql: failed to create mysql database: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-dassets-bc' at line 1
    Error initializing storage of type mysql: failed to create mysql table: Error 1046: No database selected

cause of `-` is  a MySQL  built-in symbol. so add backtick for create database sql\create table sql \dml sqls.
2018-08-10 16:38:20 -07:00
Yoko
58967f725f [Guide] Vault Cluster Monitoring Guide (#5084)
* Vault cluster monitoring guide

* Updated the download link

* Fixed broken link
2018-08-10 13:52:02 -07:00
Jeff Mitchell
a8c1f7bed5 Port over ns identity proto info 2018-08-10 12:45:34 -04:00
Jeff Mitchell
bbc7b7cc8d Port over some ns stuff 2018-08-10 12:17:17 -04:00
Jeff Mitchell
ef6744f9af Port some ns stuff over 2018-08-10 12:13:11 -04:00
Jim Kalafut
e8ca263d3b changelog++ 2018-08-10 09:12:32 -07:00
Jim Kalafut
c4b32ced0e Fix DB role statement update (#5058)
The backwards compatibility logic was preventing updates to role
statements from taking effect. This change removes persistence of
deprecated statement fields.
2018-08-10 09:00:52 -07:00
Jim Kalafut
7b9fee7b2d Add RDS notes to MSSQL docs (#5062) 2018-08-10 08:52:21 -07:00
Jeff Mitchell
e090f44e73 Fix some cases where unauthorized calls could return 400 (#5083) 2018-08-10 08:59:58 -05:00
Jeff Mitchell
166a2ac372 Add headers accessor and ns function 2018-08-09 18:29:03 -04:00
Jeff Mitchell
0efaa97cfd Add json tag to names response for sys_plugins 2018-08-09 18:02:03 -04:00