<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Secure Grafana Mimir on Grafana Labs</title><link>https://grafana.com/docs/mimir/v2.11.x/manage/secure/</link><description>Recent content in Secure Grafana Mimir on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/mimir/v2.11.x/manage/secure/index.xml" rel="self" type="application/rss+xml"/><item><title>Grafana Mimir authentication and authorization</title><link>https://grafana.com/docs/mimir/v2.11.x/manage/secure/authentication-and-authorization/</link><pubDate>Mon, 13 Apr 2026 22:46:07 +0000</pubDate><guid>https://grafana.com/docs/mimir/v2.11.x/manage/secure/authentication-and-authorization/</guid><content><![CDATA[&lt;h1 id=&#34;grafana-mimir-authentication-and-authorization&#34;&gt;Grafana Mimir authentication and authorization&lt;/h1&gt;
&lt;p&gt;Grafana Mimir is a multi-tenant system where tenants can query metrics and alerts that include their tenant ID.
The query takes the tenant ID from the &lt;code&gt;X-Scope-OrgID&lt;/code&gt; parameter that exists in the HTTP header of each request, for example &lt;code&gt;X-Scope-OrgID: &amp;lt;TENANT-ID&amp;gt;&lt;/code&gt;.
You can federate queries across multiple tenants by using &lt;code&gt;true&lt;/code&gt; in &lt;code&gt;-tenant-federation.enabled=true&lt;/code&gt;. When you specify tenant IDs, separate them with a pipe (&lt;code&gt;|&lt;/code&gt;) character in the &lt;code&gt;X-Scope-OrgID&lt;/code&gt; header, as in the example &lt;code&gt;X-Scope-OrgID: tenant-1|tenant-2|tenant-3&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To protect Grafana Mimir from accidental or malicious calls, you must add a layer of protection such as a reverse proxy that authenticates requests and injects the appropriate tenant ID into the &lt;code&gt;X-Scope-OrgID&lt;/code&gt; header.&lt;/p&gt;
&lt;h2 id=&#34;configuring-prometheus-remote-write&#34;&gt;Configuring Prometheus remote write&lt;/h2&gt;
&lt;p&gt;For more information about Prometheus remote write configuration, refer to &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;remote write&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;with-an-authenticating-reverse-proxy&#34;&gt;With an authenticating reverse proxy&lt;/h3&gt;
&lt;p&gt;To use bearer authentication with a token stored in a file, the remote write configuration block includes the following parameters:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;authorization:
  type: Bearer
  credentials_file: &amp;lt;PATH TO BEARER TOKEN FILE&amp;gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To use basic authentication with a username and password stored in a file, the remote write configuration block includes the following parameters:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;basic_auth:
  username: &amp;lt;AUTHENTICATION PROXY USERNAME&amp;gt;
  password_file: &amp;lt;PATH TO AUTHENTICATION PROXY PASSWORD FILE&amp;gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;without-an-authenticating-reverse-proxy&#34;&gt;Without an authenticating reverse proxy&lt;/h3&gt;
&lt;p&gt;To configure the &lt;code&gt;X-Scope-OrgID&lt;/code&gt; header directly, the remote write configuration block includes the following parameters:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;headers:
  &amp;#34;X-Scope-OrgID&amp;#34;: &amp;lt;TENANT ID&amp;gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;extracting-tenant-id-from-prometheus-labels&#34;&gt;Extracting tenant ID from Prometheus labels&lt;/h2&gt;
&lt;p&gt;In trusted environments where you want to split series on Prometheus labels, you can run &lt;a href=&#34;https://github.com/blind-oracle/cortex-tenant&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;cortex-tenant&lt;/a&gt; between a Prometheus server and Grafana Mimir.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; cortex-tenant is a third-party community project that is not maintained by Grafana Labs.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;When proxying the timeseries to Grafana Mimir, you can configure cortex-tenant to use specified labels as the &lt;code&gt;X-Scope-OrgID&lt;/code&gt; header.&lt;/p&gt;
&lt;p&gt;To configure cortex-tenant, refer to &lt;a href=&#34;https://github.com/blind-oracle/cortex-tenant#configuration&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;configuration&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;disabling-multi-tenancy&#34;&gt;Disabling multi-tenancy&lt;/h2&gt;
&lt;p&gt;To disable multi-tenant functionality, pass the following argument to every Grafana Mimir component:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;-auth.multitenancy-enabled=false&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;After you disable multi-tenancy, Grafana Mimir components internally set the tenant ID to the string &lt;code&gt;anonymous&lt;/code&gt; for every request.&lt;/p&gt;
&lt;p&gt;To set an alternative tenant ID, use the &lt;code&gt;-auth.no-auth-tenant&lt;/code&gt; flag.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Not all tenant IDs are valid. For more information about tenant ID restrictions, refer to &lt;a href=&#34;../../../configure/about-tenant-ids/&#34;&gt;About tenant IDs&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;
]]></content><description>&lt;h1 id="grafana-mimir-authentication-and-authorization">Grafana Mimir authentication and authorization&lt;/h1>
&lt;p>Grafana Mimir is a multi-tenant system where tenants can query metrics and alerts that include their tenant ID.
The query takes the tenant ID from the &lt;code>X-Scope-OrgID&lt;/code> parameter that exists in the HTTP header of each request, for example &lt;code>X-Scope-OrgID: &amp;lt;TENANT-ID&amp;gt;&lt;/code>.
You can federate queries across multiple tenants by using &lt;code>true&lt;/code> in &lt;code>-tenant-federation.enabled=true&lt;/code>. When you specify tenant IDs, separate them with a pipe (&lt;code>|&lt;/code>) character in the &lt;code>X-Scope-OrgID&lt;/code> header, as in the example &lt;code>X-Scope-OrgID: tenant-1|tenant-2|tenant-3&lt;/code>.&lt;/p></description></item><item><title>Encrypting Grafana Mimir data at rest</title><link>https://grafana.com/docs/mimir/v2.11.x/manage/secure/encrypting-data-at-rest/</link><pubDate>Mon, 13 Apr 2026 22:46:07 +0000</pubDate><guid>https://grafana.com/docs/mimir/v2.11.x/manage/secure/encrypting-data-at-rest/</guid><content><![CDATA[&lt;h1 id=&#34;encrypting-grafana-mimir-data-at-rest&#34;&gt;Encrypting Grafana Mimir data at rest&lt;/h1&gt;
&lt;p&gt;Grafana Mimir supports encrypting data at rest in object storage using server-side encryption (SSE).
Configuration of SSE depends on your storage backend.&lt;/p&gt;
&lt;h2 id=&#34;google-cloud-storage&#34;&gt;Google Cloud Storage&lt;/h2&gt;
&lt;p&gt;Google Cloud Storage (GCS) encrypts data before writing it to disk. SSE is enabled by default and you cannot turn it off.
For more information about GCS encryption at rest, refer to &lt;a href=&#34;https://cloud.google.com/storage/docs/encryption/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Data encryption options&lt;/a&gt;.
Grafana Mimir requires no additional configuration to use GCS with SSE.&lt;/p&gt;
&lt;h2 id=&#34;aws-s3&#34;&gt;AWS S3&lt;/h2&gt;
&lt;p&gt;Configuring SSE with AWS S3 requires configuration in the Grafana Mimir S3 client.
The S3 client is only used when the storage backend is &lt;code&gt;s3&lt;/code&gt;.
Grafana Mimir supports the following AWS S3 SSE modes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Server-Side Encryption with Amazon S3-Managed Keys (SSE-S3)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Server-Side Encryption with KMS keys Stored in AWS Key Management Service (SSE-KMS)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can configure AWS S3 SSE globally or for specific tenants.&lt;/p&gt;
&lt;h3 id=&#34;configuring-aws-s3-sse-globally&#34;&gt;Configuring AWS S3 SSE globally&lt;/h3&gt;
&lt;p&gt;Configuring AWS S3 SSE globally requires setting SSE for each of the following storage backends:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../references/configuration-parameters/#alertmanager_storage&#34;&gt;alertmanager_storage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../references/configuration-parameters/#blocks_storage&#34;&gt;blocks_storage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../references/configuration-parameters/#ruler_storage&#34;&gt;ruler_storage&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more information about AWS S3 SSE configuration parameters, refer to &lt;a href=&#34;../../../references/configuration-parameters/#s3_storage_backend&#34;&gt;s3_storage_backend&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The following code sample shows a snippet of a Grafana Mimir configuration file with every backend storage configured to use AWS S3 SSE with and Amazon S3-managed key.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;alertmanager_storage:
  backend: &amp;#34;s3&amp;#34;
  s3:
    sse:
      type: &amp;#34;SSE-S3&amp;#34;
blocks_storage:
  backend: &amp;#34;s3&amp;#34;
  s3:
    sse:
      type: &amp;#34;SSE-S3&amp;#34;
ruler_storage:
  backend: &amp;#34;s3&amp;#34;
  s3:
    sse:
      type: &amp;#34;SSE-S3&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;configuring-aws-s3-sse-for-a-specific-tenant&#34;&gt;Configuring AWS S3 SSE for a specific tenant&lt;/h3&gt;
&lt;p&gt;You can use the following settings to override AWS S3 SSE for each tenant:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;s3_sse_type&lt;/code&gt;&lt;/strong&gt;&lt;br /&gt;
S3 server-side encryption type.
This setting must be applied to enable the SSE configuration override for a given tenant.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;s3_sse_kms_key_id&lt;/code&gt;&lt;/strong&gt;&lt;br /&gt;
S3 server-side encryption KMS Key ID.
This setting is ignored if the SSE type override is not set or the type is not &lt;code&gt;SSE-KMS&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;s3_sse_kms_encryption_context&lt;/code&gt;&lt;/strong&gt;&lt;br /&gt;
S3 server-side encryption KMS encryption context.
If this setting is not applied, and the key ID override is set, the encryption context is not be provided to S3.
This setting is ignored if the SSE type override is not set or the type is not &lt;code&gt;SSE-KMS&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;To configure AWS S3 SSE for a specific tenant&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Ensure Grafana Mimir uses a runtime configuration file by verifying that the flag &lt;code&gt;-runtime-config.file&lt;/code&gt; is set to a non-null value.
For more information about supported runtime configuration parameters, refer to &lt;a href=&#34;../../../configure/about-runtime-configuration/&#34;&gt;Runtime configuration&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the runtime configuration file, apply the &lt;code&gt;overrides.&amp;lt;TENANT&amp;gt;&lt;/code&gt; SSE settings.&lt;/p&gt;
&lt;p&gt;A partial runtime configuration file that has AWS S3 SSE with Amazon S3-managed keys set for a tenant called &amp;ldquo;tenant-a&amp;rdquo; appears as follows:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;overrides:
  &amp;#34;tenant-a&amp;#34;:
    s3_sse_type: &amp;#34;SSE-S3&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Save and deploy the runtime configuration file.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After the &lt;code&gt;-runtime-config.reload-period&lt;/code&gt; has elapsed, components reload the runtime configuration file and use the updated configuration.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;other-storage&#34;&gt;Other storage&lt;/h2&gt;
&lt;p&gt;Other storage backends might support encryption at rest if it is configured at the storage level.&lt;/p&gt;
]]></content><description>&lt;h1 id="encrypting-grafana-mimir-data-at-rest">Encrypting Grafana Mimir data at rest&lt;/h1>
&lt;p>Grafana Mimir supports encrypting data at rest in object storage using server-side encryption (SSE).
Configuration of SSE depends on your storage backend.&lt;/p></description></item><item><title>Securing Grafana Mimir Alertmanager</title><link>https://grafana.com/docs/mimir/v2.11.x/manage/secure/securing-alertmanager/</link><pubDate>Mon, 13 Apr 2026 22:46:07 +0000</pubDate><guid>https://grafana.com/docs/mimir/v2.11.x/manage/secure/securing-alertmanager/</guid><content><![CDATA[&lt;h1 id=&#34;securing-grafana-mimir-alertmanager&#34;&gt;Securing Grafana Mimir Alertmanager&lt;/h1&gt;
&lt;p&gt;By default, the Alertmanager exposes API endpoints that enable a user to configure the Alertmanager.
The Alertmanager configuration includes receivers that create network connections to send the alerting notifications.
For example, the &lt;code&gt;webhook&lt;/code&gt; receiver enables a user to configure an arbitrary URL to which the Alertmanager sends a customizable request for every alerting notification.
If the Alertmanager network security is not hardened, Grafana Mimir users might configure the Alertmanager to issue requests to any network address both in the local network and the Internet.&lt;/p&gt;
&lt;p&gt;We recommend hardening the network on which the Alertmanager runs.
Although hardening the network is out of the scope for Grafana Mimir, Grafana Mimir provides a basic built-in firewall that blocks connections created by Alertmanager receivers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To block specific network addresses in Alertmanager receivers, set &lt;code&gt;-alertmanager.receivers-firewall-block-cidr-networks&lt;/code&gt; to a comma-separated list of network CIDRs to block.&lt;/li&gt;
&lt;li&gt;To block private and local addresses in Alertmanager receivers, set &lt;code&gt;-alertmanager.receivers-firewall-block-private-addresses=true&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can override the Alertmanager built-in firewall settings on a per-tenant basis in the overrides section of the &lt;a href=&#34;../../../configure/about-runtime-configuration/&#34;&gt;runtime configuration&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You can disable the Alertmanager configuration API by setting &lt;code&gt;-alertmanager.enable-api=false&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
]]></content><description>&lt;h1 id="securing-grafana-mimir-alertmanager">Securing Grafana Mimir Alertmanager&lt;/h1>
&lt;p>By default, the Alertmanager exposes API endpoints that enable a user to configure the Alertmanager.
The Alertmanager configuration includes receivers that create network connections to send the alerting notifications.
For example, the &lt;code>webhook&lt;/code> receiver enables a user to configure an arbitrary URL to which the Alertmanager sends a customizable request for every alerting notification.
If the Alertmanager network security is not hardened, Grafana Mimir users might configure the Alertmanager to issue requests to any network address both in the local network and the Internet.&lt;/p></description></item><item><title>Securing Grafana Mimir communications with TLS</title><link>https://grafana.com/docs/mimir/v2.11.x/manage/secure/securing-communications-with-tls/</link><pubDate>Mon, 13 Apr 2026 22:46:07 +0000</pubDate><guid>https://grafana.com/docs/mimir/v2.11.x/manage/secure/securing-communications-with-tls/</guid><content><![CDATA[&lt;h1 id=&#34;securing-grafana-mimir-communications-with-tls&#34;&gt;Securing Grafana Mimir communications with TLS&lt;/h1&gt;
&lt;p&gt;Grafana Mimir is a distributed system with significant traffic between its components.
To allow for secure communication, Grafana Mimir supports TLS between its
components. This topic describes the process used to set up TLS.&lt;/p&gt;
&lt;h3 id=&#34;generation-of-certificates-to-configure-tls&#34;&gt;Generation of certificates to configure TLS&lt;/h3&gt;
&lt;p&gt;To establish secure inter-component communication in Grafana Mimir with TLS, you must generate certificates using a certificate authority (CA).
The CA should be private to the organization because certificates signed by the CA will have permissions to communicate with the cluster.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The generated certificates are valid for 100,000 days. You can change the duration by adjusting the &lt;code&gt;-days&lt;/code&gt; option in the command. We recommend that you replace the certificates every two years.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The following script generates self-signed certificates for the cluster.
The script generates private keys &lt;code&gt;client.key&lt;/code&gt;, &lt;code&gt;server.key&lt;/code&gt; and certificates &lt;code&gt;client.crt&lt;/code&gt;, &lt;code&gt;server.crt&lt;/code&gt; for both the client and server.
The script generates the CA cert as &lt;code&gt;root.crt&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;# keys
openssl genrsa -out root.key
openssl genrsa -out client.key
openssl genrsa -out server.key

# root cert / certifying authority
openssl req -x509 -new -nodes -key root.key -subj &amp;#34;/C=US/ST=KY/O=Org/CN=root&amp;#34; -sha256 -days 100000 -out root.crt

# csrs - certificate signing requests
openssl req -new -sha256 -key client.key -subj &amp;#34;/C=US/ST=KY/O=Org/CN=client&amp;#34; -out client.csr
openssl req -new -sha256 -key server.key -subj &amp;#34;/C=US/ST=KY/O=Org/CN=localhost&amp;#34; -out server.csr

# certificates
openssl x509 -req -in client.csr -CA root.crt -CAkey root.key -CAcreateserial -out client.crt -days 100000 -sha256
openssl x509 -req -in server.csr -CA root.crt -CAkey root.key -CAcreateserial -out server.crt -days 100000 -sha256&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;configure-tls-certificates-in-grafana-mimir&#34;&gt;Configure TLS certificates in Grafana Mimir&lt;/h3&gt;
&lt;p&gt;Every gRPC connection between Grafana Mimir components supports TLS configuration as specified in server flags and client flags.&lt;/p&gt;
&lt;h4 id=&#34;server-flags&#34;&gt;Server flags&lt;/h4&gt;
&lt;p&gt;You can set the cipher suites and minimum TLS version that the server will accept:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-server.tls-cipher-suites&lt;/code&gt;: Comma-separated list of cipher suites to use. If blank, the default Go cipher suites is used.
Possible values, from &lt;a href=&#34;https://pkg.go.dev/crypto/tls#pkg-constants&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://pkg.go.dev/crypto/tls#pkg-constants&lt;/a&gt;:
&lt;ul&gt;
&lt;li&gt;TLS_RSA_WITH_RC4_128_SHA&lt;/li&gt;
&lt;li&gt;TLS_RSA_WITH_3DES_EDE_CBC_SHA&lt;/li&gt;
&lt;li&gt;TLS_RSA_WITH_AES_128_CBC_SHA&lt;/li&gt;
&lt;li&gt;TLS_RSA_WITH_AES_256_CBC_SHA&lt;/li&gt;
&lt;li&gt;TLS_RSA_WITH_AES_128_CBC_SHA256&lt;/li&gt;
&lt;li&gt;TLS_RSA_WITH_AES_128_GCM_SHA256&lt;/li&gt;
&lt;li&gt;TLS_RSA_WITH_AES_256_GCM_SHA384&lt;/li&gt;
&lt;li&gt;TLS_ECDHE_ECDSA_WITH_RC4_128_SHA&lt;/li&gt;
&lt;li&gt;TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA&lt;/li&gt;
&lt;li&gt;TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA&lt;/li&gt;
&lt;li&gt;TLS_ECDHE_RSA_WITH_RC4_128_SHA&lt;/li&gt;
&lt;li&gt;TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA&lt;/li&gt;
&lt;li&gt;TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA&lt;/li&gt;
&lt;li&gt;TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA&lt;/li&gt;
&lt;li&gt;TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256&lt;/li&gt;
&lt;li&gt;TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256&lt;/li&gt;
&lt;li&gt;TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256&lt;/li&gt;
&lt;li&gt;TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256&lt;/li&gt;
&lt;li&gt;TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384&lt;/li&gt;
&lt;li&gt;TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384&lt;/li&gt;
&lt;li&gt;TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256&lt;/li&gt;
&lt;li&gt;TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-server.tls-min-version&lt;/code&gt;: Minimum TLS version to use. Allowed values: &amp;ldquo;VersionTLS10&amp;rdquo;, &amp;ldquo;VersionTLS11&amp;rdquo;, &amp;ldquo;VersionTLS12&amp;rdquo;, &amp;ldquo;VersionTLS13&amp;rdquo;. If blank, the Go TLS minimum version is used.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following
server flag settings determine if a server requires a client to provide a valid certificate back to the server.
The flags support all the values defined in the &lt;a href=&#34;https://pkg.go.dev/crypto/tls#ClientAuthType&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;crypto/tls&lt;/a&gt; standard library.&lt;/p&gt;
&lt;p&gt;For all values except &lt;code&gt;NoClientCert&lt;/code&gt;, the policy defines that the server requests a client certificate during the handshake. The values determine whether the client must send certificates and if the server must verify them.&lt;/p&gt;
&lt;p&gt;Use the following options to define the server certificate policy:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;NoClientCert&lt;/code&gt;: The server does not request a client certificate.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RequestClientCert&lt;/code&gt;: The server requests a client certificate, but the client is not required to send it.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RequireClientCert&lt;/code&gt;: The server requests a client to send at least one certificate, but a valid certificate is not required.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;VerifyClientCertIfGiven&lt;/code&gt;: The server does not require the client to send a certificate, but if it does, the certificate must be valid.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RequireAndVerifyClientCert&lt;/code&gt;: The server requires the client to send at least one valid certificate.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the following example, both of the server authorization flags, &lt;code&gt;-server.http-tls-client-auth&lt;/code&gt; and &lt;code&gt;-server.grpc-tls-client-auth&lt;/code&gt;, are shown with the most restrictive option, which is &lt;code&gt;RequiredAndVerifyClientCert&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;    # Path to the TLS Cert for the HTTP Server
    -server.http-tls-cert-path=/path/to/server.crt

    # Path to the TLS Key for the HTTP Server
    -server.http-tls-key-path=/path/to/server.key

    # Type of Client Auth for the HTTP Server
    -server.http-tls-client-auth=&amp;#34;RequireAndVerifyClientCert&amp;#34;

    # Path to the Client CA Cert for the HTTP Server
    -server.http-tls-ca-path=&amp;#34;/path/to/root.crt&amp;#34;

    # Path to the TLS Cert for the gRPC Server
    -server.grpc-tls-cert-path=/path/to/server.crt

    # Path to the TLS Key for the gRPC Server
    -server.grpc-tls-key-path=/path/to/server.key

    # Type of Client Auth for the gRPC Server
    -server.grpc-tls-client-auth=&amp;#34;RequireAndVerifyClientCert&amp;#34;

    # Path to the Client CA Cert for the gRPC Server
    -server.grpc-tls-ca-path=/path/to/root.crt&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;client-flags&#34;&gt;Client flags&lt;/h4&gt;
&lt;p&gt;You can configure TLS private keys, certificates, and certificate authorities in a similar fashion for gRPC clients in Grafana Mimir.&lt;/p&gt;
&lt;p&gt;To enable TLS for a component, use the client configuration flag that contains the suffix &lt;code&gt;*.tls-enabled=true&lt;/code&gt;, for example, &lt;code&gt;-querier.frontend-client.tls-enabled=true&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The following Grafana Mimir components support TLS for inter-communication, which are shown with their corresponding configuration flag prefixes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Query-scheduler gRPC client used to connect to query-frontends: &lt;code&gt;-query-scheduler.grpc-client-config.*&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Querier gRPC client used to connect to store-gateways: &lt;code&gt;-querier.store-gateway-client.*&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Querier gRPC client used to connect to query-frontends and query-schedulers: &lt;code&gt;-querier.frontend-client.*&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Query-frontend gRPC client used to connect to query-schedulers: &lt;code&gt;-query-frontend.grpc-client-config.*&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Ruler gRPC client used to connect to other ruler instances: &lt;code&gt;-ruler.client.*&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Ruler gRPC client used to connect to query-frontend: &lt;code&gt;-ruler.query-frontend.grpc-client-config.*&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Distributor gRPC client used to forward series matching a configured set to a dedicated remote endpoint: &lt;code&gt;-distributor.forwarding.grpc-client.*&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Alertmanager gRPC client used to connect to other Alertmanager instances: &lt;code&gt;-alertmanager.alertmanager-client.*&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;gRPC client used by distributors, queriers, and rulers to connect to ingesters: &lt;code&gt;-ingester.client.*&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;etcd client used by all Mimir components to connect to etcd, which is required only if you&amp;rsquo;re running the hash ring or HA tracker on the etcd backend: &lt;code&gt;-&amp;lt;prefix&amp;gt;.etcd.*&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Memberlist client used by all Mimir components to gossip the hash ring, which is required only if you&amp;rsquo;re running the hash ring on memberlist: &lt;code&gt;-memberlist.&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each of the components listed above support the following TLS configuration options, which are shown with their corresponding flag suffixes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;*.tls-enabled=&amp;lt;boolean&amp;gt;&lt;/code&gt;: Enable TLS in the client.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;*.tls-server-name=&amp;lt;string&amp;gt;&lt;/code&gt;: Override the expected name on the server certificate.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;*.tls-insecure-skip-verify=&amp;lt;boolean&amp;gt;&lt;/code&gt;: Skip validating the server certificate.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;*.tls-cipher-suites=&amp;lt;string&amp;gt;&lt;/code&gt;: Comma-separated list of accepted cipher suites. For the list of supported cipher suites, refer to &lt;a href=&#34;../../../references/configuration-parameters/&#34;&gt;Grafana Mimir configuration parameters&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;*.tls-min-version=&amp;lt;string&amp;gt;&lt;/code&gt;: Minimum TLS version required. For the list of supported versions, refer to &lt;a href=&#34;../../../references/configuration-parameters/&#34;&gt;Grafana Mimir configuration parameters&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following example shows how to configure the gRPC client flags in the querier used to connect to the query-frontend:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;    # Path to the TLS Cert for the gRPC Client
    -querier.frontend-client.tls-cert-path=/path/to/client.crt

    # Path to the TLS Key for the gRPC Client
    -querier.frontend-client.tls-key-path=/path/to/client.key

    # Path to the TLS CA for the gRPC Client
    -querier.frontend-client.tls-ca-path=/path/to/root.crt&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="securing-grafana-mimir-communications-with-tls">Securing Grafana Mimir communications with TLS&lt;/h1>
&lt;p>Grafana Mimir is a distributed system with significant traffic between its components.
To allow for secure communication, Grafana Mimir supports TLS between its
components. This topic describes the process used to set up TLS.&lt;/p></description></item></channel></rss>