Evaluating the possibility of changing the backend certificates depend on the request information
Problem
This issue created to evaluate the possibility of selecting the backend certificates for single backend depends on the request data coming from their client applications.
Ex:
If the incoming request contains the element <code>1<code> we have to invoke the remote service https://remote.host/soap with the client certifkatce1, if the incoming request contains the element <code>2<code> we have to invoke the remote service https://remote.host/soap (same backend service) with the client certifkatce2 and so on.
Proposed Solution
.
Alternatives
No response
Version
No response
Update:
In order to implement this fix we need to extract the request ID separately at the request flow when creating connection at [1], but the flow is directed to above code space directly from ClientIODispatch, where at that place we don't have the message context to extract request identifier.
Solution: Introduce request Identifier to the HostConnections[2] and pass it when creating the connection. Maintain the requestID as well in the connection pool.
[1] - https://github.com/wso2/wso2-synapse/blob/master/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/http/conn/ClientConnFactory.java#L132 [2] https://github.com/wso2/wso2-synapse/blob/master/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/passthru/ClientIODispatch.java#L56
PR: https://github.com/wso2/wso2-synapse/pull/2355
Closing since the fix is merged.