Plugin signatures
Plugin signature verification, also known as signing, is a security measure to make sure plugins haven’t been tampered with. Upon loading, Grafana checks to see if a plugin is signed or unsigned when inspecting and verifying its digital signature.
Learn more at plugin policies.
How does verification work?
At startup, Grafana verifies the signatures of every plugin in the plugin directory.
To see the result of this verification for each plugin, navigate to Configuration -> Plugins. A signature can have any of the following signature status:
What happens if a plugin is not signed?
If a plugin is unsigned, then Grafana neither loads nor starts it. Grafana also writes an error message to the server log:
WARN[05-26|12:00:00] Some plugin scanning errors were found errors="plugin '<plugin id>' is unsigned, plugin '<plugin id>' has an invalid signature"
How Grafana finds the signing key
To verify a signature, Grafana needs the public key that matches the key ID of the plugin. The signed manifest in MANIFEST.txt stores this key ID in the keyId field. Grafana resolves the key ID against two key sources, in this order:
- Downloaded keys. When dynamic key retrieval is enabled, Grafana reads the key from the
plugin.publickeyskeyspace in its database. Grafana fills that keyspace from the API server, so it only holds the keys that the catalog publishes. - Built-in keys. Grafana falls back to the key set compiled into the binary when the first source has no entry for the key ID. This set contains the Grafana Labs key and any other key that the build includes.
Grafana queries the downloaded keys first, and uses the built-in keys only when the dynamic source fails to return a key. A plugin signed with a key that the catalog doesn’t publish is therefore still verified, as long as that key is part of the build. The reverse applies too: a plugin signed with a catalog key that the build doesn’t include can’t be verified when dynamic retrieval is disabled.
Note
Dynamic key retrieval fails inside an isolated network, because Grafana can’t reach the API server. Grafana writes
Error downloading plugin manifest keysto the server log at startup in that case. Refer topublic_key_retrieval_disabledto stop the download and verify plugin signatures with the built-in keys only.
Plugin signature levels
All plugins are signed under a signature level. The signature level determines how the plugin can be distributed.
Allow unsigned plugins
Note
Unsigned plugins are not supported in Grafana Cloud.
We strongly recommend that you don’t run unsigned plugins in your Grafana instance. However, if you’re aware of the risks and you still want to load an unsigned plugin, refer to Configuration.
If you’ve allowed loading of an unsigned plugin, then Grafana writes a warning message to the server log:
WARN[06-01|16:45:59] Running an unsigned plugin pluginID=<plugin id>
Note
If you’re developing a plugin, then you can enable development mode to allow all unsigned plugins.
Sign a plugin you’ve developed
If you are a plugin developer and want to know how to sign your plugin, refer to Sign a plugin.