grafana/pkg/tsdb
ying-jeanne c57047a420
Postgres: allow providing TLS/SSL certificates as text in addition to file paths (#30353)
* postgres SSL certification

* add back the UI to configure SSL Authentication files by file path

* add backend logic

* correct unittest

* mini changes

* Update public/app/plugins/datasource/postgres/config_ctrl.ts

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* mutex

* check file exist before remove

* change permission

* change default configuremethod to file-path

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* rename sslconfiguremethod to sslconfigurationmethod

* frontend update

* solve comments

* Postgres: Convert tests to stdlib

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Postgres: Be consistent about TLS/SSL terminology

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* fix init inconsistancy

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* naming convention

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Undo change

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix TLS issue

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* change permissions

* Fix data source field names

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Clean up HTML

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Improve popover text

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix SSL input bug

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Undo unnecessary change

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Clean up backend code

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix build

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* More consistent naming

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Clean up code

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Enforce certificate file permissions

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* add settings

* Undo changes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* fix windows file path

* PostgresDataSource: Fix mutex usage

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/tsdb/postgres/postgres.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* fix compilation

* fix unittest

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* mock function

* change kmutex package

* add kmutex into middleware

* lock connection file per datasource

* add unittest regarding concurrency

* version should be equal

* adding unittest

* fix the loop

* fix unitest

* fix postgres unittst

* remove comments

* move dataPath from arg to tlsManager struct field

* Use DecryptedValues method

Use cached decrypted values instead of
using secure json data decrypt which will
decrypt unchanged values over and over again.

* remove unneeded mutex in tests and cleanup tests

* fix the lint

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-02-23 22:10:55 +01:00
..
azuremonitor Chore: Rewrite tsdb azuremonitor time grain test to standard library (#30089) 2021-01-06 20:16:53 +01:00
cloudmonitoring Cloud Monitoring: Fix legend naming with display name override (#30440) 2021-01-21 15:08:57 +01:00
cloudwatch CloudWatch: Added AWS Ground Station metrics and dimensions (#31362) 2021-02-23 20:36:18 +01:00
elasticsearch Elasticsearch: Support extended stats and percentiles in terms order by (#28910) 2021-01-15 12:10:16 +01:00
graphite Chore: Rewrite tsdb graphite test to standard library (#30088) 2021-01-06 20:14:25 +01:00
influxdb InfluxDB: handle columns named "table" (#30985) 2021-02-23 16:44:33 +01:00
mssql Chore: Fix linting issues caught by ruleguard (#28799) 2020-11-17 11:27:45 +01:00
mysql Chore: Enable errorlint linter (#29227) 2020-11-19 14:47:17 +01:00
opentsdb Chore: Disable default golangci-lint filter (#29751) 2020-12-15 09:32:06 +01:00
postgres Postgres: allow providing TLS/SSL certificates as text in addition to file paths (#30353) 2021-02-23 22:10:55 +01:00
prometheus Chore: Rewrite tsdb prometheus test to standard library (#29592) 2020-12-04 08:49:39 +01:00
sqleng Chore: Disable default golangci-lint filter (#29751) 2020-12-15 09:32:06 +01:00
testdatasource PieChart: Progress on new core pie chart (#28020) 2021-02-11 14:32:33 +01:00
fake_test.go follow go idiom and return error as second param 2017-09-21 18:04:16 +02:00
frame_util.go Alerting: Add labels to name when converting data frame to series (#28085) 2020-10-09 08:21:16 -04:00
interval_test.go Prometheus: Min step defaults to seconds when no unit is set to prevent errors when running alerts. (#30966) 2021-02-09 10:23:38 +01:00
interval.go Prometheus: Min step defaults to seconds when no unit is set to prevent errors when running alerts. (#30966) 2021-02-09 10:23:38 +01:00
models.go Datasource: Use json-iterator configuration compatible with standard library (#30732) 2021-01-29 15:31:19 +01:00
query_endpoint.go Chore: Remove dead code (#28664) 2020-11-05 11:00:00 +01:00
request_test.go Chore: Convert tsdb request test to standard library (#29936) 2020-12-20 11:53:28 +01:00
request.go Chore: Fix issues reported by staticcheck; enable stylecheck linter (#28866) 2020-11-05 15:37:11 +01:00
time_range_test.go Chore: Enable whitespace linter (#25903) 2020-07-06 20:17:28 +02:00
time_range.go Core: add location option to parse timerange (#24796) 2020-05-19 08:52:43 +02:00