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

Ability to use HTTPS for ALL consul CLI commands #2365

Closed
tniswong opened this issue Sep 27, 2016 · 6 comments · Fixed by #2730
Closed

Ability to use HTTPS for ALL consul CLI commands #2365

tniswong opened this issue Sep 27, 2016 · 6 comments · Fixed by #2730
Labels
type/enhancement Proposed improvement or new feature
Milestone

Comments

@tniswong
Copy link

Consul 0.6.4

Relevant configuration:

{
  "ports": {
    "http": -1,
    "https": 8500
  },

  "key_file": "/tmp/consul.key",
  "cert_file": "/tmp/consul.crt",
  "ca_file": "/tmp/ca.crt",

  "verify_incoming": false,
  "verify_outgoing": true,
  "verify_server_hostname": true
}

I have a consul cluster with HTTP disabled in favor of HTTPS listening on 8500. It is currently not possible to communicate with this cluster using the consul CLI, as it only supports HTTP and not HTTPS.

There are currently no options available to specify a communication scheme.

So, now, I have to manually implement a Semaphore/lock algorithm instead of using the out of the box consul lock ... command, which would be sooo much easier.

Here's the error that will occur if you try.

Error querying Consul agent: Get http://127.0.0.1:8500/v1/agent/self: malformed HTTP response "\x15\x03\x01\x00\x02\x02"

@slackpad slackpad added the type/enhancement Proposed improvement or new feature label Sep 27, 2016
@slackpad
Copy link
Contributor

We should sweep through the full CLI set and make sure this works and is documented. This is also a good time to switch the common options to use common parsing code and the partial for the docs that was added for the new KV CLI.

@slackpad slackpad added this to the 0.7.3 milestone Nov 21, 2016
@slackpad slackpad modified the milestones: 0.7.4, 0.7.3 Jan 17, 2017
@jefflill
Copy link

jefflill commented Feb 9, 2017

Did this make it into 0.7.4 or are you targeting 8.0.0 now?

@kyhavlov
Copy link
Contributor

kyhavlov commented Feb 9, 2017

This is being done now for 0.8 as part of some work to centralize and clean up the command line parsing of flags in general.

@kyhavlov kyhavlov modified the milestones: 0.8.0, Triaged Feb 9, 2017
@jefflill
Copy link

jefflill commented Feb 9, 2017

Cool. Thanks for the update.

@kyhavlov
Copy link
Contributor

If anyone needs this capability in current/older versions, the only way to use https in the CLI was by setting the CONSUL_HTTP_SSL environment var to true.

In 0.8.0, passing -http-addr=https://127.0.0.1:8501 will work, too.

@wyardley
Copy link

@kyhavlov fwiw, consul lock -http-addr=127.0.0.1:8501 works for me also, with

axs1-qa [qa] centos@manager-i-2d93e6f4:~ $ consul --version
Consul v0.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Proposed improvement or new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants