Dify Enterprise credential management for plugins

How platform teams centralize model and tool keys for Dify Enterprise plugins, decide which workspaces can use them and rotate keys without touching each app. Written for the teams that own the keys and the people who review the setup.

On this page

Dify Enterprise credential management for plugins: who holds the keys and who can use them

Dify Enterprise credential management for plugins moves ownership of model and tool keys from individual workspaces to the admin dashboard, where administrators hold the credentials, assign them to specific workspaces and can block workspace-managed keys for production plugins. A platform or security lead needs this when several workspaces each add their own model and tool keys, when one model contract is shared across teams, or when apps are promoted from staging to production and the production runtime must not depend on a key a workspace owner can edit. Without central control, every key is a separate secret with its own owner, rotation schedule and billing trail, and reviewing who can use which provider becomes a manual audit of each workspace.

The exact admin screens, assignment options and the name of the setting that blocks workspace-managed credentials must be confirmed in the Enterprise documentation for the version you install. The sources available for this page do not describe those screens in detail, so do not design approvals or runbooks around specific menu paths until your vendor or the version's documentation confirms them. Ask your Dify contact to show the credential list, the workspace assignment view and the production restriction in a test instance before you commit to a model.

Before enabling any restriction, inventory every model and tool credential currently in use, the workspace that added it, the plugins that call it and the environments where those plugins run. Then decide which providers belong to a central contract and which remain team-owned for experiments. Plan the rotation procedure in the same pass, because a key assigned centrally should be rotated once in the admin dashboard rather than in every workspace, and you need to confirm that the rotation reaches running plugins without a restart.

How admin-held credentials reach workspaces and plugins

The diagram starts in the admin dashboard, where model and tool credentials are created once and then assigned to workspaces. A workspace can use an assigned credential, and a separate path lets workspace members supply their own credentials, which production plugins can be blocked from using. The plugin runtime then calls the model or tool provider with whichever credential the environment allows. Confirm the exact names of these settings and the block option against your installed Enterprise version before relying on them.

Admin-held credentials reach plugins through workspace assignment, with a production block on workspace-managed keys.

Credential ownership options and when each fits

This table compares four ways to own model and tool credentials for Dify Enterprise plugins, showing who controls each one, the main risk and the fit. Read each row as a decision: the further a credential sits from the platform team, the more production risk it carries. Confirm exact option names and defaults in the admin dashboard of your installed version before writing policy.

Ownership modelPlatform team controlsWorkspace owner controls and main risk
Admin-held credential assigned to workspacesCreates the credential, sets its scope, assigns it to specific workspaces and rotates the key once for all of themUses the credential inside assigned workspaces only. Risk: a single key outage or leak affects every assigned workspace, so rotation must be planned
Workspace-managed credential in non-productionSets the policy that allows workspace-managed credentials and reviews which providers are in useAdds and rotates its own keys for experiments and development. Risk: keys may be shared informally or reused for real data
Workspace-managed credential blocked for production pluginsBlocks workspace-managed credentials for production plugins so only admin-held credentials reach production runsBuilds and tests in development, then relies on the platform team for production keys. Risk: slower promotion if the handoff is not documented
Mixed model with separate staging and production credentialsMaintains separate admin-held credential sets for staging and production environmentsPromotes app versions with environment-specific credentials. Risk: configuration drift if staging and production keys are not reviewed together
Personal or unmanaged credential (avoid for production)Usually has no central view, rotation or revocation path unless the platform team builds oneHolds the key personally and changes it at will. Risk: departures, unrevoked access and no audit trail, so it rarely fits a regulated setting

Setting up credential management before workspaces go live

This sequence moves model and tool credentials from individual workspaces into admin-held records, limits production plugins to those credentials, and leaves a record of who can see what and who rotates each key. It is meant to run before any workspace serves production traffic.

  1. Confirm Enterprise licensing and workspace access

    The platform owner confirms that the Dify Enterprise license is active and that the admin dashboard shows multiple workspaces, since the Community edition is limited to a single workspace. Check that the admin accounts can open the credential settings and that workspace owners cannot. Keep a screenshot or export of the license status and the admin role list as evidence that the control surface exists before any credential is moved.

  2. Inventory every workspace-held credential

    Ask each workspace owner to list every model provider key and tool credential their apps and plugins use, including the provider, the owning account, the plugin it serves and whether the same key is used in more than one workspace. Compare the list with the apps in each workspace so that no credential is missed. The check is a single inventory sheet where every row maps to one credential and one or more workspaces. Keep this sheet as the baseline for the migration.

  3. Create admin-held credentials for shared use

    An administrator creates each shared model and tool credential in the admin dashboard, using the value issued by the provider and a name that identifies the provider, purpose and environment. Where one key serves several teams, create one admin-held record rather than copies in each workspace. The check is that each new credential appears in the admin list with its owner and purpose filled in. Store the source of the key in your approved secrets system, not in a spreadsheet, and keep the record of who created each entry.

  4. Assign credentials to the workspaces that need them

    For each admin-held credential, the administrator assigns it only to the workspaces listed in the inventory as users of that provider or tool. Workspace owners then confirm that the credential appears in their plugin settings and that unrelated workspaces do not. Record the assignment matrix, with credentials in rows and workspaces in columns, and sign off the matrix with the workspace owners. This matrix is the main evidence for access reviews later.

  5. Block workspace-managed credentials for production plugins

    In the production configuration, turn on the setting that prevents plugins from using credentials that a workspace manages itself, so production plugins can only use admin-held credentials. Confirm the exact setting name and its location in the current Enterprise documentation for your version before changing it, because the admin interface may differ between releases. The check is an attempt to configure a production plugin with a workspace-only credential that is rejected. Save the configuration change and the rejection result as evidence.

  6. Verify a test plugin run in staging and production

    Run the same test plugin in staging and in production, using an admin-held credential in each case. Confirm that the run succeeds, that the call is attributed to the expected credential, and that a workspace-managed credential cannot be substituted in production. Use a test input that does not contain customer data. Keep the run identifiers, timestamps and the outcome of each run as evidence that the block works in both environments.

  7. Record the rotation owner for each credential

    For every admin-held credential, name one accountable owner who can rotate the key at the provider and update the record in Dify, and agree how the owner is notified before the rotation date. Rotation should be done once in the admin dashboard so that every assigned workspace picks up the new value, which means the record and the owner must be kept current. The check is that the register lists an owner for each credential and that the owner has confirmed the rotation steps. Keep the register with the assignment matrix.

What each team must decide about shared credentials

The platform team owns the full lifecycle of every shared credential, from creating it in the admin dashboard to assigning it to workspaces and retiring it. The main decisions are who creates model and tool keys, how each key maps to workspaces, and how often keys change. Settle these before the first production plugin is connected.

  • Key ownership: Decide which team creates model and tool keys, and whether each key maps to one provider account or a shared pool with its own spend controls.
  • Workspace assignment: Decide which workspaces receive each credential, and which production plugins may use only admin-assigned credentials.
  • Rotation calendar: Set one rotation schedule per provider. Ask the vendor whether one rotation action updates every workspace that uses the key, or whether each workspace must be changed separately.
  • Secret key changes: Treat changes to the SECRET_KEY value as a separate event. The environment reference says changing it after deployment logs out all users, so schedule it apart from provider key rotations.

Confirm each answer against your own environment before the first production key is created, because the answers determine how much manual work every rotation requires.

Risks of workspace-held keys and the controls that address them

Model and tool keys become risky when they live inside individual workspaces, where owners can read them, plugins can reuse them and nobody tracks their lifetime. The cards below pair each risk with the control that addresses it and the check that proves the control works in your environment.

Keys copied into shared workspaces

When a provider key is pasted into a workspace, every workspace owner and editor who can open the plugin settings may be able to see or reuse it. The admin ownership control moves each key to a single admin-managed record and assigns it to workspaces by reference. Verify that a workspace owner cannot view the raw secret value, and that removing a workspace assignment does not reveal the key to anyone new.

Production plugins on unapproved keys

A plugin can be switched to a key that the platform team never reviewed, which changes its spend, data region and rate limits without a change record. The production block control prevents workspace-managed credentials from being attached to plugins running in production. Verify this with a test plugin in a production-designated workspace, and confirm that the block also applies to plugins updated later.

Keys that outlive their project

Keys created for a pilot often stay active after the project ends, the owner changes role or the app is retired. Without an inventory, nobody knows which keys still authorize calls to a provider. The inventory control records each credential with its owning team, consuming workspaces, plugins and creation date. Verify that a retired app's key appears as unused, and that the inventory is exported on a schedule you set.

Provider charges on the wrong cost center

Provider contracts usually bill to the account that owns the key, so a key shared across teams sends every team's usage to one cost center. The billing tags control records the business unit and project on each credential, so usage can be split when invoices arrive. Ask the finance lead which tags their provider invoices can carry, and confirm that tags are set on every key before it is assigned.

Rotation that breaks unseen apps

Rotating a key without knowing which apps, plugins and workflows call it causes outages that surface as failed runs, often hours later. The rotation owner control names one person who schedules each rotation and confirms the consuming list from the inventory before the old key is revoked. Verify the procedure with a rotation in a staging environment first, and confirm the old key stops working only after the new assignment is confirmed.

Where Dify stores the secrets behind these credentials

Start by treating SECRET_KEY as the root of trust for everything Dify stores. According to the Dify environment variable reference, SECRET_KEY signs session cookies and JWTs and encrypts OAuth credentials, and changing it after deployment logs out all users. The same reference says workspace encryption keys can be stored locally or in Azure Key Vault. Those two facts define your custody decisions: one instance-level secret protects sessions and OAuth material, and each workspace key protects its own data, with the storage location of that workspace key chosen by you. Record where each key lives, who can read it, and which environment it belongs to before you assign model or tool credentials to any workspace.

The supplied sources do not confirm whether model and tool API keys saved in the admin dashboard or assigned to workspaces use the same encryption path as OAuth credentials, or whether they are protected by a workspace encryption key. Confirm this with Dify before you rely on it. Ask the vendor or check your own installation for the exact encryption path for plugin credentials, what a workspace key change does to existing stored values, and whether a stored credential must be re-entered after a key change. Ask the same questions about SECRET_KEY, since a change to it is documented to log out users and the sources do not state what happens to encrypted credential values in that case.

Plan key custody and backups together. A backup of the database without the matching key material may be unreadable on restore, and a key copy without a recent database backup may not match the credentials you need. Store SECRET_KEY and any workspace key in a controlled secrets store with access logging, keep the record of which key protects which environment, and test a restore in a non-production environment before you rely on the backup. Do not change SECRET_KEY casually: treat it as a planned change with a maintenance window, user communication about the forced logout, and a verified credential re-test afterward.

Questions teams ask before centralizing plugin credentials

Does centralizing Dify plugin credentials require an Enterprise license?

Probably, but confirm it in writing before you plan around it. The Dify pricing page lists the self-hosted Community edition as free and limited to a single workspace, while the self-hosted Enterprise edition is custom priced and adds multiple workspaces, SSO, advanced security, a commercial license and professional support. Assigning one set of model and tool credentials to several workspaces depends on multiple workspaces, so Enterprise is the likely requirement. Ask the vendor which admin dashboard credential features each edition includes, and get the license terms in the same written scope as the implementation work. Review the Dify pricing page for the published edition differences, then ask for a quote that lists the license and the services separately.

What does it cost to centralize plugin credentials?

The cost has three parts: the license, the labor to inventory and migrate credentials, and the ongoing rotation work. The license is custom priced for Enterprise and recurs under the agreement. Migration labor is mostly one-time and grows with the number of workspaces, providers and plugins that depend on each key. Rotation and periodic review recur on your key calendar. Costs go up when credentials are scattered across workspaces, when many production plugins need testing, or when your team must document ownership from scratch. A quote should show each item separately: the inventory, the migration per workspace, the production block configuration, the rotation runbook, test runs, handover training and a retest after changes. Ask who pays for each item and what happens if the scope grows.

How long does moving plugin credentials into the admin dashboard take?

No duration has been published for this work, so the answer depends on your environment. The main drivers are the number of workspaces, the number of model and tool credentials, how many providers are involved, and how many production plugins and workflows read those credentials. Time also depends on whether you have a staging environment to test in, how quickly provider owners can confirm their keys, and how many approvals your change process requires. A small, well-documented estate can move faster than a large one with undocumented keys. Ask the vendor for the steps it would take in your environment and the points where it needs your input. Build your own calendar around the production block and the first rotation, since those are where delays usually appear.

What must our team provide before credential centralization begins?

Four inputs make the project predictable. First, an inventory of every model and tool credential in use, with the provider, the workspace where it is configured and the plugins that use it. Second, a named owner for each provider account who can approve changes and confirm usage limits. Third, a rotation calendar that lists each key, its last rotation date, the next due date and the change window. Fourth, admin access to the Enterprise console and the deployment, including the infrastructure settings that hold SECRET_KEY and related configuration. A list of production plugins and workflows that must not break is also useful, because it becomes your test set. Without these inputs, the vendor or your team spends the first phase finding out what exists, which lengthens the work and raises the risk of breaking live apps.

Can our own team centralize Dify plugin credentials without a partner?

Yes, if your team has Enterprise admin access, people who own each provider account, and time to test before changing production. The steps are administrative: list credentials, create them in the admin dashboard, assign them to workspaces and verify that plugins still run. Two steps carry the most risk. The first is blocking workspace-managed credentials for production plugins, because a workflow that quietly depends on a workspace key can fail once that key is no longer usable there. The second is rotating keys once across the estate, because a wrong order or a missed workspace can stop several apps at the same time. Test both on a non-production copy first. If your team cannot run that test with realistic traffic, a fixed-scope engagement with written deliverables and a retest is an option to price against doing it yourselves.

What happens to running plugins and workflows during key rotation?

Confirm this with the vendor before you schedule a rotation, because the behavior of in-flight runs, cached credentials and plugin processes should not be assumed. Ask whether a rotated key takes effect immediately for new calls, whether runs already in progress keep the old key, whether scheduled or webhook-triggered runs need a restart, and whether the plugin daemon must be restarted after a change. Ask whether the old key can stay valid during an overlap window, and whether your provider supports that. Keep the two kinds of secret separate in your plan: rotating a provider key is different from changing SECRET_KEY, which the Dify environment reference says logs out all users once it changes. Schedule the rotation in a low-traffic window and run a test workflow for each affected plugin immediately afterward.

How do we rotate a model key once across every workspace?

The goal is one change in the admin dashboard that reaches every workspace that depends on the credential, with no per-workspace edits. Confirm with the vendor that a credential updated centrally propagates to all assigned workspaces, and whether any workspace can override it. A safe sequence is: create the new key at the provider, confirm that the old key remains valid for an overlap period if the provider allows it, update the credential in the admin dashboard, run a test call from each affected plugin, and then revoke the old key. Record the change in your rotation calendar with the owner's approval. Keep provider keys out of app exports and documentation, since Dify exports do not carry third-party API keys and you should not add them by hand to shared files.

Do Dify DSL exports carry model and tool API keys to another instance?

No. The Dify docs say app exports as YAML DSL files include the app configuration, workflow nodes, model parameters, prompts and knowledge base connections, but not third-party API keys, knowledge base content or usage logs. This matters for credential planning in two ways. First, an app moved to another workspace or environment will need its credentials assigned again before it runs, so include that step in the promotion checklist. Second, the export is safe to share for review only if you have confirmed what it contains in your own version. Treat the DSL file as configuration, not as a credential store, and make sure no key was pasted into a prompt, variable or node setting, because an export would keep that text. Check a sample export in your own environment before you rely on it.

What to confirm in your Enterprise environment before rotating keys

The supplied sources do not establish how Dify Enterprise handles credentials in the admin dashboard, so these cards list what your team must confirm before changing any key. Each item has an owner and a method to record the answer. Treat the answers as the basis for your rotation runbook.

Admin dashboard path and option names

Confirm the exact menu path, labels and options used to create a model or tool credential at the organization level and assign it to workspaces in your installed release. Labels in the console may differ from those in any guide you read, so record the path as seen in your own console. Ask the vendor for the documentation that matches your version, and screenshot the path in staging so operators follow the same steps.

Enterprise docs

Production blocking by plugin type

Confirm whether the setting that blocks workspace-managed credentials for production plugins applies to every plugin type or only to some, such as model providers versus tool plugins. Test each plugin type in staging with a workspace-managed credential and check whether the production run is refused. Record the plugin types tested, the version, and the observed behavior in your change record.

Assignment audit logging

Confirm whether changes to credential creation, assignment to workspaces and blocking settings are written to an audit trail, and where that trail is viewed or exported. Check whether the record shows the actor, the time, the credential and the target workspace. If assignments are not logged, plan a manual change register before the first rotation.

Rotation propagation to running plugins

Confirm how a changed key reaches plugins that are already running and in-flight workflow runs. Ask whether the new value takes effect immediately, after a plugin daemon restart, or only on the next invocation. Test in staging by starting a long workflow, rotating the key and checking which requests use the old value, then decide the rotation window.

Enterprise admin API coverage for credentials

Confirm whether the Enterprise Admin APIs can create, list, assign, block or rotate plugin credentials, or whether those actions are console-only. If the API covers them, confirm the authentication method and the safeguards required before a script changes production data. Record the endpoint list from the vendor and the version it applies to.

Credential isolation between environments

Confirm whether credentials are kept separate between staging and production environments or shared across them, and whether promoting an app copies credential references or values. Check this in a test promotion, because a shared credential means one rotation affects both environments at once. Record the result alongside your environment naming plan.

How DeployOpen scopes and delivers credential management

DeployOpen plans and implements Dify Enterprise credential management for plugins inside your own infrastructure, so model and tool keys are held centrally, assigned deliberately and kept out of workspace control for production plugins. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.

How we scope

  • Inventory every model and tool credential, its owner, and the workspaces that currently use it before any change is made.
  • Agree in writing which providers stay central, which workspaces receive which credentials, and which plugins must be blocked from workspace-managed keys.
  • Confirm the Enterprise license, admin access and Kubernetes environment that the credential design depends on before work starts.

How we build

  • Configure admin-level model and tool credentials, then assign them to workspaces according to the agreed scope and access model.
  • Enforce the production rule that blocks workspace-managed credentials for production plugins, and test that a workspace owner cannot bypass it.
  • Plan and run one coordinated key rotation, with the sequence, rollback steps and post-rotation checks documented before the change window.

How we hand over

  • Deliver a credential register, assignment map and configuration record that your security and platform teams can review.
  • Document the rotation runbook, including who approves a change, how keys are issued and how a leaked key is revoked.
  • Walk your administrators through the admin dashboard, the production blocking rule and the checks to repeat after future changes.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer, covering credential changes as the Dify version moves forward.
  • Retest the credential boundaries after Dify upgrades, new plugins or changes to workspace permissions, and report the findings in writing.
  • Confirm with your Dify Enterprise vendor any capability that a scope depends on, such as credential features in a given release.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.