{"record":{"id":"36cf3fef96e1ddda","repo":"hyperledger/fabric","slug":"unmapped-channelless-policy-for-s","errorCode":null,"errorMessage":"Unmapped channelless policy for %s","messagePattern":"Unmapped channelless policy for (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/aclmgmt/defaultaclprovider.go","lineNumber":163,"sourceCode":"\t\t\treturn err\n\t\t}\n\t\treturn d.policyChecker.CheckPolicyBySignedData(channelID, policy, sd)\n\tcase *protoutil.SignedData:\n\t\treturn d.policyChecker.CheckPolicyBySignedData(channelID, policy, []*protoutil.SignedData{typedData})\n\tcase []*protoutil.SignedData:\n\t\treturn d.policyChecker.CheckPolicyBySignedData(channelID, policy, typedData)\n\tdefault:\n\t\taclLogger.Errorf(\"Unmapped id on checkACL %s\", resName)\n\t\treturn fmt.Errorf(\"Unknown id on checkACL %s\", resName)\n\t}\n}\n\n// CheckACLNoChannel provides default behavior by mapping channelless resources to their ACL.\nfunc (d *defaultACLProviderImpl) CheckACLNoChannel(resName string, idinfo any) error {\n\tpolicy := d.pResourcePolicyMap[resName]\n\tif policy == \"\" {\n\t\taclLogger.Errorf(\"Unmapped channelless policy for %s\", resName)\n\t\treturn fmt.Errorf(\"Unmapped channelless policy for %s\", resName)\n\t}\n\n\tswitch typedData := idinfo.(type) {\n\tcase *pb.SignedProposal:\n\t\treturn d.policyChecker.CheckPolicyNoChannel(policy, typedData)\n\tcase *common.Envelope:\n\t\tsd, err := protoutil.EnvelopeAsSignedData(typedData)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn d.policyChecker.CheckPolicyNoChannelBySignedData(policy, sd)\n\tcase []*protoutil.SignedData:\n\t\treturn d.policyChecker.CheckPolicyNoChannelBySignedData(policy, typedData)\n\tdefault:\n\t\taclLogger.Errorf(\"Unmapped id on channelless checkACL %s\", resName)\n\t\treturn fmt.Errorf(\"Unknown id on channelless checkACL %s\", resName)\n\t}\n}","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/aclmgmt/defaultaclprovider.go#L145-L181","documentation":"CheckACLNoChannel handles channelless resources (peer-level operations like join chaincode or admin operations) by looking the resource up in pResourcePolicyMap. If no default policy is registered for the given resource name, evaluation cannot proceed and this error is returned.","triggerScenarios":"Calling CheckACLNoChannel(resName, idinfo) with a resource string not present in pResourcePolicyMap — e.g. a channel-scoped resource mistakenly passed to the channelless provider, or a typo in resource name.","commonSituations":"Custom chaincode/services calling the channelless variant with resources like _lifecycle/* that are channel-scoped; Fabric version mismatch where the channelless resource was renamed; hand-written resource constants.","solutions":["Use the channel-based CheckACL for channel-scoped resources instead of CheckACLNoChannel.","Verify the resource constant against aclmgmt/resources definitions for your Fabric version.","If the resource is legitimately channelless, add a mapping in peer config/defaultaclprovider registration.","Read the logged resource name from 'Unmapped channelless policy for <res>' and correct it."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"var channellessResources = map[string]bool{\n    aclmgmt.Resources_Proposer: true,\n    // ... populate from defaultaclprovider pResourcePolicyMap registrations\n}\nif !channellessResources[resName] {\n    return fmt.Errorf(\"resource %q is not a channelless resource\", resName)\n}","typeGuard":null,"tryCatchPattern":"if err := aclProvider.CheckACLNoChannel(resName, idinfo); err != nil {\n    if strings.HasPrefix(err.Error(), \"Unmapped channelless policy\") {\n        return fmt.Errorf(\"%q is not channelless; use CheckACL instead\", resName)\n    }\n    return err\n}","preventionTips":["Only call CheckACLNoChannel for peer-level (channelless) resources like join/approve chaincode ops","Route channel-scoped resources (_lifecycle/*, lscc/*) through CheckACL with a channelID","Keep resource constants in sync with your Fabric version"],"tags":["acl","policy","access-control"],"backgroundTag":"unmapped-acl-resource","analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}