Sign a plugin
Before you can sign your plugin, you need to decide whether you want to sign it as a public or a private plugin.
If you want to make your plugin publicly available outside of your organization, you need to sign your plugin under a community or commercial signature level. Public plugins are available from and can be installed by anyone.
For more information on how to install public plugin, refer to Install Grafana plugins.
If you intend to only use the plugin within your organization, you can to sign it under a private .
To verify ownership of your plugin, you need to generate an API key that you’ll use every time you need to sign a new version of your plugin.
.
Make sure that the first part of the plugin ID matches the slug of your Grafana Cloud account.
You can find the plugin ID in the file inside your plugin directory. For example, if your account slug is
acmecorp
, you need to prefix the plugin ID withacmecorp-
.Create a Grafana Cloud API key with the PluginPublisher role.
Sign a public plugin
When your plugin is approved, you’re granted a plugin signature level. Without a plugin signature level, you won’t be able to sign your plugin.
In your plugin directory, sign the plugin with the API key you just created. Grafana Toolkit creates a MANIFEST.txt file in the directory of your plugin.
In your plugin directory, sign the plugin with the API key you just created. Grafana Toolkit creates a MANIFEST.txt file in the
dist
directory of your plugin.The
rootUrls
flag accepts a comma-separated list of URLs to the Grafana instances where you intend to install the plugin.
Plugin signature levels
To sign a plugin, you need to decide the signature level you want to sign it under. The signature level of your plugin determines how you can distribute it.
You can sign your plugin under three different signature levels.
For instructions on how to sign a plugin under the Community and Commercial signature level, refer to Sign a public plugin.
For instructions on how to sign a plugin under the Private signature level, refer to .
For Grafana to verify the digital signature of a plugin, the plugin must include a signed manifest file, MANIFEST.txt. The signed manifest file contains two sections:
- Signed message - The signed message contains plugin metadata and plugin files with their respective checksums (SHA256).
- Digital signature - The digital signature is created by encrypting the signed message using a private key. Grafana has a public key built-in that can be used to verify that the digital signature have been encrypted using expected private key.
Example manifest file:
Troubleshooting issues while signing your plugin
Due to an issue when signing the plugin on Windows, grafana-toolkit generates an invalid MANIFEST.txt. You can fix this by replacing all double backslashes, , with a forward slash, /
in the MANIFEST.txt file. You need to do this every time you sign your plugin.
Error signing manifest: Field is required: rootUrls
If you’re trying to sign a public plugin, this means that your plugin doesn’t have a plugin signature level assigned to it yet. A Grafana team member will assign a signature level to your plugin once it has been reviewed and approved. For more information, refer to Sign a public plugin.
If you’re trying to sign a private plugin, this means that you need to add a rootUrls
flag to the command. The rootUrls
must match the configuration. For more information, refer to Sign a private plugin.
If you still get this error, make sure that the API key was generated by a Grafana Cloud account that matches the first part of the plugin ID.