{"record":{"id":"97edaaf6cb25f1af","repo":"hyperledger/fabric","slug":"disallowed-channel-group-s","errorCode":null,"errorMessage":"Disallowed channel group: %s","messagePattern":"Disallowed channel group: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/channelconfig/channel.go","lineNumber":111,"sourceCode":"\tchannelCapabilities := cc.Capabilities()\n\n\tif err := cc.Validate(channelCapabilities); err != nil {\n\t\treturn nil, err\n\t}\n\n\tmspConfigHandler := NewMSPConfigHandler(channelCapabilities.MSPVersion(), bccsp)\n\n\tvar err error\n\tfor groupName, group := range channelGroup.Groups {\n\t\tswitch groupName {\n\t\tcase ApplicationGroupKey:\n\t\t\tcc.appConfig, err = NewApplicationConfig(group, mspConfigHandler)\n\t\tcase OrdererGroupKey:\n\t\t\tcc.ordererConfig, err = NewOrdererConfig(group, mspConfigHandler, channelCapabilities)\n\t\tcase ConsortiumsGroupKey:\n\t\t\tcc.consortiumsConfig, err = NewConsortiumsConfig(group, mspConfigHandler)\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"Disallowed channel group: %s\", group)\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrapf(err, \"could not create channel %s sub-group config\", groupName)\n\t\t}\n\t}\n\n\tif cc.mspManager, err = mspConfigHandler.CreateMSPManager(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn cc, nil\n}\n\n// MSPManager returns the MSP manager for this config\nfunc (cc *ChannelConfig) MSPManager() msp.MSPManager {\n\treturn cc.mspManager\n}\n","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/common/channelconfig/channel.go#L93-L129","documentation":"NewChannelConfig only accepts four sub-groups under the Channel group: Application, Orderer, Consortiums (and skips others it handles); any other group name hits the default case and returns \"Disallowed channel group: %s\". It guards against unknown or misspelled groups being smuggled into channel configuration, which would otherwise be silently ignored.","triggerScenarios":"Iterating channelGroup.Groups where a key is not ApplicationGroupKey, OrdererGroupKey, or ConsortiumsGroupKey — e.g. a group named \"orderer\" (wrong case), \"Consortium\", \"Peer\", or a leftover group from config edits.","commonSituations":"Hand-editing decoded configtxlator output and adding a custom group; misspelling a standard group key; fabricating config envelopes in tests with arbitrary group names; tooling that merges unrelated config groups into the channel group.","solutions":["Rename the offending group to one of the allowed keys (Application, Orderer, Consortiums) or delete it from the config","Regenerate the config with configtxgen to guarantee only recognized groups appear","Check group names case-sensitively in the decoded config (`configtxlator proto_decode`) before submitting"],"exampleFix":"// before\nconfig.ChannelGroup.Groups[\"Orderers\"] = &cb.ConfigGroup{} // disallowed\n\n// after\nconfig.ChannelGroup.Groups[\"Orderer\"] = &cb.ConfigGroup{} // allowed key","handlingStrategy":"validation","validationCode":"var allowedChannelGroups = map[string]bool{\"Application\": true, \"Orderer\": true, \"Consortiums\": true}\nfor name := range channelGroup.Groups {\n    if !allowedChannelGroups[name] {\n        return fmt.Errorf(\"pre-check: disallowed channel group %q\", name)\n    }\n}","typeGuard":null,"tryCatchPattern":"cc, err := channelconfig.NewChannelConfig(channelGroup, bccsp)\nif err != nil {\n    if strings.HasPrefix(err.Error(), \"Disallowed channel group\") {\n        return fmt.Errorf(\"remove or rename the unknown group before retrying: %w\", err)\n    }\n    return err\n}","preventionTips":["Only create groups with the exact keys Application, Orderer, Consortiums","Check case sensitivity when editing decoded configs","Prefer configtxgen-generated configs over hand-built ones"],"tags":["fabric","channelconfig","schema","config-transaction"],"backgroundTag":"unknown-config-key","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"}