-
Notifications
You must be signed in to change notification settings - Fork 91
Description
GrpcErrorHelper.checkHasNoUnkownFields/Recursive exists as a utility for validating protobuf messages from the client and ensuring that no tags are included in the payload that the server couldn't decode - presumably from future clients, or otherwise slightly-incompatible clients. Only a few grpc calls run this validation today, and many of those non-recursively.
This ticket is to propose adding a server interceptor that validates all already-marshalled messages to ensure they only have known fields. Checking this could be as simple as req instanceof Message, to ensure that any protobuf marshalling has already taken place before validating (we have cases such as barrage/flight where messages are not marshalled yet, and it is up to the service impl to validate payloads).
This change would require no client changes, only a new interceptor added in the server, for all messages.