You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 15, 2024. It is now read-only.
The methods under Consul.Session do not work on a system with ACLs enabled and the default ACL policy is deny. This happens even if the token is set in consul.Consul() as self.agent.token is not passed in the params to the http client.
Possible fix:
diff -ruN python-consul-0.7.2.orig/consul/base.py python-consul-0.7.2/consul/base.py
--- python-consul-0.7.2.orig/consul/base.py 2017-08-26 09:35:57.000000000 +0200
+++ python-consul-0.7.2/consul/base.py 2017-09-04 13:56:13.897000258 +0200
@@ -1679,6 +1679,8 @@
dc = dc or self.agent.dc
if dc:
params['dc'] = dc
+ if self.agent.token:
+ params['token'] = self.agent.token
data = {}
if name:
data['name'] = name
@@ -1716,6 +1718,8 @@
dc = dc or self.agent.dc
if dc:
params['dc'] = dc
+ if self.agent.token:
+ params['token'] = self.agent.token
return self.agent.http.put(
CB.bool(),
'/v1/session/destroy/%s' % session_id,
@@ -1757,6 +1761,8 @@
dc = dc or self.agent.dc
if dc:
params['dc'] = dc
+ if self.agent.token:
+ params['token'] = self.agent.token
if index:
params['index'] = index
if wait:
@@ -1787,6 +1793,8 @@
dc = dc or self.agent.dc
if dc:
params['dc'] = dc
+ if self.agent.token:
+ params['token'] = self.agent.token
if index:
params['index'] = index
if wait:
@@ -1824,6 +1832,8 @@
dc = dc or self.agent.dc
if dc:
params['dc'] = dc
+ if self.agent.token:
+ params['token'] = self.agent.token
if index:
params['index'] = index
if wait:
@@ -1850,6 +1860,8 @@
dc = dc or self.agent.dc
if dc:
params['dc'] = dc
+ if self.agent.token:
+ params['token'] = self.agent.token
return self.agent.http.put(
CB.json(one=True, allow_404=False),
'/v1/session/renew/%s' % session_id,
The methods under
Consul.Sessiondo not work on a system with ACLs enabled and the default ACL policy isdeny. This happens even if the token is set inconsul.Consul()asself.agent.tokenis not passed in the params to the http client.Possible fix: