You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/4/tenants.md
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,18 +12,27 @@ The Tenants API **requires** a key which can be generated using the [Tenants CLI
12
12
13
13
## Request signing
14
14
15
-
Requests to the Tenants API **must**be signed by passing the `X-Signature` header containing the request signature.
15
+
All requests to the Tenants API **must**include an `X-Signature` header containing an HMAC SHA256 signature of the request body.
16
16
17
17
```plain
18
-
X-Signature: request_signature_here
18
+
X-Signature: your_hmac_sha256_signature
19
19
```
20
20
21
-
Signatures must be generated using the raw request body string and the [Tenants Private Key](../../application/configuration/multitenancy.md#tenants-key-pair), with base64 encoding.
21
+
Generate the signature by hashing the raw request body (as a string) with `CHEVERETO_TENANTS_API_SIGNING_SECRET` using HMAC SHA256. The output must be in hexadecimal format.
If you need to use the [Tenants API](../../api/4/tenants.md), you will require a key pair. You must set a Tenants public key for verifying signed requests.
*`CHEVERETO_TENANTS_API_REQUEST_SECRET` is required to verify signed requests to the [Tenants API](../../api/4/tenants.md).
54
43
55
44
### SaaS context
56
45
@@ -150,11 +139,11 @@ app/bin/tenants -C api:key:delete --name "My Key"
150
139
151
140
Access to the [Tenants API](../../api/4/tenants.md) can be restricted by IP address or network range using `CHEVERETO_TENANTS_API_ALLOW_LIST`.
152
141
153
-
All API keys are cryptographically signed with `CHEVERETO_TENANTS_API_KEY_SIGNING_SECRET`. Only keys generated through the [Tenants CLI](../../application/reference/cli.md#create-tenants-api-key) contain valid signatures and will be accepted by the API.
142
+
All API keys are cryptographically signed with `CHEVERETO_TENANTS_API_KEY_SECRET`. Only keys generated through the [Tenants CLI](../../application/reference/cli.md#create-tenants-api-key) contain valid signatures and will be accepted by the API.
Copy file name to clipboardExpand all lines: introduction/changelog/4.4.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,15 +22,15 @@ This variable allows defining a JSON object with environment variables that will
22
22
23
23
When running Chevereto in multi-tenant mode, this variable specifies the target tenant for command-line interface (CLI) operations. It should be set to the unique tenant ID of the desired tenant.
24
24
25
-
`CHEVERETO_TENANTS_PUBLIC_KEY`
25
+
`CHEVERETO_TENANTS_API_REQUEST_SECRET`
26
26
27
-
This variable is required to verify signed requests to the [Tenants API](../../api/4/tenants.md). It should contain the public key corresponding to the private key used for signing requests.
27
+
This variable is required to verify signed requests to the [Tenants API](../../api/4/tenants.md). It should contain the secret used for signing requests.
28
28
29
29
`CHEVERETO_TENANTS_API_ALLOW_LIST`
30
30
31
31
This variable allows restricting access to the [Tenants API](../../api/4/tenants.md) by specifying a comma-separated list of allowed IP addresses or networks. Only requests originating from these sources will be permitted to access the API.
32
32
33
-
`CHEVERETO_TENANTS_API_KEY_SIGNING_SECRET`
33
+
`CHEVERETO_TENANTS_API_KEY_SECRET`
34
34
35
35
This variable is used to verify requests coming from a known [Tenants API](../../api/4/tenants.md) key.
0 commit comments