prestodb / airlift

Airlift framework for building REST services
Apache License 2.0
1 stars 42 forks source link

Enable Http Server with two https ports #60

Open jingmeih opened 1 year ago

jingmeih commented 1 year ago

We are working on deprecating presto proxy in favor of proxygen. Proxygen uses a different certificate than presto proxy, in order to be compatible with our current presto proxy, we decide to listen to two HTTPS ports at the same time.

==TEST==

  1. TestHttpServerConfig
  2. TestHttpServerInfo
  3. TestHttpServerProvider
ajaygeorge commented 1 year ago

@jingmeih Can we have the new code path under a flag so that we don't have to open 2 ports at the same time.

jingmeih commented 1 year ago

@jingmeih Can we have the new code path under a flag so that we don't have to open 2 ports at the same time.

I added the flag on line(https://github.com/prestodb/airlift/pull/60/files#diff-1762da6fd46b87f7b857cf8ed43e4fe754589ef8f66ba0f4f79b0490d408b5acR188), let me know if this is not enough.

jingmeih commented 1 year ago

Can two different certificates be used for the two different ports?

The way I am thinking is to have two keystores, the additional keystore is for the new port.