diff --git a/docs/sources/about-tenant-ids.md b/docs/sources/about-tenant-ids.md index 58477646529..6007897e5a9 100644 --- a/docs/sources/about-tenant-ids.md +++ b/docs/sources/about-tenant-ids.md @@ -1,19 +1,17 @@ --- title: "About tenant IDs" description: "" -weight: 100 +weight: 10 --- # About tenant IDs -The tenant ID (also called "user ID" or "org ID") is the unique identifier of a tenant within a Grafana Mimir cluster. The tenant ID is an opaque information to Grafana Mimir, which doesn't make any assumption on its format/content, but its naming has two limitations: +The tenant ID is the unique identifier of a tenant within a Grafana Mimir cluster. +For information about how Grafana Mimir components use tenant IDs, refer to [About authentication and authorization]({{}}). -1. Supported characters -2. Length +## Restrictions -## Supported characters - -The following character sets are generally **safe for use in the tenant ID**: +Tenant IDs must be less-than or equal-to 150 bytes/characters in length and must comprise only supported characters: - Alphanumeric characters - `0-9` @@ -23,14 +21,12 @@ The following character sets are generally **safe for use in the tenant ID**: - Exclamation point (`!`) - Hyphen (`-`) - Underscore (`_`) - - Single Period (`.`), but the tenant IDs `.` and `..` are considered invalid + - Single Period (`.`) - Asterisk (`*`) - Single quote (`'`) - Open parenthesis (`(`) - Close parenthesis (`)`) -All other characters are not safe to use. In particular, slashes `/` and whitespaces (` `) are **not supported**. - -## Length +> **Note:** For security reasons, `.` and `..` aren't valid tenant IDs. -The tenant ID length should not exceed 150 bytes/characters. +All other characters, including slashes and whitespace, aren't supported. diff --git a/docs/sources/configuration/about-versioning.md b/docs/sources/configuration/about-versioning.md index f296f7a09a4..8d2417c8ca0 100644 --- a/docs/sources/configuration/about-versioning.md +++ b/docs/sources/configuration/about-versioning.md @@ -26,8 +26,6 @@ Grafana Mimir strives to be 100% API compatible with Prometheus (under `/prometh - Additional API around pushing metrics (under `/prometheus/api/push`). - Additional API endpoints for management of Grafana Mimir itself, such as the ring. These APIs are not part of the any compatibility guarantees. -_For more information, please refer to the [limitations](../guides/limitations.md) doc._ - ## Experimental features Grafana Mimir is an actively developed project and we want to encourage the introduction of new features and capabilities. As such, not everything in each release of Grafana Mimir is considered "production-ready". Features not considered "production-ready" and the flags used to enable and/or configure these features will be marked "Experimental". There are no backwards compatibility guarantees on anything marked experimental. Configuration and flags are subject to change. diff --git a/docs/sources/glossary.md b/docs/sources/glossary.md index 0f315378b82..0afd0055748 100644 --- a/docs/sources/glossary.md +++ b/docs/sources/glossary.md @@ -81,7 +81,7 @@ A tenant (also called "user" or "org") is the owner of a set of series written t For more information, please refer to: - [HTTP API authentication](../api/_index.md#authentication) -- [Tenant ID limitations](./limitations.md#tenant-id-naming) +- [About tenant IDs]({{}}) ### Time series diff --git a/pkg/tenant/resolver.go b/pkg/tenant/resolver.go index c7c4e94ba7c..51b27115124 100644 --- a/pkg/tenant/resolver.go +++ b/pkg/tenant/resolver.go @@ -108,7 +108,7 @@ type MultiResolver struct { // NewMultiResolver creates a tenant resolver, which allows request to have // multiple tenant ids submitted separated by a '|' character. This enforces // further limits on the character set allowed within tenants as detailed here: -// https://github.com/grafana/mimir/blob/main/docs/sources/guides/limitations.md) +// https://github.com/grafana/mimir/blob/main/docs/sources/about-tenant-ids.md func NewMultiResolver() *MultiResolver { return &MultiResolver{} } diff --git a/pkg/tenant/tenant.go b/pkg/tenant/tenant.go index abf58e6b43a..b6c2d03d7c6 100644 --- a/pkg/tenant/tenant.go +++ b/pkg/tenant/tenant.go @@ -77,8 +77,9 @@ func JoinTenantIDs(tenantIDs []string) string { return strings.Join(tenantIDs, tenantIDsLabelSeparator) } -// this checks if a rune is supported in tenant IDs (according to -// https://github.com/grafana/mimir/blob/main/docs/sources/guides/limitations.md) +// This checks if a rune is supported in tenant IDs according to the rules +// documented in "About tenant IDs": +// https://github.com/grafana/mimir/blob/main/docs/sources/about-tenant-ids.md func isSupported(c rune) bool { // characters if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') {