{"record":{"id":"8f3ea633cff22290","repo":"grpc/grpc-go","slug":"rbac-error-parsing-config-v-v","errorCode":null,"errorMessage":"rbac: error parsing config %v: %v","messagePattern":"rbac: error parsing config (.+?): (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/xds/httpfilter/rbac/rbac.go","lineNumber":139,"sourceCode":"\t\tif rbacCfg.GetRules().GetAction() != v3rbacpb.RBAC_LOG {\n\t\t\treturn nil, fmt.Errorf(\"rbac: error constructing matching engine: %v\", err)\n\t\t}\n\t}\n\n\treturn config{chainEngine: ce}, nil\n}\n\nfunc (builder) ParseFilterConfig(cfg proto.Message) (httpfilter.FilterConfig, error) {\n\tif cfg == nil {\n\t\treturn nil, fmt.Errorf(\"rbac: nil configuration message provided\")\n\t}\n\tm, ok := cfg.(*anypb.Any)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"rbac: error parsing config %v: unknown type %T\", cfg, cfg)\n\t}\n\tmsg := new(rpb.RBAC)\n\tif err := m.UnmarshalTo(msg); err != nil {\n\t\treturn nil, fmt.Errorf(\"rbac: error parsing config %v: %v\", cfg, err)\n\t}\n\treturn parseConfig(msg)\n}\n\nfunc (builder) ParseFilterConfigOverride(override proto.Message) (httpfilter.FilterConfig, error) {\n\tif override == nil {\n\t\treturn nil, fmt.Errorf(\"rbac: nil configuration message provided\")\n\t}\n\tm, ok := override.(*anypb.Any)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"rbac: error parsing override config %v: unknown type %T\", override, override)\n\t}\n\tmsg := new(rpb.RBACPerRoute)\n\tif err := m.UnmarshalTo(msg); err != nil {\n\t\treturn nil, fmt.Errorf(\"rbac: error parsing override config %v: %v\", override, err)\n\t}\n\treturn parseConfig(msg.Rbac)\n}","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/grpc/grpc-go/blob/03255a9237b6eb32710f6bc4f2de9a675b99fe36/internal/xds/httpfilter/rbac/rbac.go#L121-L157","documentation":"The provided *anypb.Any failed to unmarshal into the RBAC proto. The wrapped error comes from proto.Unmarshal, indicating the Any's type URL or payload does not correspond to envoy.extensions.filters.http.rbac.v3.RBAC.","triggerScenarios":"The Any's TypeUrl is for a different message (e.g. RBACPerRoute, a v4alpha type, or a router config) or the serialized bytes are corrupt/truncated.","commonSituations":"Control plane serving a different proto version than grpc-go expects; a TypeURL typo in the control plane; corrupted resource from a buggy xDS server; filter entry mislabeled with the RBAC type URL but carrying another message.","solutions":["Confirm the Any TypeUrl is exactly type.googleapis.com/envoy.extensions.filters.http.rbac.v3.RBAC.","Ensure proto-version compatibility between the control plane and grpc-go (use v3, not v4alpha, for this filter).","Re-fetch the LDS resource and inspect the raw Any payload bytes."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"func checkRBACTypeURL(a *anypb.Any) error {\n\twant := \"type.googleapis.com/envoy.extensions.filters.http.rbac.v3.RBAC\"\n\tif a.GetTypeUrl() != want {\n\t\treturn fmt.Errorf(\"rbac type_url=%q want %q\", a.GetTypeUrl(), want)\n\t}\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin the control plane to the same Envoy API major version grpc-go supports.","Unit-test Any round-tripping (marshal then UnmarshalTo) before serving resources."],"tags":["rbac","xds","grpc","protobuf","version-skew"],"analyzedSha":"03255a9237b6eb32710f6bc4f2de9a675b99fe36","analyzedAt":"2026-08-07T00:29:34.215Z","schemaVersion":2},"datasetVersion":"2026-08-07T03:17:09.362Z"}