Commit Graph

1888 Commits

Author SHA1 Message Date
Matt Bostock f2f8ca52d9 OAuth: Check both TLS client cert and key
If either is set, try to use them.

This should help avoid a situation where someone has half-configured TLS
client authentication and it doesn't work without raising an obvious
error.
2017-10-06 17:10:03 +01:00
Matt Bostock 16c5d0e4b7 Always verify TLS unless explicitly told otherwise
TLS was not being verified in a number of places:

- connections to grafana.com

- connections to OAuth providers when TLS client authentication was
  enabled

- connections to self-hosted Grafana installations when using the CLI
  tool

TLS should always be verified unless the user explicitly enables an
option to skip verification.

Removes some instances where `InsecureSkipVerify` is explicitly set to
`false`, the default, to help avoid confusion and make it more difficult
to regress on this fix by accident.

Adds a `--insecure` flag to `grafana-cli` to skip TLS verification.

Adds a `tls_skip_verify_insecure` setting for OAuth.

Adds a `app_tls_skip_verify_insecure` setting under a new `[plugins]`
section.

I'm not super happy with the way the global setting is used by
`pkg/api/app_routes.go` but that seems to be the existing pattern used.
2017-10-06 17:09:27 +01:00
Torkel Ödegaard d38c891fac merge with master 2017-10-02 14:14:45 +02:00
Mitsuhiro Tanda fe9fca381c move cloudwatch crendential related code 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda 4f5f38f41b remove old handler 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda 1dcc51adce re-implement dimension_values() 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda 78e3556e95 remove performEC2DescribeInstances() 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda f66e1c02a6 remove obsolete GetMetricStatistics() 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda f590db1b78 move test code 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda feed90c0e2 re-implement get regions 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda 0c95148486 move the metric find query code 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda d31f264576 cache creds for keys/credentials auth type 2017-09-29 13:44:00 +09:00
Mitsuhiro Tanda 39607d09d7 (cloudwatch) alerting 2017-09-29 13:44:00 +09:00
Carl Bergquist e9e8ffc769 Merge pull request #9367 from bobrik/dualstack
Enable dualstack in every net.Dialer, fixes #9364
2017-09-28 11:15:49 +02:00
Torkel Ödegaard 5849fbf04e Merge branch 'master' of github.com:grafana/grafana into develop 2017-09-28 10:37:57 +02:00
Ivan Babrou 9a4ae30227 Enable dualstack in every net.Dialer, fixes #9364
Default transport enables it:

* https://github.com/golang/go/blob/d2826d3e06/src/net/http/transport.go#L42-L46

```
    DialContext: (&net.Dialer{
	Timeout:   30 * time.Second,
	KeepAlive: 30 * time.Second,
	DualStack: true,
    }).DialContext,
```

See also: https://github.com/golang/go/issues/15324
2017-09-27 22:29:48 -07:00
bergquist 8175783f93 go fmt 2017-09-24 18:59:21 +02:00
bergquist c927209447 Merge branch 'master' of https://github.com/BrandonArp/grafana into BrandonArp-master 2017-09-24 18:56:46 +02:00
Torkel Ödegaard 18337f610d Merge branch 'master' into develop 2017-09-22 08:42:07 +02:00
bergquist ed661767f8 follow go idiom and return error as second param 2017-09-21 18:04:16 +02:00
bergquist 0229d28d64 remove unused structs 2017-09-21 15:02:17 +02:00
Carl Bergquist 0db678e18f Merge pull request #9213 from grafana/dist_tracing
Add support for distributed tracing with Jaeger
2017-09-21 10:42:25 +02:00
bergquist 4326790bb4 bug: enable HEAD requests again
ref #9307
2017-09-20 09:45:00 +02:00
Will Sewell 4a6da233d9 Add DbClusterIdentifier to CloudWatch dimensions (#9297)
Unfortunately CloudWatch dimensions are case-sensitive and it uses both `DBClusterIdentifier` and `DbClusterIdentifier` (notice the lower case `b`) depending on the metric. All metrics which also have the `Role` dimension appear to use `DBClusterIdentifier`, whereas metric with the `EngineName` dimension use `DbClusterIdentifier`.
2017-09-20 08:31:54 +02:00
Torkel Ödegaard 41e01184aa Merge branch 'master' into develop 2017-09-18 12:32:29 +02:00
bergquist e3211f6e48 use route as span name 2017-09-18 11:08:58 +02:00
bergquist ee2e4c6567 add trace headers for outgoing requests 2017-09-18 11:08:58 +02:00
bergquist 3c8133aa4b add traces for datasource reverse proxy requests 2017-09-18 11:08:58 +02:00
bergquist 2e350bbb8e adds basic traces using open traces 2017-09-18 11:08:58 +02:00
Torkel Ödegaard 24d69ca205 fix: jsonData should not be allowed to be null, fixes #9258 2017-09-18 09:38:02 +02:00
bergquist 314bff1b78 adds grafana_ prefix for none standard metrics 2017-09-14 14:26:32 +02:00
bergquist 9c30bf53cf introduce concept of named middleware 2017-09-14 14:26:32 +02:00
bergquist 4bc6ecb241 adds metric middlware to route register 2017-09-14 14:26:32 +02:00
bergquist 6372e22180 migrate handlers to new register 2017-09-14 14:26:32 +02:00
bergquist f842265388 add custom route register 2017-09-14 14:26:32 +02:00
bergquist bf138d1845 adds small docs page metrics 2017-09-14 14:26:32 +02:00
bergquist 6d22a67a30 return /metrics before session middleware 2017-09-14 14:26:32 +02:00
bergquist 2de94d6548 convert old metrics to prom metrics 2017-09-14 14:26:32 +02:00
bergquist 788f677ed7 remove old internal metrics lib 2017-09-14 14:26:32 +02:00
bergquist d6b8c6a2d2 add graphite bridge that support delta counters 2017-09-14 14:26:32 +02:00
Brandon Arp cffbcb504d allow ssl renegotiation for datasources 2017-09-13 16:20:24 -07:00
Torkel Ödegaard a9e3130ef6 Merge branch 'master' into develop 2017-09-13 16:06:34 +02:00
Torkel Ödegaard 6e344f6eea api: tsdb api orgId fix 2017-09-12 08:01:34 +02:00
Mitsuhiro Tanda e13575eaef add AWS/NATGateway metrics (#9202) 2017-09-08 09:04:15 +02:00
Torkel Ödegaard a38ded9e7e Merge branch 'master' into develop-newgrid-row-design2 2017-09-07 15:05:41 +02:00
wangguoliang 652fce7e76 Optimize some wrong usage and spelling
Signed-off-by: wgliang <liangcszzu@163.com>
2017-09-07 17:50:11 +08:00
Torkel Ödegaard 2fc67da69a Merge branch 'metrics-tab-v3' 2017-09-04 13:27:44 +02:00
Marcel Anacker 40c008f870 Cloudwatch Datasource: changed namespace of Web Application Firewall (#9128) 2017-09-01 10:43:23 +02:00
Nevins 66441650cd changing ordering so AWS API is only called if cache has expired (#9136) 2017-09-01 07:24:05 +02:00
Torkel Ödegaard 84d4958a3c plugin change: make interval, cache timeout & max data points options in plugin.json, remove query.options component feature, add help markdown feature and toggle for data sources 2017-08-31 14:05:52 +02:00