New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor HTTP(s) server declaration #463

Closed
cescoffier opened this Issue Apr 3, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@cescoffier
Member

cescoffier commented Apr 3, 2015

We should give more freedom and flexibility in how HTTP servers are configured. The idea is to define a new configuraiton below vertx in the application.conf:

vertx {
    server_name {
        host: "0.0.0.0"
        ssl: true | false
        authentication: true|false
        port: -1, 0, integer
        allow: array of path regex that should be allowed
        deny: array of route regex that are not allowed
        onDenied: path for redirection
    }
    ...
}

By default the basic HTTP server is created as well as the HTTPS server. However as soon as a server is configured, these default instantiation are cancels in favor of the configured ones.

The host value specify on which host / network interface the server is bound. By default all interfaces are bound ("0.0.0.0").

The ssl flag enables or disables HTTPS.

The authentication let you specify whether or not the server require client mutual authentication (http://docs.oracle.com/cd/E19226-01/820-7627/bncbs/index.html),

The port defines the port. 0 picks a random (free) port. -1 disables the server, any other integer is used as the port.

The allow and deny configuration let you define the accepted / denied path. So, for instance some part of the web app would not be accessible by all servers, but only by one. If the client try to access to this part of the site wrong the wrong server, the browser receive a redirection to the onDenied. If not set a FORBIDDEN response is returned.

Related to #332

@cescoffier cescoffier added the feature label Apr 3, 2015

@cescoffier cescoffier self-assigned this Apr 3, 2015

@cescoffier cescoffier added this to the 0.8.1 milestone Apr 3, 2015

@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Apr 3, 2015

Member

Just for tracking purpose here is the list of action:

  • - Define new configuration structure
  • - Manage default instantiation of HTTP and HTTPS
  • - Manage the port parameter (test: declare several servers with different ports)
  • - Manage the ssl parameter (test: declare several servers with ssl on and off)
  • - Manage the host parameter (manual test: check all interface, and one interface)
  • - Manage the authentication parameter
  • - Manage allow and deny, checks is manage in the request handling
  • - Manage the onDenied redirection (test: when not set, when set)
  • - Update documentation
Member

cescoffier commented Apr 3, 2015

Just for tracking purpose here is the list of action:

  • - Define new configuration structure
  • - Manage default instantiation of HTTP and HTTPS
  • - Manage the port parameter (test: declare several servers with different ports)
  • - Manage the ssl parameter (test: declare several servers with ssl on and off)
  • - Manage the host parameter (manual test: check all interface, and one interface)
  • - Manage the authentication parameter
  • - Manage allow and deny, checks is manage in the request handling
  • - Manage the onDenied redirection (test: when not set, when set)
  • - Update documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment