zalando-stups / zmon-entity-adapter

Push STUPS entities (such as KIO applications) to ZMON
3 stars 1 forks source link

OAuth2 token missing #3

Open hjacobs opened 8 years ago

hjacobs commented 8 years ago

We need to pass OAuth Bearer tokens to the data service.

Feb  2 10:54:28 ip-172-31-143-201 docker/3e8f66e5a05f[840]: Traceback (most recent call last):
 Feb  2 10:54:28 ip-172-31-143-201 docker/3e8f66e5a05f[840]:   File "./app.py", line 98, in run_update
 Feb  2 10:54:28 ip-172-31-143-201 docker/3e8f66e5a05f[840]:     sync_apps(os.getenv('KIO_URL'), access_token)
 Feb  2 10:54:28 ip-172-31-143-201 docker/3e8f66e5a05f[840]:   File "./app.py", line 44, in sync_apps
 Feb  2 10:54:28 ip-172-31-143-201 docker/3e8f66e5a05f[840]:     push_entity(entity)
 Feb  2 10:54:28 ip-172-31-143-201 docker/3e8f66e5a05f[840]:   File "./app.py", line 28, in push_entity
 Feb  2 10:54:28 ip-172-31-143-201 docker/3e8f66e5a05f[840]:     response.raise_for_status()
 Feb  2 10:54:28 ip-172-31-143-201 docker/3e8f66e5a05f[840]:   File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 840, in raise_for_status
 Feb  2 10:54:28 ip-172-31-143-201 docker/3e8f66e5a05f[840]:     raise HTTPError(http_error_msg, response=self)
 Feb  2 10:54:28 ip-172-31-143-201 docker/3e8f66e5a05f[840]: requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://xxx.example.org/api/v1/entities/