lnrpc+rpcperms+lntest: add unique MW message ID
This commit adds a new unique intercept message ID that is different for each message sent to an RPC middleware. This will allow us to re-purpose the existing request ID field into its original intention, which was to have a unique ID for a full gRPC request/response pair or gRPC stream as a whole.
This commit is contained in:
5 files changed
+519
-484
No files matched your search
@@ -5852,7 +5852,7 @@
|
||||
"request_id": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"description": "The unique ID of the intercepted request. Useful for mapping request to\nresponse when implementing full duplex message interception."
|
||||
"description": "The unique ID of the intercepted original gRPC request. Useful for mapping\nrequest to response when implementing full duplex message interception. For\nstreaming requests, this will be the same ID for all incoming and outgoing\nmiddleware intercept messages of the _same_ stream."
|
||||
},
|
||||
"raw_macaroon": {
|
||||
"type": "string",
|
||||
@@ -5874,6 +5874,11 @@
|
||||
"response": {
|
||||
"$ref": "#/definitions/lnrpcRPCMessage",
|
||||
"description": "Intercept outgoing gRPC response message: all outgoing messages, both on\nstreaming and unary RPCs, are forwarded to the middleware for inspection\nand amendment. The response in this message is the original response as\nit was generated by the main RPC server. It can either be accepted\n(=forwarded to the client), replaced/overwritten with a new message of\nthe same type, or replaced by an error message."
|
||||
},
|
||||
"msg_id": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"description": "The unique message ID of this middleware intercept message. There can be\nmultiple middleware intercept messages per single gRPC request (one for the\nincoming request and one for the outgoing response) or gRPC stream (one for\neach incoming message and one for each outgoing response). This message ID\nmust be referenced when responding (accepting/rejecting/modifying) to an\nintercept message."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user