Skip to content

Commit 95a407f

Browse files
kd7lxlpracucci
andauthored
Clarify Prometheus capability in auth guide (#4399)
* Clarify Prometheus capability in auth guide Signed-off-by: Tom Hayward <[email protected]> Co-authored-by: Marco Pracucci <[email protected]>
1 parent b4daa22 commit 95a407f

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

docs/guides/authentication-and-authorisation.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,19 @@ of protection.
1515
Typically this means you run Cortex behind a reverse proxy, and you must
1616
ensure that all callers, both machines sending data over the `remote_write`
1717
interface and humans sending queries from GUIs, supply credentials
18-
which identify them and confirm they are authorised.
19-
20-
When configuring the `remote_write` API in Prometheus there is no way to
21-
add extra headers. The user and password fields of http Basic auth, or
22-
Bearer token, can be used to convey the tenant ID and/or credentials.
23-
See the **Cortex-Tenant** section below for one way to solve this.
18+
which identify them and confirm they are authorised. When configuring the
19+
`remote_write` API in Prometheus, the user and password fields of http Basic
20+
auth, or Bearer token, can be used to convey the tenant ID and/or credentials.
21+
See the [Cortex-Tenant](#cortex-tenant) section below for one way to solve this.
22+
23+
In trusted environments, Prometheus can send the `X-Scope-OrgID` header itself
24+
by configuring the `headers` field in its [`remote_write` configuration](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write):
25+
```
26+
remote_write:
27+
- url: http://<cortex>/prometheus/api/v1/push
28+
headers:
29+
X-Scope-OrgID: <org>
30+
```
2431

2532
To disable the multi-tenant functionality, you can pass the argument
2633
`-auth.enabled=false` to every Cortex component, which will set the OrgID

0 commit comments

Comments
 (0)