Protecting production prompts with Langfuse protected labels

Protected labels restrict who can move a production prompt label in self-hosted Langfuse. This page covers what the Enterprise feature does, how to design roles around it and how to review prompt changes that reach customers.

On this page

Why protected labels matter when prompts reach customers

Langfuse protected prompt labels restrict who can move a label such as production, and on a self-hosted instance the feature requires an Enterprise license key. Without it, any user who can edit prompts in a project can usually point the production label at a new version. When a prompt shapes text that customers read, such as support replies, product descriptions or claim summaries, that single action can ship a change that nobody reviewed or tested. Teams need protected labels once more than a small group of engineers depends on the production prompt, once prompt editing is delegated to product, content or support staff, or once a compliance or customer contract expects a documented approval step before a customer-facing change goes live. The MIT open source version does not include this control, so a team that relies on it has to plan for the Enterprise license from the start.

The control is only as good as the role model behind it. Protected labels work together with project-level RBAC roles, which also need the Enterprise license key, so the first decision is which people may edit prompt text, which may create versions, and which may move the production label. Most teams find that editors and label movers are different groups, and that the second group is small. Before you configure anything, confirm with your Langfuse version and license terms exactly which roles and label settings your edition exposes, and test them in a non-production project. Also decide who approves a production move and how that approval is recorded outside Langfuse, because the platform will show who moved a label but not whether the change was reviewed. A short written rule, such as a named approver for each customer-facing prompt, gives auditors and your own staff something concrete to check.

Choosing which labels to protect and how

This table compares three ways to govern prompt labels in self-hosted Langfuse: protecting only production, protecting production and staging, or leaving labels open and relying on review. Read each row to see the risk the option addresses, the process cost it adds, and the kind of team it fits. Protecting production is the usual starting point for prompts that reach customers, and staging protection is worth adding when staging feeds sign-off decisions.

OptionRisk it addressesProcess costWhen it fits
Protect production onlyUnreviewed changes reaching customer-facing trafficNamed approvers for each production move, and a documented path for emergency rollbackPrompts reach customers directly and staging is used mainly by developers for experiments
Protect production and stagingUnreviewed changes to the release candidate that later gets promoted, plus production movesApprovals on two label moves, and a longer path from draft to releaseStaging results are used as evidence for production sign-off or a customer security review
Leave labels open, rely on reviewLittle technical risk in the platform itself; relies on people following the processLowest tooling effort, but review must be enforced outside Langfuse and recorded elsewhereInternal-only prompts with a small team, or early pilots where speed matters more than evidence
Protect production, restrict other roles to readAccidental edits by engineers who only need to fetch promptsRole design work at the project level, which needs a Langfuse Enterprise license keySeveral teams share one Langfuse project and only a few people should publish releases
Confirm before you decideWhether your license tier includes protected labels and how your roles map to themCheck the Langfuse license key documentation and test in a non-production instance firstBefore any policy is written, so the chosen option matches what your deployment enforces

Designing roles that match prompt ownership

Protected labels only help if the people allowed to move a production label are the same people accountable for it. The cards below cover the role decisions to make before you configure anything, and each one maps to project-level RBAC or an Enterprise feature in your self-hosted Langfuse.

Prompt authors

Authors create and edit prompt versions in staging-style labels, usually product engineers, prompt engineers or domain specialists. Give them write access to prompt content without the right to move production labels. Protected labels are the control that stops an author's edit from reaching customers. Check that your role set lets authors create versions and attach development or staging labels while the production label stays locked to approvers.

License key docs

Production label approvers

Approvers are the people allowed to move the production label, so a prompt change reaches customers only after review. Keep this group small and named, and tie it to your change process rather than to seniority. Confirm in your Langfuse version which project roles can move a protected label and whether approvers need any other access to do their job.

Project administrators

Administrators manage project membership, API keys and role assignments, so they can indirectly change who controls production. Limit this role to a few platform owners and separate it from the approver group where possible. Ask whether an administrator can grant themselves label permissions, and document who reviews those grants.

Service accounts for CI

Pipelines that sync prompts or promote labels need credentials of their own, not a shared personal API key. Create a dedicated project API key per pipeline, scope it to the minimum prompt permissions it needs, and rotate it on a schedule. Confirm whether your version lets a CI key move protected labels at all, since an automated promotion path can bypass human review.

Staging and production separation

Use separate Langfuse projects, or at minimum distinct label rules, so staging experiments never touch the production prompt the application fetches. Keep production credentials out of developer environments and staging keys out of production services. Verify that the application's production SDK key can read the production label but cannot write to it.

Audit trail for role changes

Every change to roles and protected label rules should be traceable to a person and a date, or the approval model is hard to defend in a review. Audit logs are an Enterprise feature in self-hosted Langfuse, so confirm that they are enabled and retained in your environment. Test the trail by making a role change in a non-production project and checking that it is recorded.

Setting up protected labels on a self-hosted instance

This sequence takes a self-hosted Langfuse instance from open access to a state where only named roles can move production prompt labels. Each step ends with a check, so the restriction is proven before any customer-facing prompt depends on it. Run the sequence in a non-production project first.

  1. Confirm the Enterprise license key and scope

    Confirm that your instance runs with a valid Enterprise license key, set through the deployment configuration your team already manages. Protected prompt labels depend on this key, along with project-level RBAC roles and audit logs, so check the license key documentation for the full list of features it enables. Confirm with your vendor which features your key covers before you design the controls around them. Done when the features you need show as enabled in the instance and the team has a named owner for license renewal.

  2. Configure project-level roles

    Create or review project-level roles so that prompt authors, reviewers and production label approvers are separate groups. Map each role to named people and keep the set small enough that every grant can be explained during an access review. Check in your own instance which permissions each role carries, because role capabilities depend on the Langfuse version you run. Done when each team member appears only in the roles their work requires and you hold a written list of role-to-person assignments.

  3. Define which labels are protected

    Decide which labels carry customer impact, typically production, and mark them as protected in the project's prompt settings. Leave development and staging labels open so engineers can iterate without waiting on approvers. Record each label name exactly as your application code requests it, because the SDK fetches prompts by label and a mismatch can serve the wrong version to users. Done when the protected list matches the labels your applications request and a reviewer has signed off on it.

  4. Assign approvers for protected labels

    Name the people or roles allowed to move a protected label to a new prompt version, and keep that group separate from the authors who write prompts. Document what each approver checks before approving, such as evaluation results or a comparison with the version currently live. Confirm in your instance how permission to set protected labels is granted, since the mechanism depends on the roles you configured in the previous step. Done when the approver list is documented and each approver has confirmed they can perform the approval in the project.

  5. Test that a non-privileged user is blocked

    Sign in as a user who holds only author or viewer permissions and attempt to move a protected label to a different prompt version. If your team also changes labels through the API, run the same attempt with the credentials that process uses. The attempt should fail with a permission error and the production label should stay on its current version. Repeat the move with an approver to confirm the intended path still works. Done when both tests give the expected results and you have recorded the test accounts and dates.

  6. Verify the changes in the audit log

    Open the audit log and locate the blocked attempts and the approved label move. Check that each entry identifies the user, the action, the project and the prompt version involved. Compare the entries against your test record so that every blocked attempt and every approved change is accounted for. Confirm with your security team that the log is exported or retained under your own policy, since retention depends on how your instance is configured. Done when the log matches the test record and the team has agreed on that match.

How a prompt change moves from draft to production

A prompt change starts as a new version written by an author in Langfuse. A reviewer checks it against a dataset or experiment before anyone touches the protected production label. Only a role with permission to move that label can do so, and the application then fetches whichever version the label points to. Every label move should appear in the audit log, which is where a reviewer confirms who changed production and when.

Only the authorized role crosses into the protected production label.

Change review models for prompts that reach customers

A small team usually has a handful of prompt authors and one person who signs off on anything that reaches production. The aim is a short, repeatable path: a change is drafted as a new prompt version, tested against a few known inputs, approved by the named approver, and then moved onto the production label. Protected labels fit here because they stop anyone else from moving the production label, so the approver is the only route to release.

  • Draft as a new version: Authors create a new version and attach a change note describing the intent and the expected behavior difference.
  • Test before approval: Run the version in the playground or against a saved dataset and store the outputs with the version.
  • Single approval: The approver reviews the diff, the test results and any open questions, then moves the production label.
  • Evidence produced: The version history, the label change record and the approver's note in your ticket system form the trail.
  • Rollback path: Name who may move the label back to the previous version and where that decision is recorded.

Check that the approver is not also the only person who can edit prompts, since a single person who can both author and approve has no independent review.

Security and audit considerations for production label control

Protected labels only hold if the paths around them hold too. The cards below cover the audit trail, the non-UI access paths, SSO enforcement, rollback and the security of the Langfuse instance itself, which together decide whether a production prompt change is controlled end to end.

Audit logs for label moves

Confirm that every move of a production label is recorded in the audit log with the actor, the time and the prompt version affected. Audit logs are an Enterprise license feature, so check that the license key covers them before you rely on them for review. Test the trail by moving a label in staging and reading back the entry. Export or forward the log to the system your security team reviews, and confirm how long it is retained.

License key docs

Service accounts and API keys

Protected labels govern the UI, but a project API key or automation account can still call the prompt API. Inventory every key that has write access to the project, decide which ones may change production labels, and document an owner for each. Verify with your own tests whether the API enforces the same protection as the UI for your Langfuse version, because this is the most common gap between policy and practice.

SSO enforcement for reviewers

Role checks are only as strong as the identity behind them. Self-hosted Langfuse supports Auth.js providers such as Okta, Entra ID, Keycloak and generic OIDC, and can disable password sign-in or enforce SSO for given email domains. Use these settings so that people who can approve production label moves sign in through your identity provider, with its MFA and offboarding. Confirm the setting names and behavior in the docs for your version.

SSO docs

Rollback by moving a label

Rollback in Langfuse means moving the production label back to an earlier prompt version, not editing the prompt in place. Plan the rollback as a controlled action with the same reviewers as a forward move, and rehearse it. Confirm that applications fetching the production label pick up the change within the caching behavior you have configured, because a cached client may keep serving the bad version for a period you need to measure.

Securing the Langfuse instance

Protected labels are only one control inside a platform that holds prompts, traces and credentials. Restrict network access to Langfuse Web, keep PostgreSQL, ClickHouse, Redis or Valkey and blob storage off public networks, and manage secrets and the license key with your standard secrets tooling. Review who holds administrative access to the instance and the database, since those roles can bypass application controls entirely.

Change review evidence

A reviewer approval only helps an audit if the record ties the approval to the exact prompt version that went live. Keep a change ticket that links the version ID, the label move, the evaluation results and the approver, and confirm that your process, not the tool alone, enforces this link. DeployOpen can help design this evidence trail, but independent auditors decide whether it meets your assessment criteria.

Questions teams ask before protecting production prompts

Does the Enterprise license cover protected prompt labels, and what does it cost?

Protected prompt labels are one of the features that need an Enterprise license key on a self-hosted Langfuse instance. The MIT-licensed open source version includes the core tracing, prompt management and evaluation features without limits, so the license is the only way to restrict who can move a production label. Langfuse does not publish a fixed price for the Self-Hosted Enterprise plan. It is custom-priced and adds a named support engineer, solutions architect access and a support SLA. Ask Langfuse for a written quote that lists the license scope, support terms and renewal conditions, and confirm which other Enterprise features your team needs, such as project-level RBAC or audit logs, since they are sold under the same key.

How long does it take to set up protected labels, and what drives the effort?

The configuration itself is small: once the license key is active, the work is designing roles, mapping people to projects and agreeing which labels are protected. The larger effort sits around it. Effort rises with the number of Langfuse projects, the number of teams that publish prompts, whether roles must follow an identity provider group structure, and how much review evidence the change process must produce. If the instance is not yet running, deployment and SSO work will usually take longer than the labels. Ask any partner for a fixed-scope plan that separates license activation, role design, rollout to teams and testing, so each phase has a clear finish.

What does our team need to provide before the work starts?

Plan to provide a short list of decisions and access, not a large dataset. You need the names of the Langfuse projects that hold production prompts, a list of teams that edit prompts and the people who should approve production moves, and the identity provider groups that map to those teams. You also need administrative access to the self-hosted instance, the Enterprise license key, and a staging environment where role changes can be tested first. Finally, name a decision owner who can accept the role model, since most delays come from unresolved disagreement about who may publish to production.

Can our own team configure protected labels without a partner?

Yes, if your team already operates the self-hosted instance and has an Enterprise license. Protected labels are a configuration of roles and label rules in Langfuse, so an experienced platform or security engineer can apply them once the design is written down. Partner help is most useful for the design work: deciding which labels count as production, separating duties between authors and approvers, and testing that the restriction works for every access path, including the API and SDK. Confirm the exact steps against the current Langfuse documentation for your version before you change a production instance.

How do protected labels work with review and rollback?

Protected labels control who can move a label such as production, so they enforce the approval step rather than replace it. A reviewer approves a prompt version outside Langfuse, through your change process, and then an authorized person moves the production label to that version. Rollback works the same way: moving the label back to a previous version is a production change, so it should follow the same permission path and be recorded. Keep the review record in your ticketing or source control system, because Langfuse stores the version history but your auditors will want to see who approved each move and why.

Do protected labels stop every change to production prompts?

No. Protected labels limit who can apply a protected label through the Langfuse interface and its APIs, but they do not stop an authorized user from making a poor decision, and they do not check prompt content for safety. Your test suite, evaluations and human review still do that work. Also check that the restriction covers every path your team uses, including automation with service credentials, because a broad API key can bypass a role model built only for the web interface. Test these paths on a staging instance before you rely on the control in production.

What should we check on our self-hosted instance before enabling protected labels?

Check the Langfuse version and upgrade status first, because the Enterprise features and their settings depend on the release you run. Confirm that the license key is set correctly and that the instance uses SSO so that role assignments follow your identity provider. Review existing API keys and service accounts, since they often hold more access than the people who use them. Finally, make sure your backups and restore tests cover the Langfuse database, since role and label changes should be recoverable if a misconfiguration locks out a team.

How DeployOpen works on this

DeployOpen treats protected labels as one part of a wider prompt release process inside your self-hosted Langfuse. We agree the role model, label rules and review path in writing, then build and document them in your infrastructure so your security and compliance teams can review the result.

How we scope

  • Inventory which prompts reach customers and which labels they are served under today
  • Map each Langfuse project role and who holds it, and where Enterprise license features are required
  • Agree the written scope, deliverables and timeline for protected labels before any work starts
  • Confirm the Enterprise license key arrangement with your team before configuration begins

How we build

  • Configure protected production labels and project-level RBAC roles in your self-hosted instance
  • Test that restricted accounts cannot move production labels, while reviewers can still promote versions
  • Wire the change review path to your ticketing, approval and webhook tooling where you use them
  • Run negative tests with non-privileged accounts, API keys and SDK clients to confirm enforcement

How we hand over

  • Deliver a written role matrix, label policy and change review runbook for your teams
  • Document the test cases used, their results and how to repeat them after an upgrade
  • Walk through rollback by label movement with the people who will run production releases
  • Provide evidence packs your auditors can review, without claiming any certification on your behalf

How we support

  • Review role and label settings again after Langfuse upgrades, team changes or new projects
  • Offer ongoing support, upgrades and continuous testing as a retainer, priced from the written scope
  • Retest protected label controls when your prompt release process or identity provider changes
  • Confirm support tier and service levels directly, since these depend on your Langfuse plan

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.