Commit Graph

169 Commits

Author SHA1 Message Date
vishalnayak
9504a12d40 Rename PrepareRequest to PrepareRequestFunc 2016-03-18 10:37:49 -04:00
vishalnayak
506c34783a Removed http/sys_capabilties_test.go 2016-03-18 09:48:45 -04:00
vishalnayak
289a2a2661 Add separate path for capabilities-self to enable ACL 2016-03-17 22:52:03 -04:00
vishalnayak
0ac4aa123d Deleted http/sys_capabilities.go since the requests are directly going to system backend 2016-03-17 22:44:48 -04:00
vishalnayak
f97b2e5648 Enable callbacks for handling logical.Request changes before processing requests 2016-03-17 22:29:53 -04:00
vishalnayak
a064b1b2a0 Fix http capabilities tests 2016-03-17 21:03:32 -04:00
vishalnayak
f8dd4f6c2f Fix broken testcases 2016-03-17 21:03:32 -04:00
vishalnayak
56a9ac8f7c Fix help descriptions 2016-03-17 21:03:32 -04:00
vishalnayak
aa0cef3564 Fixed capabilities API to receive logical response 2016-03-17 21:03:32 -04:00
vishalnayak
b812ea1203 Refactoring the capabilities function 2016-03-17 21:03:32 -04:00
vishalnayak
de5c8199a8 Move sys/capabilities to logical_system along with business logic from core 2016-03-17 21:03:32 -04:00
vishalnayak
cebf72bca8 Move capabilities accessor logic to logical_system 2016-03-17 21:03:32 -04:00
vishalnayak
8718b0e133 Fix broken test case 2016-03-14 18:44:13 -04:00
vishalnayak
84809e39ca Refactor fetching sys/health parameters 2016-03-11 09:52:31 -05:00
Jeff Mitchell
ace5dd495b Add query parameters to /sys/health to specify return codes.
Fixes #1199
2016-03-11 00:41:25 -05:00
Jeff Mitchell
8b6df2a1a4 Merge branch 'master' into token-roles 2016-03-09 17:23:34 -05:00
vishalnayak
d1d37d5933 fix all the broken tests 2016-03-09 13:45:36 -05:00
vishalnayak
a5468237ed Added tests for 'sys/capabilities-accessor' endpoint 2016-03-09 11:29:09 -05:00
vishalnayak
2a35de81dc AccessorID --> Accessor, accessor_id --> accessor 2016-03-09 06:23:31 -05:00
vishalnayak
edfba16e95 ErrUserInput --> StatusBadRequest 2016-03-08 21:47:24 -05:00
vishalnayak
9da292932e Implemented /sys/capabilities-accessor and a way for setting HTTP error code in all the responses 2016-03-08 19:14:29 -05:00
vishalnayak
048f3b2fe4 Lay the foundation for returning proper HTTP status codes 2016-03-08 18:27:03 -05:00
vishalnayak
38a5d75caa Introduced AccessorID in TokenEntry and returning it along with token 2016-03-08 14:06:10 -05:00
vishalnayak
4e05730e7b Introduced ErrUserInput to distinguish user error from server error 2016-03-07 22:16:09 -05:00
vishalnayak
1b9e486bfd use errwrap to check the type of error message, fix typos 2016-03-07 18:36:26 -05:00
Jeff Mitchell
c4124bc40a Merge branch 'master' into token-roles 2016-03-07 10:03:54 -05:00
vishalnayak
0f82724f1f test cases for capabilities endpoint 2016-03-05 00:03:55 -05:00
vishalnayak
7f832f22aa refactoring changes due to acl.Capabilities 2016-03-04 18:55:48 -05:00
vishalnayak
a7cfc9cc7a Removing the 'Message' field 2016-03-04 10:36:03 -05:00
vishalnayak
42a7bab69e Test files for capabilities endpoint 2016-03-04 10:36:03 -05:00
vishalnayak
894f2ccef1 self review rework 2016-03-04 10:36:03 -05:00
vishalnayak
f00261785a Handled root token use case 2016-03-04 10:36:03 -05:00
vishalnayak
b2f394d779 Added capabilities and capabilities-self endpoints to http muxer 2016-03-04 10:36:03 -05:00
vishalnayak
7dcc48a562 Refactor http/sys_capabilities.go 2016-03-04 10:36:03 -05:00
vishalnayak
ed3e2c6c05 Added sys/capabililties endpoint 2016-03-04 10:36:02 -05:00
Jeff Mitchell
a520728263 Merge pull request #1146 from hashicorp/step-down
Provide 'sys/step-down' and 'vault step-down'
2016-03-03 12:30:08 -05:00
Jeff Mitchell
f88c6c16db Remove proxy function as it's unneeded now 2016-03-02 14:55:51 -05:00
Jeff Mitchell
f85c3f48af Remove sys_policy from special handling as it's implemented in
logical_system too. Clean up the mux handlers.
2016-03-02 14:16:54 -05:00
Jeff Mitchell
46a71bd648 Add a sleep in the RedirectStandby test to try to fix raciness 2016-03-02 12:06:16 -05:00
Jeff Mitchell
8be467a31a Update tests to add expected role parameters 2016-03-01 12:41:40 -05:00
Jeff Mitchell
6b0c692385 Provide 'sys/step-down' and 'vault step-down'
This endpoint causes the node it's hit to step down from active duty.
It's a noop if the node isn't active or not running in HA mode. The node
will wait one second before attempting to reacquire the lock, to give
other nodes a chance to grab it.

Fixes #1093
2016-02-26 19:43:55 -05:00
Jeff Mitchell
5f9c3e6837 We treat put/post the same, so allow init to use POST 2016-02-22 20:22:31 -05:00
Jeff Mitchell
a8a227b97a Add the server's time in UTC to the health response. 2016-02-22 19:51:18 -05:00
Jeff Mitchell
2e2d5252c3 Verify that nonces are non-empty in tests 2016-02-12 15:35:26 -05:00
Jeff Mitchell
58a2c4d9a0 Return status for rekey/root generation at init time. This mitigates a
(very unlikely) potential timing attack between init-ing and fetching
status.

Fixes #1054
2016-02-12 14:24:36 -05:00
Jeff Mitchell
1a1d8a8d85 Make "ttl" reflect the actual TTL of the token in lookup calls.
Add a new value "creation_ttl" which holds the value at creation time.

Fixes #986
2016-02-01 11:16:32 -05:00
Jeff Mitchell
a80481792e Fix up unit tests to expect new values 2016-01-29 19:36:56 -05:00
Jeff Mitchell
9eaef0a2a1 Update documentation and use ParseBool for list query param checking 2016-01-22 10:07:32 -05:00
Jeff Mitchell
f8e569ae0a Address some review feedback 2016-01-22 10:07:32 -05:00
Jeff Mitchell
2613343c3d Updates and documentation 2016-01-22 10:07:32 -05:00