docs/vmgateway: added to documentation a case, when vm_access claim value is of string type

This commit is contained in:
Andrii Chubatiuk 2024-11-27 12:13:59 +02:00 committed by GitHub
parent 466cbee433
commit 60d587f55b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,8 +31,9 @@ See how to request a free trial license [here](https://victoriametrics.com/produ
`vmgateway` supports jwt based authentication. With jwt payload can be configured to give access to specific tenants and labels as well as to read/write.
jwt token must be in following format:
jwt token must be in one of the following formats:
with `vm_access` claim as JSON object
```json
{
"exp": 1617304574,
@ -51,6 +52,15 @@ jwt token must be in following format:
}
```
or with `vm_access` claim as string
```json
{
"exp": 1617304574,
"vm_access": "{\"tenant_id\":{\"account_id\":1,\"project_id\":5},\"extra_labels\":{\"team\":\"dev\",\"project\":\"mobile\"},\"extra_filters\": [\"{env=~\\\"prod|dev\\\",team!=\\\"test\\\"}\"],\"mode\":1}"
}
```
Where:
* `exp` - required, expire time in unix_timestamp. If the token expires then `vmgateway` rejects the request.