Merge pull request #12489 from hashicorp/docs/results-filtered-by-acl-awareness-coordinate

docs: mention filtered by ACLs in coordinate API
This commit is contained in:
Jared Kirschner 2022-03-19 16:17:08 -04:00 committed by GitHub
commit bea07bd6e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 0 deletions

View File

@ -78,6 +78,8 @@ within the same area.
This endpoint returns the LAN network coordinates for all nodes in a given This endpoint returns the LAN network coordinates for all nodes in a given
datacenter. datacenter.
@include 'http_api_results_filtered_by_acls.mdx'
| Method | Path | Produces | | Method | Path | Produces |
| ------ | ------------------- | ------------------ | | ------ | ------------------- | ------------------ |
| `GET` | `/coordinate/nodes` | `application/json` | | `GET` | `/coordinate/nodes` | `application/json` |

View File

@ -110,6 +110,27 @@ of results, because some have been filtered out by ACL policies.
In order to limit information leakage, this header is only present for requests In order to limit information leakage, this header is only present for requests
authenticated by a valid ACL token. authenticated by a valid ACL token.
The following example uses `curl` to view the
`X-Consul-Results-Filtered-By-ACLs` response header.
```shell-session
$ curl \
--header "X-Consul-Token: <non-anonymous consul token>" \
--include \
http://127.0.0.1:8500/v1/catalog/services
HTTP/1.1 200 OK
Content-Type: application/json
...
X-Consul-Default-Acl-Policy: deny
X-Consul-Results-Filtered-By-Acls: true
{
"redis": [],
"postgresql": ["primary", "secondary"]
}
```
## UUID Format ## UUID Format
UUID-format identifiers generated by the Consul API use the UUID-format identifiers generated by the Consul API use the

View File

@ -0,0 +1,3 @@
The HTTP response includes the `X-Consul-Results-Filtered-By-ACLs: true` header
if the response array excludes results due to ACL policy configuration.
Refer to the [HTTP API documentation](/api-docs#results-filtered-by-acls) for more information.