stratos icon indicating copy to clipboard operation
stratos copied to clipboard

CF Routes that a displayed as links should default to https when port is 443

Open richard-cox opened this issue 4 years ago • 3 comments

  • cf routes don't contain scheme info, and there doesn't appear to be a solid way to determine it from the port
  • at the moment we default everything to http. we should default to https when port is 443
  • See https://cloudfoundry.slack.com/archives/C80EP4Y57/p1606138125060900

richard-cox avatar Nov 23 '20 13:11 richard-cox

The port field is only for TCP routes - there is no way of us knowing that an HTTP route should be accessed via https rather than http.

nwmac avatar Nov 25 '20 10:11 nwmac

I think the best solution/compromise for this is just to allow this to be configurable in the deployment/installation, instead of a hardcoded false value in the following places:

https://github.com/cloudfoundry/stratos/blob/423c2417d52edddfcd68215b8971c9d3a6e9f752/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-routes/table-cell-route/table-cell-route.component.ts#L21

https://github.com/cloudfoundry/stratos/blob/423c2417d52edddfcd68215b8971c9d3a6e9f752/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-routes/cf-routes-data-source-base.ts#L91

https://github.com/cloudfoundry/stratos/blob/423c2417d52edddfcd68215b8971c9d3a6e9f752/src/frontend/packages/cloud-foundry/src/features/applications/application.service.ts#L265

That way, the "default" for that deployment could at least be more correct for that particular environment.

Like, in our case, we use HTTPS everywhere, so a default of HTTP for us doesn't make any sense, and so being able to switch this to HTTPS would solve everything for our use case.

You will of course have cases where some apps run with HTTP and some with HTTPS, but at least the admins will have an option to configure the most sensible default for their environment, that fits with the majority of the apps that are being deployed.

maxim-hansen avatar Dec 29 '20 13:12 maxim-hansen

An alternative would be to support opt-in configuration to display routes for both http and https schemes:

image

gberche-orange avatar Feb 16 '21 14:02 gberche-orange