Commit Graph

80 Commits

Author SHA1 Message Date
Saif Abid 8211555d0d Fix json for /v1/catalog/node in markdown
add in a missing comma after the "Address" field
2016-05-19 14:41:41 -04:00
James Phillips 653387637a Reduces the number of operations in a transaction to 64. 2016-05-14 21:40:46 -07:00
James Phillips 778b975e7a Adds a get-tree verb to KV transaction operations. 2016-05-13 16:57:39 -07:00
James Phillips 570d46aa5f Adds some size limiting features to transactions to help prevent abuse. 2016-05-13 13:39:01 -07:00
James Phillips fbfb90a694 Removes null results for deletes, and preps for more than one result from an operation. 2016-05-13 01:47:55 -07:00
James Phillips a37bf9de56 Adds a read-only optimized path for transactions. 2016-05-13 00:34:05 -07:00
James Phillips 17cd0ac4ec Adds documentation for the transaction endpoint. 2016-05-11 14:18:47 -07:00
James Phillips 963916e990 Clarifies default behavior of blank service addresses. 2016-04-20 10:16:06 -07:00
James Phillips 77ad084229 Fixes JSON in wildcard query example. 2016-03-23 14:33:20 -07:00
James Phillips 6b2ace6f6b Fixes a few bugs in the prepared query doc. 2016-03-17 23:42:27 -07:00
James Phillips aa8cd2619d Fixes broken example JSON. 2016-03-07 10:45:39 -08:00
James Phillips eb7004f2b8 Renames "debug" endpoint and structures to "explain". 2016-03-07 10:45:39 -08:00
James Phillips d7288e3a5e Adds a prepared query debug endpoint. 2016-03-07 10:45:39 -08:00
James Phillips fbd8e40cd5 Adds basic docs for prepared query templates. 2016-03-07 10:45:39 -08:00
James Phillips 7ebad899da Adds a new PUT-based TTL check update endpoint. 2016-03-02 17:54:01 -08:00
James Phillips dca480e284 Cleans up the documents. 2016-02-24 18:05:58 -08:00
James Phillips 7d392118d2 Adds a check for users re-submitting the redacted token. 2016-02-24 17:35:26 -08:00
James Phillips 483898abe5 Renames "prepared_query" ACL policy to "query". 2016-02-24 17:02:06 -08:00
James Phillips 880cd21667 Refactors docs into a more complete state for prepared query ACLs. 2016-02-23 22:27:44 -08:00
James Phillips 67de77482e Creates new "prepared-query" ACL type and new token capture behavior.
Prior to this change, prepared queries had the following behavior for
ACLs, which will need to change to support templates:

1. A management token, or a token with read access to the service being
   queried needed to be provided in order to create a prepared query.

2. The token used to create the prepared query was stored with the query
   in the state store and used to execute the query.

3. A management token, or the token used to create the query needed to be
   supplied to perform and CRUD operations on an existing prepared query.

This was pretty subtle and complicated behavior, and won't work for
templates since the service name is computed at execution time. To solve
this, we introduce a new "prepared-query" ACL type, where the prefix
applies to the query name for static prepared query types and to the
prefix for template prepared query types.

With this change, the new behavior is:

1. A management token, or a token with "prepared-query" write access to
   the query name or (soon) the given template prefix is required to do
   any CRUD operations on a prepared query, or to list prepared queries
   (the list is filtered by this ACL).

2. You will no longer need a management token to list prepared queries,
   but you will only be able to see prepared queries that you have access
   to (you get an empty list instead of permission denied).

3. When listing or getting a query, because it was easy to capture
   management tokens given the past behavior, this will always blank out
   the "Token" field (replacing the contents as <hidden>) for all tokens
   unless a management token is supplied. Going forward, we should
   discourage people from binding tokens for execution unless strictly
   necessary.

4. No token will be captured by default when a prepared query is created.
   If the user wishes to supply an execution token then can pass it in via
   the "Token" field in the prepared query definition. Otherwise, this
   field will default to empty.

5. At execution time, we will use the captured token if it exists with the
   prepared query definition, otherwise we will use the token that's passed
   in with the request, just like we do for other RPCs (or you can use the
   agent's configured token for DNS).

6. Prepared queries with no name (accessible only by ID) will not require
   ACLs to create or modify (execution time will depend on the service ACL
   configuration). Our argument here is that these are designed to be
   ephemeral and the IDs are as good as an ACL. Management tokens will be
   able to list all of these.

These changes enable templates, but also enable delegation of authority to
manage the prepared query namespace.
2016-02-23 17:12:43 -08:00
James Phillips 590ab94d8d Adds documentation for WAN address translation. 2016-02-07 11:12:19 -08:00
Raja Nadar cd17cdc03d fixing small typo in json 2016-01-29 01:25:23 -08:00
Seth Vargo f5ffa8fb79 Fix broken link 2016-01-13 19:32:30 -05:00
Peter Schaadt b15d02e431 Fixing typos in Coordinate documentation. 2015-12-28 16:34:09 -08:00
Ryan Breen 4d42ff66e3 Update health.html.markdown
Correct json syntax in example.
2015-11-23 09:39:05 -05:00
Arnout Engelen afc77a4634 Include 'Service'/'Address' field in example
Add the `Service`/`Address` field to the example output for the `/v1/health/service/\<service\>` endpoint.

Even though it's an optional value, this is probably the one consumers are looking for (rather than the `Node` address)
2015-11-23 15:01:24 +01:00
James Phillips d861f87851 Fixes a typo in the prepared queries doc. 2015-11-20 21:44:24 -08:00
James Phillips 95c708f65e Adds Docker checks support to client API.
Also changed `DockerContainerId` to `DockerContainerID`, and updated the agent
API docs to reflect their support for Docker checks.
2015-11-18 07:40:02 -08:00
Sean Chittenden e4d7bfee6a Fix markdown's markup: 2^(64-1) != 2^(64)-1 2015-11-17 15:21:47 -08:00
James Phillips 800e946bf1 Adds and updates docs for prepared queries. 2015-11-15 17:06:00 -08:00
James Phillips f1f9d30ade Extends the session TTL max to 24 hours, and adds a warning to the docs. 2015-11-15 16:51:00 -08:00
James Phillips cef9402ab9 Updates docs for network coordinates. 2015-10-23 15:23:01 -07:00
James Phillips f9da231a1c Adds coordinate of agent to self endpoint. 2015-10-23 15:23:01 -07:00
James Phillips 33e3505aea Adds endpoints for raw network coordinates. 2015-10-23 15:23:01 -07:00
James Phillips 9c9195746f Changes ?near=self to a safer ?near=_agent, which is also clearer about what it does. 2015-10-23 15:23:01 -07:00
James Phillips 9caa5b3653 Adds distance sorting to health endpoint. Cleans up unit tests. 2015-10-23 15:23:01 -07:00
James Phillips e47eea3f3a Adds a magic "self" node name to distance queries. 2015-10-23 15:23:01 -07:00
James Phillips 36c78f5042 Adds sort of DCs in catalog queries based on RTT. Cleans up.
* Makes the catalog endpoint respect disabling coordinates for all
  RTT-sorting query types.
2015-10-23 15:23:01 -07:00
James Phillips 89c7203f31 Adds coordinate sorting support to catalog queries for nodes and service nodes. 2015-10-23 15:23:01 -07:00
James Phillips dc05fb728a Updates docs about new "acquire when you already have it" behavior. 2015-10-15 14:59:09 -07:00
James Phillips 103fe83b4a Clarifies services docs a bit. 2015-08-25 16:12:19 -07:00
Peter Fern 916ff7e5fa Document `TCP` check type 2015-07-27 10:53:52 +10:00
Ryan Uber c8f76b5e2c website: document passing ACL tokens in catalog register/deregister 2015-06-15 11:45:30 -07:00
Ryan Uber 32820fc9d2 website: add status field for check registration in http docs 2015-05-28 13:09:33 -07:00
Ryan Uber dd57071240 website: Document peers api consistency. Fixes #880 2015-05-06 12:13:28 -07:00
Armon Dadgar f3a8f907fb Merge pull request #909 from hashicorp/f-create
Support ACL upsert behavior
2015-05-06 11:22:11 -07:00
Armon Dadgar c0f92c3256 website: Document new ACL upsert behavior 2015-05-05 19:25:27 -07:00
Ryan Uber 8d2834fb12 website: document service and check acl options 2015-04-28 14:28:06 -07:00
Vasily Vasilkov 3f5e767c30 Fix invalid link to sessions page 2015-04-22 12:40:27 +03:00
Cameron Ruatta c7d560bd7e Caps not necessary here 2015-04-20 20:59:45 -07:00