{"action":"created","issue":{"url":"https://api.github.com/repos/ianunruh/hvac/issues/75","repository_url":"https://api.github.com/repos/ianunruh/hvac","labels_url":"https://api.github.com/repos/ianunruh/hvac/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/ianunruh/hvac/issues/75/comments","events_url":"https://api.github.com/repos/ianunruh/hvac/issues/75/events","html_url":"https://github.com/ianunruh/hvac/issues/75","id":174141921,"number":75,"title":"tlsv1 alert protocol version","user":{"login":"jcderose","id":6912515,"avatar_url":"https://avatars.githubusercontent.com/u/6912515?v=3","gravatar_id":"","url":"https://api.github.com/users/jcderose","html_url":"https://github.com/jcderose","followers_url":"https://api.github.com/users/jcderose/followers","following_url":"https://api.github.com/users/jcderose/following{/other_user}","gists_url":"https://api.github.com/users/jcderose/gists{/gist_id}","starred_url":"https://api.github.com/users/jcderose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcderose/subscriptions","organizations_url":"https://api.github.com/users/jcderose/orgs","repos_url":"https://api.github.com/users/jcderose/repos","events_url":"https://api.github.com/users/jcderose/events{/privacy}","received_events_url":"https://api.github.com/users/jcderose/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-08-30T22:30:10Z","updated_at":"2016-09-08T19:58:39Z","closed_at":null,"body":"I'm using the hvac package with vault 0.6.1. In my script, I attempt to authenticate against our Vault server with the username/password authentication method:\r\n\r\n```\r\nimport hvac\r\n\r\nvault_username = \"username\"\r\nvault_pw = \"mypassword\"\r\nvault_client.auth_userpass(vault_username, vault_pw)\r\n```\r\n\r\nAnd I'm getting this error:\r\n```\r\n$ ./script.py\r\nTraceback (most recent call last):\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py\", line 595, in urlopen\r\n    chunked=chunked)\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py\", line 352, in _make_request\r\n    self._validate_conn(conn)\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py\", line 831, in _validate_conn\r\n    conn.connect()\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/connection.py\", line 289, in connect\r\n    ssl_version=resolved_ssl_version)\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/util/ssl_.py\", line 308, in ssl_wrap_socket\r\n    return context.wrap_socket(sock, server_hostname=server_hostname)\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py\", line 377, in wrap_socket\r\n    _context=self)\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py\", line 752, in __init__\r\n    self.do_handshake()\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py\", line 988, in do_handshake\r\n    self._sslobj.do_handshake()\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py\", line 633, in do_handshake\r\n    self._sslobj.do_handshake()\r\nssl.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645)\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/adapters.py\", line 423, in send\r\n    timeout=timeout\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py\", line 621, in urlopen\r\n    raise SSLError(e)\r\nrequests.packages.urllib3.exceptions.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645)\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"./script.py\", line 33, in <module>\r\n    vault_client.auth_userpass(vault_username, vault_pw)\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/hvac/v1/__init__.py\", line 481, in auth_userpass\r\n    return self.auth('/v1/auth/{0}/login/{1}'.format(mount_point, username), json=params, use_token=use_token)\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/hvac/v1/__init__.py\", line 600, in auth\r\n    response = self._post(url, **kwargs).json()\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/hvac/v1/__init__.py\", line 643, in _post\r\n    return self.__request('post', url, **kwargs)\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/hvac/v1/__init__.py\", line 664, in __request\r\n    allow_redirects=False, **_kwargs)\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/sessions.py\", line 475, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/sessions.py\", line 596, in send\r\n    r = adapter.send(request, **kwargs)\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/adapters.py\", line 497, in send\r\n    raise SSLError(e, request=request)\r\nrequests.exceptions.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645)\r\n```\r\n\r\nI thought it might be a TLS negotiation mismatch between my client and our Vault server but we aren't explicitly blocking/denying requests on TLSv1.\r\n\r\nBased on the stack trace, it looks like an issue with my Python installation but I'm able to open other SSL sites in my Python environment without any problems:\r\n```\r\n$ python\r\nPython 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10:47:25)\r\n[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import requests\r\n>>> requests.get(\"https://www.howsmyssl.com/a/check\")\r\n<Response [200]>\r\n```"},"comment":{"url":"https://api.github.com/repos/ianunruh/hvac/issues/comments/245720855","html_url":"https://github.com/ianunruh/hvac/issues/75#issuecomment-245720855","issue_url":"https://api.github.com/repos/ianunruh/hvac/issues/75","id":245720855,"user":{"login":"TerryHowe","id":104113,"avatar_url":"https://avatars.githubusercontent.com/u/104113?v=3","gravatar_id":"","url":"https://api.github.com/users/TerryHowe","html_url":"https://github.com/TerryHowe","followers_url":"https://api.github.com/users/TerryHowe/followers","following_url":"https://api.github.com/users/TerryHowe/following{/other_user}","gists_url":"https://api.github.com/users/TerryHowe/gists{/gist_id}","starred_url":"https://api.github.com/users/TerryHowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TerryHowe/subscriptions","organizations_url":"https://api.github.com/users/TerryHowe/orgs","repos_url":"https://api.github.com/users/TerryHowe/repos","events_url":"https://api.github.com/users/TerryHowe/events{/privacy}","received_events_url":"https://api.github.com/users/TerryHowe/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T19:58:39Z","updated_at":"2016-09-08T19:58:39Z","body":"Maybe something like\r\n```\r\nsudo -i\r\nps -eaf | grep vault\r\nkill -9 _vault_pid_\r\nvault server -config /etc/vault.d/config.hcl\r\n`\r\n\r\nReally ought to get your self an init scri[t so it can be more like `service vault restart`"}}
{"actor":{"display_login":"TerryHowe"}}