Serge Zaitsev
43f40e6c7c
Chore: Replace yaml.v2 with yaml.v3 ( #59897 )
...
* replace yaml.v2 with yaml.v3
* fix a few tests due to the yaml.v3 api changes
* and another goconvey mistake in tests
2022-12-06 21:17:17 +01:00
idafurjes
ef651daed2
Use org service instead of sqlstore ( #56407 )
...
* Use org service instead of sqlstore
* Remove methods from sqlstore
* Remove commented out code
* Fix lint
* Fix lint 2
2022-10-13 08:40:46 -04:00
Jo
ca72cd570e
Remove ioutil.ReadDir from usage ( #53550 )
...
* add depguard rule for ioutil
* replace ioutil.ReadDir with os.ReadDir
* use legacy option in depguard supported in golangci-lint v1.40
* replace ioutil.ReadDir with os.ReadDir
* return error for file info
2022-08-11 07:21:12 -04:00
Jo
062d255124
Handle ioutil deprecations ( #53526 )
...
* replace ioutil.ReadFile -> os.ReadFile
* replace ioutil.ReadAll -> io.ReadAll
* replace ioutil.TempFile -> os.CreateTemp
* replace ioutil.NopCloser -> io.NopCloser
* replace ioutil.WriteFile -> os.WriteFile
* replace ioutil.TempDir -> os.MkdirTemp
* replace ioutil.Discard -> io.Discard
2022-08-10 15:37:51 +02:00
Kristin Laemmert
945f015770
backend/datasources: move datasources models into the datasources service package ( #51267 )
...
* backend/datasources: move datasources models into the datasources service pkg
2022-06-27 12:23:15 -04:00
Serge Zaitsev
a231c6861c
Chore: Remove bus.Dispatch from provisioning services ( #44989 )
...
* make getordbyname a method
* remove one dispatch from plugins provisioner
* remove bus from the plugins provisioner, skip test for now
* remove bus from datasource provisioning
* resolve tests in notifier provisioning
* remove bus from the dashboards provisioning service
* fix missing struct field
* fix getorgbyid method calls
* pass org store into dashboard provisioner
* fix test function prototype
* fix tests
* attempt to fix tests after the rebase
* fix integration test
* avoid using transaction
* remove comments
2022-02-23 11:12:37 +01:00
maicon
8e03541228
Provisioning: Ensure that the default value for orgID is set when provisioning datasources to be deleted ( #44244 )
...
Fixes #44243
Signed-off-by: Maicon Costa <maiconscosta@gmail.com >
2022-02-09 12:38:13 +01:00
Yuriy Tseretyan
35b0067650
Populate missing UID of provisioned data source only for new records ( #42999 )
...
* defer updating empty UID to insert command
* change logging to use the command
2021-12-13 14:14:39 -05:00
Ryan McKinley
7ef05588ea
Provisioning: set stable datasource UID with provisioning ( #41769 )
2021-11-18 01:18:08 +01:00
idafurjes
47f6bb3583
Chore: Add context to org ( #40685 )
...
* Add context to org
* Rebase
* Fix rebase
2021-11-03 11:31:56 +01:00
Arve Knudsen
f326b79cc1
Security: Add gosec G304 auditing annotations ( #29578 )
...
* Security: Add gosec G304 auditing annotations
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com >
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com >
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com >
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com >
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com >
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com >
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com >
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com >
* Add gosec annotations
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com >
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com >
* Add gosec annotations
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com >
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com >
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com >
* Add gosec annotations
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* space
Signed-off-by: bergquist <carl.bergquist@gmail.com >
* Add gosec annotations
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
Co-authored-by: bergquist <carl.bergquist@gmail.com >
2020-12-03 22:13:06 +01:00
Maksim Nabokikh
ba2524cd88
Provisioning: Add validation for missing organisations in datasource, dashboard, and notifier configurations ( #26601 )
...
* Provisioning: Check that org. from config exists
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com >
* Apply suggestions from code review
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
* Fix some code after applying suggestions
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com >
* Add negative test case
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com >
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
2020-07-30 12:59:12 +03:00
Maksim Nabokikh
a1f40195be
Provisioning: Validate that datasource access field equals to direct or proxy ( #26440 )
...
* Validate that datasource access field equals to allowed value (direct or proxy)
2020-07-20 10:01:25 +02:00
Arve Knudsen
d4e4cb4c71
Chore: Enable Go linter gocritic ( #26224 )
...
* Chore: Enable gocritic linter
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
2020-07-16 14:39:01 +02:00
Carl Bergquist
7610d5717a
Provisioning: Use proxy as default access mode in provisioning ( #24669 )
...
fixes #24591
fixes #19501
2020-05-14 12:40:00 +02:00
Carl Bergquist
0fd5945542
Fixes linting errors in datasource provisioning. ( #23515 )
2020-04-11 21:07:07 +02:00
zhulongcheng
2fff8f77dc
move log package to /infra ( #17023 )
...
ref #14679
Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com >
2019-05-13 08:45:54 +02:00
Andrej Ocenas
66f6e16916
Security: Store datasource passwords encrypted in secureJsonData ( #16175 )
...
* Store passwords in secureJsonData
* Revert unnecessary refactors
* Fix for nil jsonSecureData value
* Remove copied encryption code from migration
* Fix wrong field reference
* Remove migration and provisioning changes
* Use password getters in datasource proxy
* Refactor password handling in datasource configs
* Add provisioning warnings
* Update documentation
* Remove migration command, moved to separate PR
* Remove unused code
* Set the upgrade version
* Remove unused code
* Remove double reference
2019-04-15 11:11:17 +02:00
Marcus Efraimsson
b4267eafb8
log root cause error when reading from provisioning directories
2019-02-07 15:46:57 +01:00
Marcus Efraimsson
aed89b49c0
should allow one default datasource per organisation using provisioning
2018-08-14 14:48:14 +02:00
Mario Trangoni
91fb2e07ce
pkg: fix codespell issues
2018-04-13 20:31:29 +02:00
bergquist
4dc6074e79
provisioning: dont ignore sample yaml files
...
closes #10963
2018-02-20 08:40:37 +01:00
bergquist
dba087463a
provisioing: always skip sample.yaml files
2018-02-14 11:33:58 +01:00
bergquist
165304a342
provisioning: handle nil configs
2018-02-14 11:22:24 +01:00
bergquist
84de76ff0a
provisioning: code formating
2018-02-14 10:30:08 +01:00
bergquist
44baaeed8f
provisioning: adds logs about deprecated config format
2018-02-14 10:30:08 +01:00
bergquist
4a35244cb9
provisioning: support camcelCase provisioning files
2018-02-14 10:30:08 +01:00