68 Commits

Author SHA1 Message Date
b2c6c743ce stackdriver: add debug logging 2018-10-22 16:11:17 +02:00
cd7b454e25 stackdriver: add default value for authentication type 2018-10-22 16:03:14 +02:00
823838a839 stackdriver: wip - remove debug code 2018-10-22 16:03:14 +02:00
2b1709b875 stackdriver: only get default token from metadata server when applying route 2018-10-22 16:03:13 +02:00
ff5f281508 stackdriver: wip - get metric descriptors in the backend 2018-10-22 16:03:13 +02:00
60617d0bf7 stackdriver: wip - add logic for retrieving token from gce metadata server in the auth provider 2018-10-22 16:03:13 +02:00
3f9ed2efaa stackdriver: wip - temp remove jwt token auth 2018-10-22 16:03:12 +02:00
b2de0d8c3e stackdriver: wip - always use gce default account for stackdriver 2018-10-22 16:03:12 +02:00
2002162073 stackdriver: wip - add scope and remove debug code 2018-10-22 16:03:12 +02:00
df215d9d09 stackdriver: WIP - test retrieving project id from gce metadata 2018-10-22 16:03:12 +02:00
fbe0ffd10b skip jwt token auth if privateKey is empty 2018-10-22 16:03:12 +02:00
43aa6603a3 fetch token from GCE metadata server 2018-10-22 16:03:12 +02:00
2b1e4d001a Merge pull request #13326 from ryantxu/proxy-slash
Keep trailing slash for datasource proxy requests
2018-10-04 14:38:34 +02:00
8bf4d68035 add datasource proxy test to verify trailing slashes are forwarded 2018-10-03 12:28:30 +02:00
d11f67eb25 stackdriver: change info logging to debug logging 2018-09-28 16:16:27 +02:00
6db0880fd8 invalidate access token cache after datasource is updated 2018-09-21 14:24:44 +02:00
7c6227c061 remove the test that does not do anything 2018-09-18 11:18:55 -07:00
71dfeff782 add a test 2018-09-17 12:28:36 -07:00
982e095f85 dsproxy: add mutex protection to the token caches 2018-09-14 11:13:09 +02:00
56e8e50497 Stackdriver: Use ds_auth_provider in stackdriver. This will make sure the token is renewed when it has exporired 2018-09-14 09:38:16 +02:00
db170845b0 Stackdriver: Restructured ds proxy tests 2018-09-14 09:38:16 +02:00
05f6710454 stackdriver: fix test 2018-09-14 09:38:16 +02:00
1725940ab9 Stackdriver: Add new file 2018-09-14 09:38:16 +02:00
6a610558c4 Stackdriver: Start breaking out apply route to its own file 2018-09-14 09:38:16 +02:00
23339e4322 Stackdriver: Use new access token API 2018-09-14 09:35:28 +02:00
71af62e741 Stackdriver: Temporary exporting token lookup 2018-09-14 09:35:28 +02:00
92d631986f Stackdriver: Removed debug logging 2018-09-14 09:35:27 +02:00
e7648c4070 dsproxy: implements support for plugin routes with jwt file
Google Cloud service accounts use a JWT token to get an
oauth access token. This adds support for that.
2018-09-14 09:35:27 +02:00
a4ef4792bc Stackdriver: Add scope for google resource manager 2018-09-14 09:35:26 +02:00
350bcf4f56 Fixed broken if statement 2018-09-14 09:35:26 +02:00
7197a4c17f Adds jwt token signing google auth 2018-09-14 09:35:26 +02:00
ef3beb1f0e Adds poc code for retrieving google auth accesstoken 2018-09-14 09:33:50 +02:00
c75e071213 dsproxy: interpolate route url
Allows for dynamic urls for plugin routes. There are a few plugins
where the route url should be configurable and this change allows
using jsonData fields in the url field for a route in the
plugin.json file for a plugin.
2018-08-18 16:02:49 +02:00
13921902b5 Set User-Agent header in all proxied datasource requests
Header value will be Grafana/%version%, i.e. Grafana/5.3.0
2018-08-15 09:46:59 +02:00
4f704cec53 fix: ds_proxy test not initiating header 2018-08-14 09:18:23 +02:00
2459b177f9 change: Set User-Agent to Grafana/%Version% Proxied-DS-Request %DS-Type% in all proxied ds requests 2018-08-13 18:09:01 +02:00
828fb39ee2 Merge pull request #11643 from mrsiano/generic_oauth
Pass configured/auth headers to a Datasource.
2018-06-21 14:21:59 +02:00
cc1e3a0e3c Pass configured/auth headers to a Datasource.
In some setups (ex openshift), the Datasource will require Grafana
to pass oauth token as header when sending queries.
Also, this PR allow to send any header which is something
Grafana currently does not support.
2018-06-21 14:58:05 +03:00
10d30f0b73 dsproxy: move http client variable back
After refactoring to be able to mock the client in
a test, the client wasn't a global variable anymore.
This change moves the client back to being a package-
level variable.
2018-06-14 13:39:46 +02:00
719ebdc24d dsproxy: allow multiple access tokens per datasource
Changes the cache key for tokens to cache on datasource id +
route path + http method instead of just datasource id.
2018-06-12 17:39:38 +02:00
9413ce5ef6 Merge pull request #8096 from ryantxu/influx-db-query2
let the influxdb API set a database
2018-04-13 18:22:12 +02:00
980e078222 Merge pull request #11326 from bergquist/more_traces
dataproxy: adds dashboardid and panelid as tags
2018-03-23 17:13:15 +01:00
0a415c50d0 Make golint happier 2018-03-22 22:38:44 +01:00
f142548969 dataproxy: adds dashboardid and panelid as tags
closes #11315
2018-03-20 22:23:28 +01:00
a04c4ba454 allow any database for influx proxy 2018-03-15 13:01:17 +01:00
ad88e5398c remove 2018-03-15 12:57:09 +01:00
4f8ee9f5a7 merge with master 2018-03-14 23:52:24 +01:00
a83ede0193 support POST for query and query_range 2018-03-12 13:25:05 +09:00
c0ecdee375 rename Context to ReqContext 2018-03-07 11:54:50 -05:00
338655dd37 move Context and session out of middleware 2018-03-06 18:16:49 -05:00