diff --git a/cmd/thanos/receive.go b/cmd/thanos/receive.go index e77af7b034..5f9405b4b4 100644 --- a/cmd/thanos/receive.go +++ b/cmd/thanos/receive.go @@ -876,7 +876,7 @@ func (rc *receiveConfig) registerFlag(cmd extkingpin.FlagClause) { cmd.Flag("receive.tenant-header", "HTTP header to determine tenant for write requests.").Default(tenancy.DefaultTenantHeader).StringVar(&rc.tenantHeader) - cmd.Flag("receive.tenant-certificate-field", "Use TLS client's certificate field to determine tenant for write requests. Must be one of "+receive.CertificateFieldOrganization+", "+receive.CertificateFieldOrganizationalUnit+" or "+receive.CertificateFieldCommonName+". This setting will cause the receive.tenant-header flag value to be ignored.").Default("").EnumVar(&rc.tenantField, "", receive.CertificateFieldOrganization, receive.CertificateFieldOrganizationalUnit, receive.CertificateFieldCommonName) + cmd.Flag("receive.tenant-certificate-field", "Use TLS client's certificate field to determine tenant for write requests. Must be one of "+tenancy.CertificateFieldOrganization+", "+tenancy.CertificateFieldOrganizationalUnit+" or "+tenancy.CertificateFieldCommonName+". This setting will cause the receive.tenant-header flag value to be ignored.").Default("").EnumVar(&rc.tenantField, "", tenancy.CertificateFieldOrganization, tenancy.CertificateFieldOrganizationalUnit, tenancy.CertificateFieldCommonName) cmd.Flag("receive.default-tenant-id", "Default tenant ID to use when none is provided via a header.").Default(tenancy.DefaultTenant).StringVar(&rc.defaultTenantID) diff --git a/pkg/receive/handler.go b/pkg/receive/handler.go index 569404630f..cc89748726 100644 --- a/pkg/receive/handler.go +++ b/pkg/receive/handler.go @@ -64,13 +64,6 @@ const ( labelError = "error" ) -// Allowed fields in client certificates. -const ( - CertificateFieldOrganization = "organization" - CertificateFieldOrganizationalUnit = "organizationalUnit" - CertificateFieldCommonName = "commonName" -) - var ( // errConflict is returned whenever an operation fails due to any conflict-type error. errConflict = errors.New("conflict")