Designing Hyperledger Fabric endorsement policies

Endorsement policies decide which member organizations must sign a transaction before it commits. This page explains how to design them at chaincode, collection and key level and how to weigh availability against trust.

On this page

Designing Hyperledger Fabric endorsement policies for a consortium

In a Fabric consortium, an endorsement policy decides which member organizations must sign a transaction before the network will commit it. Each organization's peers simulate the chaincode call and return a signed result, and the client application collects enough of those signatures to satisfy the policy. A consortium that has not agreed on that rule is agreeing on nothing that matters for trust, because the policy sets how many organizations must cooperate for any business update to be valid. Fabric lets you set the policy in three places: at the chaincode level, at the level of a private data collection, and on individual keys through state-based (key-level) endorsement, which can override the other two for that key. The Fabric endorsement policy docs describe how these layers relate, and the Fabric security model docs explain that policies also govern channel policies, channel modification, access control lists, chaincode lifecycle approvals and endorsement, so the same policy thinking runs through the whole network.

A team should design the endorsement policy deliberately rather than accept a default whenever the consortium has members with unequal trust, a member can be offline for planned maintenance, or a subset of organizations must be able to act without others. A policy that requires every organization to endorse maximizes trust but stops all business when one peer is down. A policy that requires only one organization lets that organization act alone. Between these lies a threshold or a set of alternatives that matches the governance you agreed on. Before you finalize it, confirm with your Fabric version and chaincode language which policy syntax and key-level endorsement features you will use, and test the rule against a scenario where each member goes offline, since the outcome determines whether transactions can still be endorsed. Record the decision in your governance documents so that later changes to members or the lifecycle go through the same approval.

How chaincode, collection and key-level policies differ

Fabric lets you attach endorsement rules at three scopes, and they overlap in a specific way. The chaincode policy is the baseline, a collection policy governs private data, and a state-based policy can override either for an individual key. Read them as layers, then decide which organizations must agree at each layer before you write any policy.

Chaincode-level endorsement policy

This is the default rule for a chaincode definition on a channel. It names which organizations or roles must endorse a transaction that touches the chaincode's public state. Every transaction that is not overridden by a more specific rule falls back to it, so it sets the baseline trust model for the whole channel. Before approving the definition, confirm which member organizations must sign off on every write and whether any single organization can block the network by being offline.

Endorsement policy docs

Collection-level endorsement policy

A private data collection can carry its own endorsement policy, which applies to writes to private data within that collection. It is typically used when only a subset of channel members hold the sensitive data, so the organizations that store it are also the ones that should approve changes to it. Check that the collection's member organizations and its endorsement policy match, because a collection policy that is looser or stricter than the business arrangement is a common source of disputes.

State-based (key-level) endorsement policy

A state-based policy is set on an individual key and overrides the chaincode or collection policy for writes to that key. It suits assets with a named owner or a change of control, such as a shipment or a loan record, where specific organizations must approve changes to that one record. Each key-level policy adds endorsement work and must be maintained as ownership changes, so limit them to keys that truly need them and document who can change them.

Precedence across the three scopes

When a key has a state-based policy, that policy takes precedence over the collection or chaincode policy for writes to that key. Writes to keys without one fall back to the collection policy for private data or the chaincode policy for public state. Test this ordering with a transaction that writes a keyed record and an unkeyed one in the same chaincode, to confirm the endorsement set differs as your design intends.

Availability trade-offs in a consortium

Requiring more organizations to endorse raises assurance but also makes each of them a possible point of failure for transaction throughput. An overly strict policy can stop a channel when one member is offline or slow to respond. Ask each organization to state its uptime expectations and agree on a fallback procedure, such as a documented change to the policy, before go-live.

Policy changes on live channels

Endorsement policies are part of the chaincode definition and channel configuration, so changing them is a governance action, not a code change. Changes to a chaincode definition go through the lifecycle approval process, and the policy you approve must be the one clients and peers actually enforce. Confirm the approval threshold, the record of who approved each change, and how the policy is rolled out across peers.

Decision path for choosing an endorsement policy scope

The path starts with the transaction's key-level question: does any key need a signer set that differs from its chaincode? If so, a state-based endorsement policy on that key overrides the chaincode policy for writes to it. If not, the next question is whether the data belongs to a subset of organizations, in which case a collection-level policy applies. Anything left falls back to the chaincode-level policy. Check each branch against the written membership of the consortium before deploying.

Order of checks from key-level override to chaincode-level fallback.

Endorsement policy options and when each fits

This table compares chaincode-level, collection-level and state-based endorsement policies by scope, who must endorse, typical use and the availability and trust trade-off. Read each row against the policy scope it governs, then check the detail flagged for your Fabric version before fixing a design.

Policy optionScope and who must endorseTypical use in a consortiumAvailability and trust trade-off
Chaincode-level policyApplies to every key a chaincode writes on the channel. Set when the chaincode is defined and must be satisfied by the organizations named in the policy.A default rule for shared business logic where all transactions need the same set of approvers.Strictest and simplest to reason about, but every transaction depends on the named organizations being online to endorse.
Collection-level policyApplies to writes to a private data collection. Only member organizations of the collection hold the data, and the policy names which of them must endorse.Sensitive data shared among a subset of members, where non-members should not see the payload.Narrows who holds the data and who must agree, which can reduce the endorsers needed. Confirm the collection endorsement policy behavior in your Fabric version.
State-based (key-level) policyOverrides the chaincode or collection policy for an individual key. Endorsement is checked against the policy stored with that key.Assets whose changes need approval from a specific owner or counterparty, such as a transfer that a named party must sign off.Adds trust control per asset, but more policies to manage and test. Confirm how the key-level policy is set and updated for your chaincode API.
Policy precedenceWhen a key has a state-based policy, it takes precedence over the chaincode or collection policy for that key.Layering a broad default with narrow exceptions for specific records.Strong control per record, but a missed key-level update can leave a key with weaker or stale endorsement than intended.
Effect on availabilityEach added required endorser is one more organization whose peers must respond during every transaction.Consortia with many members often pick a majority-style rule over unanimity to keep transactions flowing.Higher trust requirements lower availability. Test endorsement with one organization offline before go-live.
Policy syntax and lifecyclePolicies are expressed as rules over organization identities. Confirm the exact syntax and the approval path for the chaincode definition in your Fabric version.Changes to chaincode-level policies go through the chaincode lifecycle and channel approvals.Changes take coordination across organizations, so plan them like other channel administration work.
Related policy typesChannel, channel modification, ACL and lifecycle policies also use the same policy mechanism. Review the security model docs before changing them.Keeping endorsement rules consistent with who can change the channel and approve definitions.A permissive channel or lifecycle policy can undermine a strict endorsement policy.

Balancing availability against trust in a consortium

The central trade-off in an endorsement policy is simple to state. Requiring more endorsing organizations for a transaction increases trust and auditability, because more members must independently simulate and sign the result before it reaches ordering. The cost is availability: every additional required endorser is another organization whose peers must be online, reachable and responsive for a transaction to succeed. Requiring fewer endorsers keeps transactions flowing during outages, but it weakens the guarantee that no small group of members can alter state on its own. Before you set a policy, write down which members must be able to block a transaction and which must be able to block it only through their absence.

The right balance depends on four factors you can inspect. Member count matters because the more organizations a policy names, the more likely one of them is in maintenance at any moment. Maintenance windows matter because a policy that requires a specific organization will stall whenever that organization patches its peers, so confirm each member's window and whether they agree to coordinate it. Peer discovery matters because clients only reach endorsers that the discovery service returns, which depends on gossip settings and anchor peers being correct on every channel. Legal agreements matter because the consortium charter may require certain organizations to approve specific transactions, and that obligation should be expressed in the policy rather than left to operational habit.

Treat endorsement availability as a property you test, not one you assume. Confirm that discovery returns enough endorsing peers from each required organization during a planned peer restart, and rehearse what the client application does when an endorser times out. Ask your consortium counsel which organizations the agreement actually requires to approve, and record that list as the basis for the policy. Then review the policy whenever membership or maintenance practices change, because a policy that was balanced for five members can become fragile when the set of required endorsers grows.

How to set up endorsement policies on a live channel

This sequence moves an endorsement policy from a governance decision to a tested, approved state on a running channel, so each member organization can confirm what it must sign and that endorsement fails when it should. The output is an approved chaincode definition, any collection and key-level policies in place, and recorded test results for each member peer.

  1. Agree the signer set with governance

    The consortium governance body decides which member organizations must endorse for each chaincode, how many of them must sign, and which organizations may be unavailable without blocking transactions. Legal, risk and operations representatives should sign off the list in writing, because every later policy is built from it. Done means a written signer set exists for each chaincode and each member has confirmed its peer is the one that will endorse. Confirm the exact policy syntax and role names against your Fabric version before writing anything into a definition.

  2. Define the chaincode endorsement policy

    Express the agreed signer set as the chaincode-level endorsement policy and include it in the chaincode definition that each required organization approves. Approval happens per organization, so every member should check that the policy in its approval matches the signed-off list before committing. Done means the channel reports the same approved definition for every organization, which you can confirm by querying the committed chaincode definition on a peer from each member. Keep the policy text with the approval record so auditors can trace it to the governance decision.

  3. Add collection policies for private data

    If the chaincode uses private data collections, set a collection-level endorsement policy for each collection that restricts endorsement to the organizations that hold the data. Confirm that the collection policy is a subset that the governance group accepts, and that the collection configuration is approved alongside the chaincode definition. Done means a test transaction that writes private data succeeds when endorsed by a permitted organization and fails when endorsed by an organization outside the collection. Record both results, since they are the evidence that the boundary holds.

  4. Add state-based policies for specific keys

    Where a particular key needs a stricter or different signer set than the chaincode default, set a state-based (key-level) endorsement policy on that key from the chaincode logic. Limit this to a small, documented list of keys, because each key-level policy adds a rule that operators must track. Done means a transaction updating the protected key succeeds only with the required organizations' endorsements, and an update to an unprotected key still follows the chaincode policy. Confirm the key list and its owners are recorded in the governance register.

  5. Test endorsement with each member peer offline

    Take one member peer offline at a time and submit a test transaction that the policy should still accept, then repeat for each member that is needed to meet the threshold. Bring that peer back and confirm it catches up before moving to the next member. Done means every member has a recorded result showing whether the policy tolerates its absence, matching the governance decision made in the first step. If a transaction fails when the policy should tolerate the outage, correct the signer set or threshold through a new definition approval rather than changing the running peer.

  6. Run success and failure test transactions

    With all peers online, submit one transaction endorsed by a set that satisfies the policy and confirm it commits as valid, then submit one endorsed by a set that does not satisfy it and confirm the peer rejects it at endorsement or validation. Run the same pair for each collection and each protected key. Done means a signed record lists each test, its endorsing organizations, the expected result and the actual result. Keep the test scripts under version control so the same checks run after future policy changes.

  7. Record the live policy and schedule review

    Store the final approved definition, collection policies, key-level policy list and test records in the channel's governance register, and name an owner for each. Set a review point whenever membership changes, because adding or removing an organization usually requires a new approval and a fresh round of tests. Done means the register matches the committed definitions on each peer, and each member can point to the approval that authorized its current endorsement role. Ask your support provider how they will re-run these tests after changes to chaincode or membership.

Endorsement policy patterns by consortium situation

When a consortium has a handful of members who all need to see and agree to every transaction, requiring every member to endorse is the simplest policy to reason about. The endorsement policy names each organization, and a transaction is valid only when all of them have simulated and signed it. Trust is maximized because no single member can have a transaction accepted without the others' peers executing it. The cost is availability: one offline peer or one unreachable organization can block every transaction on the channel.

  • Policy shape: an AND expression listing every member organization, such as one signature per org in the channel.
  • Main risk: a single member's outage or maintenance window stops all writes on the channel.
  • Mitigation to test: run at least two peers per organization and confirm that clients discover alternates through service discovery.
  • Growth trap: adding a member later means updating the chaincode definition and every policy that referenced the old list.
  • Operational check: rehearse what happens when one organization leaves for a planned outage and confirm the business accepts that pause.

Before committing, ask each member whether it is willing to be a hard dependency for every transaction, because that answer decides whether this shape is acceptable.

Security and operational risks of endorsement policy design

Endorsement policies sit where availability, trust and governance meet. The cards below cover the failure modes that show up most often in consortium networks, and the checks that keep a policy doing what the member organizations agreed to.

Overly strict policies stop trade

A policy that requires endorsements from many organizations, or from specific ones, means a single member outage can halt every transaction it covers. Before go-live, map each policy to the peers that must be online for it to be satisfied, and test what happens when one of those organizations is unavailable for a planned maintenance window. Confirm the fallback process your members agreed to, such as a documented emergency change to the policy, rather than relying on ad hoc workarounds.

Endorsement policy docs

Overly loose policies weaken trust

A policy that accepts endorsement from a single organization, or from a small group, lets that group validate transactions that other members depend on. The weakness is that the ledger still looks valid to every peer even when the endorsing set was narrower than the consortium intended. Review each policy against the trust model agreed in governance documents, and record which organizations can alone satisfy it.

Policy drift after membership changes

When an organization joins, leaves or changes its MSP, existing endorsement policies may still reference names or counts that no longer match the consortium. Each channel membership change should trigger a review of every chaincode and collection policy on that channel. Check that the policy still reflects the intended quorum and that removed organizations no longer count toward any requirement.

State-based policies are hard to audit

Key-level policies override chaincode and collection rules for individual keys, so the effective policy for a given asset can differ from the one shown in the chaincode definition. Auditors then need to trace which keys carry a state-based policy, who set it, and when. Require a documented inventory of state-based policy use, and have chaincode logic log or expose the policy applied to each sensitive key.

Endorsement policy docs

Links to Fabric security model policies

Endorsement policies are one of several policies in Fabric, alongside channel policies, channel modification policies, ACLs and chaincode lifecycle policies. Changing a channel modification policy can let an organization alter endorsement rules without meeting the quorum the endorsement policy implies, so the two must be reviewed together. Map which organizations can change each policy type before approving any new endorsement design.

Security model docs

Reviewed and documented policy changes

Every endorsement policy change needs a written record: the business reason, the approving organizations, the chaincode definition sequence it applies to, and the test results from a non-production channel. Keep the approved policy text alongside the channel configuration history so an auditor can reconstruct what applied at any block height. Confirm with your governance group who holds approval authority and how emergency changes are reviewed after the fact.

Questions buyers ask about endorsement policy design

How much effort does endorsement policy design take, and what drives it up?

Effort depends mainly on how many organizations must be modeled, how much data is kept in private data collections, how many key-level exceptions the business needs, and how many approvals the change requires. Each member organization adds identities, peers and test cases to validate. Private data collections add endorsement rules that must match collection membership, so the policy and the data boundary have to be designed together. Key-level (state-based) policies add a second layer of logic that someone must document and test. Governance approvals add calendar time more than engineering time, because each member must agree the policy before it is deployed. Ask any partner to break its estimate down by these four drivers.

Can our own team design endorsement policies without a partner?

Yes, if your team already runs Fabric channels and understands chaincode lifecycle, MSPs and the security model. Fabric supports chaincode-level and collection-level endorsement policies, and state-based endorsement policies on individual keys can override them, so the design space is well documented in the Fabric docs. The harder part is consortium agreement: deciding which organizations must endorse, how availability is traded against trust, and how exceptions are governed. A partner can help structure that decision and test the result, but the policy must be owned by the member organizations. Teams without prior Fabric operations experience usually benefit from an outside review before the first channel goes live.

What do member organizations need to provide for the work?

Each member organization needs to name a decision owner who can approve endorsement rules for its side of the consortium. The network team needs the current channel configuration, the list of chaincode definitions and their current endorsement policies, the private data collection definitions, and the MSP identities that will sign transactions. Business owners need to describe which transactions carry risk and which organizations must be present for each. Teams should also provide a test environment that mirrors the production channel, so policy changes can be exercised before approval. Missing any of these items usually turns into rework during the approval stage.

How long do endorsement policy changes take to approve?

Approval time depends on the governance model agreed by the consortium and on how many members must sign off. The duration is set by your channel's modification policies and by how quickly each organization can review a proposed change. Technical deployment is usually a smaller part of the schedule than agreement. Ask for a timeline that separates drafting, member review, test deployment, approval and production rollout, and confirm each stage with the members who hold approval rights. Any figure a partner quotes should be tied to a written scope and to your own governance calendar.

What should we ask a partner to include in a written scope?

A written scope should state which channels, chaincode definitions, collections and key-level rules are covered, and which are excluded. Ask the partner to list the deliverables, such as a policy design document, a test plan, updated chaincode definitions and a rollback procedure. Confirm who performs each approval step, who signs the policy change, and which member organizations must take part. Also ask how the partner will verify the deployed policy against the agreed design, and what happens if the consortium changes its mind mid-engagement. Fixed-scope engagements agree these items in writing before work starts, and DeployOpen follows that model. A quote follows from the written scope.

Does the endorsement policy affect how we handle version upgrades?

Yes. Chaincode endorsement policies are part of the chaincode definition, so changing them is an administrative change on the live channel that must be approved by the required organizations. Upgrading Fabric itself follows a separate sequence of steps, described in the Fabric upgrade docs, which includes backing up the ledger and MSPs, upgrading orderers and peers in a rolling fashion, and then updating channel capability levels. Plan endorsement policy changes so they do not coincide with binary upgrades, and test both together in a staging environment that matches production.

What is the risk of setting endorsement policies too strictly or too loosely?

A policy that requires too many endorsers can stop transactions whenever one member's peer is down, which hurts availability. A policy that requires too few lets a small group of organizations approve transactions that others must trust, which weakens consortium protection. Overly broad key-level exceptions can also make the policy hard to audit. Most risk comes from policies that nobody has tested under failure conditions, so test with peers offline before go-live. Document the reason for each rule so auditors and new members can follow the trust model.

Do endorsement policies help with compliance evidence?

Endorsement policies can support compliance work because they record which organizations must approve a class of transaction, and the channel configuration shows who holds approval rights. Auditors usually want to see the agreed design, the approval trail for each change, and test results showing the policy behaves as written. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Independent auditors and certification bodies perform those assessments, so confirm the evidence format your auditor expects before design begins.

How DeployOpen scopes endorsement policy work

Endorsement policy work starts with a written scope agreed before any policy is written. The scope names the channels in play, the chaincode definitions that need policies, the collections that carry their own endorsement rules, and the keys that may need state-based overrides. It also records who signs off on each policy, because in a consortium the people who approve a policy change are often different from the people who operate the peers. DeployOpen issues a fixed-scope proposal from that agreed list so the consortium knows what is covered before any engineering time is committed. Ask for a quote that itemizes these items, not a single lump sum.

Before any policy is drafted, DeployOpen reviews the consortium's signer requirements and the current channel layout. This review compares the organizations that must sign against the organizations that actually run endorsing peers, checks which MSPs and roles the policy expressions reference, and confirms that channel policies and ACLs point at the same identities. Teams should confirm with their own governance group which organizations hold a veto on a given chaincode and whether that veto should be expressed as a hard requirement or as one option among several. Those answers shape the policy more than any Fabric syntax does.

Once a draft policy exists, DeployOpen tests endorsement under member outages. The test plan simulates each endorsing organization going offline, one at a time and in combinations the policy allows, and records whether transactions still gather enough endorsements and whether client applications find the remaining peers through service discovery. The results go into documentation for governance and audit teams: the policy text, the reasoning behind each signer, the outage results, and the change process for future edits. Teams should confirm that their auditors accept this evidence format before the work starts, since assessment expectations vary by organization and sector.

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.