{"record":{"id":"ada359a1bb59343f","repo":"grpc/grpc-go","slug":"rbac-error-parsing-override-config-v-unknown-ty","errorCode":null,"errorMessage":"rbac: error parsing override config %v: unknown type %T","messagePattern":"rbac: error parsing override config (.+?): unknown type %T","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/xds/httpfilter/rbac/rbac.go","lineNumber":150,"sourceCode":"\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}\n\nfunc (builder) IsTerminal() bool {\n\treturn false\n}\n\nfunc (builder) BuildServerFilter() httpfilter.ServerFilter {\n\treturn serverFilter{}\n}\n\nvar _ httpfilter.ServerFilterBuilder = builder{}\n","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/grpc/grpc-go/blob/03255a9237b6eb32710f6bc4f2de9a675b99fe36/internal/xds/httpfilter/rbac/rbac.go#L132-L168","documentation":"ParseFilterConfigOverride expects an *anypb.Any. Receiving another concrete type means the marshaling layer delivered the wrong Go type as the override - an internal wiring issue.","triggerScenarios":"A non-Any proto.Message is passed as the RBAC override to ParseFilterConfigOverride.","commonSituations":"Custom xDS client bypassing the Any convention; version skew in the override marshaling path.","solutions":["Ensure per-route overrides are wrapped in *anypb.Any before being passed to the builder.","Verify the override TypeURL corresponds to envoy.extensions.filters.http.rbac.v3.RBACPerRoute."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":"func isOverrideAny(m proto.Message) bool { _, ok := m.(*anypb.Any); return ok }","tryCatchPattern":null,"preventionTips":["Always wrap per-route overrides in *anypb.Any.","Prefer the standard grpc-go xDS client over a custom marshaling path."],"tags":["rbac","xds","grpc","type-mismatch","per-route"],"analyzedSha":"03255a9237b6eb32710f6bc4f2de9a675b99fe36","analyzedAt":"2026-08-07T00:29:34.215Z","schemaVersion":2},"datasetVersion":"2026-08-07T03:17:09.362Z"}