title:
Third-party signature verification allows Dify administrators to safely approve the installation of plugins not listed on the Dify Marketplace without completely disabling signature verification. This supports the following scenarios for example:- Dify administrators can add a signature to a plugin sent by the developer once it has been approved.
- Plugin developers can add a signature to their plugin and publish it along with the public key for Dify administrators who cannot disable signature verification.
Generating a Key Pair for Signing and Verification
Generate a new key pair for adding and verifying the plugin’s signature with the following command:- Private Key:
your_key_pair.private.pem - Public Key:
your_key_pair.public.pem
Adding a Signature to the Plugin and Veriyfing It
Add a signature to your plugin by running the following command. Note that you must specify the plugin file to sign and the private key:signed added to its original filename: your_plugin_project.signed.difypkg
You can verify that the plugin has been correctly signed using this command. Here, you need to specify the signed plugin file and the public key:
If you omit the public key argument, verification will use the Dify Marketplace public key. In that case, signature verification will fail for any plugin file not downloaded from the Dify Marketplace.
Enabling Third-Party Signature Verification
Dify administrators can enforce signature verification using pre-approved public keys before installing a plugin.Placing the Public Key
Place the public key corresponding to the private key used for signing in a location that the plugin daemon can access. For example, create apublic_keys directory under docker/volumes/plugin_daemon and copy the public key file there:
Environment Variable Configuration
In theplugin_daemon container, configure the following environment variables:
THIRD_PARTY_SIGNATURE_VERIFICATION_ENABLED- Enables third-party signature verification.
- Set this to
trueto enable the feature.
THIRD_PARTY_SIGNATURE_VERIFICATION_PUBLIC_KEYS- Specifies the path(s) to the public key file(s) used for signature verification.
- You can list multiple public key files separated by commas.
docker-compose.override.yaml) configuring these variables:
Note that
docker/volumes/plugin_daemon is mounted to /app/storage in the plugin_daemon container. Ensure that the path specified in THIRD_PARTY_SIGNATURE_VERIFICATION_PUBLIC_KEYS corresponds to the path inside the container.Edit this page | Report an issue