Skip to content

sql,server: add a validation to tenant names to mandate a specific lexical structure #92613

@knz

Description

@knz

This is coming up when implementing tenant routing for SQL clients. As requested/suggested by andyk, it would be good to allow routing tenants using a prefix in the dbname provided by clients, for example postgres://.../mytenant.mydb. This is what the SQL proxy does in serverless too. However, we can only do this reliably if the tenant name is guaranteed to not contain a period.

@jeffswenson suggests:

If we want to support SNI on dedicated clusters, then we also need to prohibit ‘_’, since it is not a valid character in dns names.

Proposal: valid DNS identifier, but . forbidden.

Jira issue: CRDB-21884

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-multitenancyRelated to multi-tenancyC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-multitenantIssues owned by the multi-tenant virtual team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions