Skip to content

SimplifiedVAHTTP breaks HTTP->HTTPS redirects. #3956

Closed

Description

@cpu

HTTP-01 challenge response servers that redirect to an HTTPS host break with SimplifiedVAHTTP enabled. The updated code is constructing an invalid URL for the redirected validation HTTP get. E.g.:

Fetching http://xx.xx.xx.xx:443/challenge: Error getting validation data

An http:// protocol prefix shouldn't be used for requests to port 443. There should also not be an explicit port at all if the protocol is HTTPS and the port is the standard HTTPS port.

Any fixes for this issue should also add an integration test for this scenario.

Activity

  1. added this to the Sprint 2018-11-27 milestone on Nov 28, 2018
  2. self-assigned this
    on Nov 28, 2018
  3. cpu commented on Nov 29, 2018

    @cpu
    ContributorAuthor

    Any fixes for this issue should also add an integration test for this scenario.

    The best path forward for this is to add an HTTPS interface to the challtestsrv with a self-issued certificate that serves HTTP-01 challenge responses. The management interface will also need to be updated to allow adding/removing redirects. That will let us build integration tests for the HTTP-01 redirect logic.

    Challenge one: we already start a challtestsrv instance in CI but we disable the HTTP interface by specifying --http01 "":

    [8053, 'challtestsrv --dns01 :8053,:8054 --management :8055 --http01 "" --tlsalpn01 :5001'],

    That's done to avoid clashing with Chisel/Chisel2's standalone HTTP server. Starting a second instance of challtestsrv just for HTTP-01 redirect tests is troublesome because both Chisel and Chisel2 hardcode the port of the management URLs/interface. To accomplish our goal we will need to switch all the existing HTTP-01 integration tests to use the challtestsrv so that it can bind 5002 (The VA's HTTP port).

    Challenge two: since we already bind 5001 (the VA's HTTPS port) for TLS-ALPN-01 we need to make sure the updated challtestsrv HTTPS interface can operate without breaking that challenge type & its custom certificate presentation logic.

    Since the integration test is a little more involved than I initially expected I've split my bugfix & unit tests into a separate PR that can be reviewed now while I work on the above: #3959

  4. cpu commented on Nov 29, 2018

    @cpu
    ContributorAuthor

    Implemented integration tests in #3960

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions