Root_url not a valid rootUrl for signing a plugin

I am trying to sign my private plugin, but it always says “Invalid signature” in grafana. I think the problem is, that I configured a root_url in the grafana config like root_url = %(protocol)s://%(domain)s/grafana/ and when I try to sign my plugin with npx @grafana/toolkit plugin:sign --signatureType private --rootUrls %(protocol)s://%(domain)s/grafana/ the command fails with Error: Error signing manifest: Value must be a URL: rootUrls[0]

What can I do to validate my signature?

I refer to the documenation Sign a private plugin where it says

The rootUrls flag accepts a comma-separated list of URLs for which the plugin can be used. The URLs need to match the root_url setting.

As the error says, the rootUrl for signing needs to be a valid URL. It seems that the signing docs don’t take into account that the rootUrls can contain %(domain). I think you need to enter the expanded root URL to the signing command.

But I placed in the variable %(protocol)s://%(domain)s, because I don’t know the target root url :confused: Or it may change.

So, with other words: I have to sign my private plugin to a specific range of root urls?

You are correct, the private plugin signature is signed for the Grafana instances you intend to run the plugin on.

Ok, thank you for your reply.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.