Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultTenantHeader is the default header used to designate the tenant making a request. DefaultTenantHeader = "THANOS-TENANT" // DefaultTenant is the default value used for when no tenant is passed via the tenant header. DefaultTenant = "default-tenant" // DefaultTenantLabel is the default label-name with which the tenant is announced in stored metrics. DefaultTenantLabel = "tenant_id" // This key is used to pass tenant information using Context. TenantKey contextKey = 0 )
View Source
const ( CertificateFieldOrganization = "organization" CertificateFieldOrganizationalUnit = "organizationalUnit" CertificateFieldCommonName = "commonName" )
Allowed fields in client certificates.
Variables ¶
This section is empty.
Functions ¶
func GetTenantFromHTTP ¶
func GetTenantFromHTTP(r *http.Request, tenantHeader string, defaultTenantID string, certTenantField string) (string, error)
GetTenantFromHTTP extracts the tenant from a http.Request object.
func IsTenantValid ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.