envoy icon indicating copy to clipboard operation
envoy copied to clipboard

Mongo filter needs update

Open shiponcs opened this issue 1 year ago • 3 comments

Title: Mongo filter is too old: needs update

Description: The mongo wire protocol has changed a lot since version 3.6 but the mongo filter remains same. In fact, the most of the opcodes that were handled in mongo filter source code(codec source file) were deprecated in mongo version 5 (see details here). OP_MSG is used instead. OP_MSG (having value 2013) isn't handled in current mongo filter for which an exception log(as programmed here)- invalid mongo op 2013 is generated in envoy log. I've seen people complained for getting this log (e.g., #5648). While I was testing this, I took tcpdump, I have seen that mongo 4.4.6 was using OP_MSG while I was making insert request from client though opcode like OP_INSERT was deprecated in version 5. Mongo Filter is too old that support pre-3.6 version of mongo that people no more use or very rarely do.

Relevant PRs(never merged): #5053 :this PR could've been the savior, I feel bad that it was too close to get merged #5198

Update::

If the node supports OP_MSG, any and all messages MUST use OP_MSG, optionally compressed with OP_COMPRESSED. Authentication messages MUST also use OP_MSG when it is supported, but MUST NOT use OP_COMPRESSED.

Source

shiponcs avatar Jan 12 '24 15:01 shiponcs

cc @mythra @giantcroc @mattklein123

phlax avatar Jan 12 '24 15:01 phlax

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

github-actions[bot] avatar Feb 18 '24 12:02 github-actions[bot]

Hmm, I think I could take this. Seems like it's just a matter of brushing up https://github.com/envoyproxy/envoy/pull/5053 to be compatible with today-Envoy.

derekargueta avatar May 31 '24 04:05 derekargueta

This needs to be addressed too. #32289

shiponcs avatar May 31 '24 11:05 shiponcs