Skip to content

HTTPS certificate validation #418

@ghost

Description

Python 2.7.9 enables certificate verification by default for http clients. This causes an issue when the SOAPpy client tries to pass parameters to an AppController. Python throws an SSLError exception (certificate verify failed) since the AppController is using a self-signed certificate.

One (not recommended) fix would be to globally disable verification.

I think a better fix would be to pass a custom SSLContext to SOAPpy, but I don't think it supports that feature at this time. Replacing _create_default_https_context with a function that creates a custom context is a possible temporary workaround.

However, the CN on the self-signed certificate (appscale.com) won't match the hostname that the SOAPpy client requests (the node's ip address). I don't know of a good way to fix this. Telling SOAPpy to set a Host: appscale.com header might work, but I'm not sure if SOAPpy supports this. Generating a certificate for each node (with the CN set to the node's ip address) might also work, but I'm not sure if that would have other undesirable consequences.

I can start working on a pull request once a decision is made on how to address this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions