Concordium / concordium-wallet-proxy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Forward request and response cookies.

vikt0r0 opened this issue · comments

Forward cookie headers in requests and set-cookie headers in responses to wallet proxy. This ensures that the user of the proxy receives data from the same node with subsequent requests (since the load-balancer between the wallet proxy and nodes map cookie values to a specific nodes). Specifically,

Client:

  • Modify concordium-client, s.t. we can set request cookies in requests to node.
  • TLS should be supported for node queries.

Wallet-proxy:

  • Forward request cookies.
  • Forward set-cookie headers in response to user.
  • Implement set-cookie in wallet-proxy s.t. subsequent requests in wallet proxy include such cookies; in this case the wallet proxy acts as a client.
  • The wallet-proxy should log all the headers related to cookies it is translating.
  • Test that set-cookies are received by user and that wallet-proxy forwards cookies sent from user.
  • Add log levels and log-level command-line parameter.

As discussed, the task needs to be revised a bit

  • all Cookie's need to be sent from the client to the node by the proxy
  • all Set-Cookie and Cookie headers should be forwarded from the node back to the client
  • TLS should be supported for node queries.
  • The wallet-proxy should log all the headers related to cookies it is translating.

I checked off logging. It currently logs at info level, not sure how to do it at trace level, however. Should this be looked into?

We can use logOther "Trace" and then configure the logger at runtime with whether it should or should not support logging.