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 has been archived by the owner on Dec 1, 2018. It is now read-only.
2016-10-21 09:03:10,819 (requests_oauthlib.oauth2_session.refresh_token) [DEBUG] Invoking 0 token response hooks.
Traceback (most recent call last):
File ".pythonrc.py", line 29, in <module>
api.session.verify = session_verify
File "/home/jayme-github/code/pykube/pykube/http.py", line 41, in sessionself._session = build_session(self.config, self.gcloud_file)
File "/home/jayme-github/code/pykube/pykube/session.py", line 23, in build_session
s = _session_object("gcp", config, gcloud_file)
File "/home/jayme-github/code/pykube/pykube/session.py", line 47, in _session_objectreturn GCPSession(config, gcloud_file).create()
File "/home/jayme-github/code/pykube/pykube/session.py", line 120, in createself._update_token()
File "/home/jayme-github/code/pykube/pykube/session.py", line 131, in _update_token
refresh_token=self.credentials.get('refresh_token'))
File "/home/jayme-github/.virtualenvs/pykube/local/lib/python2.7/site-packages/requests_oauthlib/oauth2_session.py", line 309, in refresh_tokenself.token =self._client.parse_request_body_response(r.text, scope=self.scope)
File "/home/jayme-github/.virtualenvs/pykube/local/lib/python2.7/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 409, in parse_request_body_responseself.token = parse_token_response(body, scope=scope)
File "/home/jayme-github/.virtualenvs/pykube/local/lib/python2.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 376, in parse_token_response
validate_token_parameters(params)
File "/home/jayme-github/.virtualenvs/pykube/local/lib/python2.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 383, in validate_token_parameters
raise_from_error(params.get('error'), params)
File "/home/jayme-github/.virtualenvs/pykube/local/lib/python2.7/site-packages/oauthlib/oauth2/rfc6749/errors.py", line 325, in raise_from_errorraisecls(**kwargs)
oauthlib.oauth2.rfc6749.errors.InvalidScopeError: (invalid_scope) Bad Request
Everything is fine again after running one kubectl command (e.g. refreshing the token).
The text was updated successfully, but these errors were encountered:
I have come across the same error during my testing. This is a blocker for 0.14.0 in my mind. The scopes requested by pykube seem overly excessive. My next step is to investigate what kubectl requests and match it in pykube.
@jayme-github I have pushed a change to the token scope which is in-line with what kubectl asks for. I think it is a more reasonable scope for service accounts too.
Can you give master a try and see if it works for you now?
Just got the following error while creating an
HTTPClient
instance:Everything is fine again after running one
kubectl
command (e.g. refreshing the token).The text was updated successfully, but these errors were encountered: