Skip to content
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

Protect with tls frontend #938

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

dmargery
Copy link
Contributor

I run an aggregate manager on the default https port at am.grid5000.fr

Being on default port, it gets its share of malicious https traffic, and some of it is able to cause a Denial of Service due to incomplete TLS handshakes (as far as I understand).
Due to the warning on https://docs.python.org/2/library/simplehttpserver.html, I understand I should not be using geni-tools to run a production entry point to a testbed, as I understand that deep down the layers, the code for SimpleXMLRPCServer uses the same ssl_wrapper over sockets as SimpleHTTPServer and is therefore subject to the same warning.

This MR implements an insecure XMLRPCServer that expects to sit behind a TLS proxy (we use apache2 for that). The TLS proxy handles all the incoming traffic, and only passes "verified" traffic down to geni-tools, over http, transferring the verified certificate as an http header.

A per python docs, the built-in HTTP request handler is not fit for
production. Add an option to use geni-tools in production by having it
listen on localhost, using http, to be called by a frontend that will
handle the TLS handshake and pass the client certificate as an HTTP
Header.

To use this variant, you need to set proto and certheader options in the
configuration file.
@ahelsing
Copy link
Member

Eyeballing this the changes look fine. Certainly the goal is appropriate.

Can you verify that with old arguments the old behavior remains? Can you speak to what testing you have done?

@bluke
Copy link

bluke commented Sep 1, 2021

The Grid'5000 testbed has been using dmargery's fork with a TLS frontend for a couple of year without any difficulties.

As far as I know these changes preserve the previous behavior if no changes are done to the configuration file.
However I have never used it in this fashion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants