Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise "About tenant IDs" #1158

Merged
merged 3 commits into from
Feb 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions docs/sources/about-tenant-ids.md
Original file line number Diff line number Diff line change
@@ -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]({{<relref "./about-authentication-and-authorization.md" >}}).

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 150 bytes/characters in length and must comprise only supported characters:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be pedantic: they must be less than or equal to 150 bytes/characters in length:

if len(s) > 150 {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in e239d1d


- Alphanumeric characters
- `0-9`
Expand All @@ -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.