Dan Cech
790e1feb93
Chore: Update test database initialization ( #81673 )
...
* streamline initialization of test databases, support on-disk sqlite test db
* clean up test databases
* introduce testsuite helper
* use testsuite everywhere we use a test db
* update documentation
* improve error handling
* disable entity integration test until we can figure out locking error
2024-02-09 09:35:39 -05:00
Ryan McKinley
025b2f3011
Chore: use any rather than interface{} ( #74066 )
2023-08-30 18:46:47 +03:00
Jo
4821175d40
Auth: Add auth.azure_ad security improvements ( #912 )
...
* security improvements id_token
* add audience validation
* add allowOrganizations
* add allowOrganizations tests and documentation
* add log warn on no configuration
* anonymize tenant id
* Apply suggestions from code review
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-security/configure-authentication/azuread/index.md
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* Update pkg/login/social/azuread_oauth_test.go
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* Update pkg/login/social/azuread_oauth_test.go
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* optimize key validation and add mising fields
* fix missing key_id
* lint
* Update docs/sources/setup-grafana/configure-security/configure-authentication/azuread/index.md
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* lint docs
---------
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2023-06-23 09:13:38 +02:00
Sofia Papagiannaki
caac9838d8
Build: Fix Redis/Memcached integration tests ( #64298 )
...
* Build: Fix integration cache tests
* Allow REDIS_URL with scheme
* Reduce cache integration tests timeout to 5m
* Apply suggestion from code review
* Run redis/memcached integration tests in OSS pipelines
* Change redis image
2023-04-05 11:55:55 +03:00
Carl Bergquist
6d5688ed94
remotecache: set secret service on encryptionstorage ( #64849 )
...
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2023-03-15 20:19:35 +01:00
Carl Bergquist
eb507dca89
Remotecache: rename setbytearray/getbytearray to set/get and remove codec ( #64470 )
...
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2023-03-10 13:57:29 +01:00
Jo
4ee389676e
RemoteCache: Cleanup infra remote cache ( #64381 )
...
* add warning on Count
* add usagestats service
* fix typo
* remove unused glog
* remote cache stats collect
* add encrypt usage stat
* rename handler
* Update pkg/infra/remotecache/remotecache.go
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update pkg/infra/remotecache/remotecache_test.go
---------
Co-authored-by: Dan Cech <dcech@grafana.com>
2023-03-09 09:26:13 +01:00
Carl Bergquist
7c55dbf37d
Remotecache: Migrates get/set calls to use bytearrays and remove get/set functions ( #63525 )
...
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2023-03-08 17:08:57 +01:00
Jo
ff78103a24
Authn: Anon session service ( #63052 )
...
* add anon sessions package
* add usage stat fn
* implement count for cache
* add anonservice to authn broker
* lint
* add tests for remote cache count
* move anon service to services
* wrap tagging in goroutine
* make func used
2023-02-21 16:21:18 +01:00
Serge Zaitsev
f1fb202284
Chore: Add encryption codec to the remote cache ( #59871 )
...
* add encryption codec to the remote cache
* change config files too
* fix test constructor
* pass codec into the test cache
2022-12-06 15:12:27 +01:00
Serge Zaitsev
3978502d83
Chore: Remote cache key prefix ( #59838 )
...
* attempt to implement a remote cache key prefix
* add a test for the prefix store
* oh, linter
2022-12-06 13:20:49 +01:00
Kristin Laemmert
05709ce411
chore: remove sqlstore & mockstore dependencies from (most) packages ( #57087 )
...
* chore: add alias for InitTestDB and Session
Adds an alias for the sqlstore InitTestDB and Session, and updates tests using these to reduce dependencies on the sqlstore.Store.
* next pass of removing sqlstore imports
* last little bit
* remove mockstore where possible
2022-10-19 09:02:15 -04:00
idafurjes
56c3875bb9
Chore: Remove context.TODO ( #43458 )
...
* Remove context.TODO() from services
* Fix live test
2021-12-28 10:26:18 +01:00
idafurjes
b8852ef6a3
Chore: Remove context.TODO() ( #43409 )
...
* Remove context.TODO() from services
* Fix live test
* Remove context.TODO
2021-12-22 11:02:42 +01:00
Arve Knudsen
78596a6756
Migrate to Wire for dependency injection ( #32289 )
...
Fixes #30144
Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: spinillos <selenepinillos@gmail.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: Leonard Gram <leo@xlson.com>
2021-08-25 15:11:22 +02:00
Arve Knudsen
b5379c5335
Chore: Fix SQL related Go variable naming ( #28887 )
...
* Chore: Fix variable naming
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-11 06:21:08 +01:00
Arve Knudsen
a5d9196a53
Chore/fix lint issues ( #27704 )
...
* Chore: Fix linting issues
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-22 16:22:19 +02:00
Arve Knudsen
7349a6b96c
pkg/infra: Check errors ( #19705 )
...
* pkg/infra: Check errors
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* pkg/infra: Handle errors
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/infra/usagestats/usage_stats.go
Co-Authored-By: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2019-10-10 16:42:11 +02:00
Carl Bergquist
3f136e0da9
tech: replace bmizerany/assert with stretchr/testify ( #16625 )
...
bmizerany is old and unsupported. so we are replacing it
with stretchr which is an drop in replacement and something
we want to use more in Grafana.
2019-04-17 10:25:58 +02:00
Carl Bergquist
490515aec6
build: partially replace gometalinter with golangci-lint ( #16610 )
...
we still use gometalinter for goconst since it doesn't
report errors for duplicated in test files
2019-04-16 10:27:07 +02:00
Oleg Gaidarenko
67cbc7d4cf
Chore: use remote cache instead of session storage ( #16114 )
...
Replaces session storage in auth_proxy middleware with remote cache
Fixes #15161
2019-04-08 14:31:46 +03:00
bergquist
c001cfe1d9
dont allow inifinite expiration
2019-03-14 09:22:03 +01:00
bergquist
5186273731
return error if cache type is invalid
2019-03-14 08:57:38 +01:00
bergquist
b2967fbb37
avoid exposing cache client directly
2019-03-11 10:49:56 +01:00
bergquist
7e7427637c
renames distcache -> remotecache
2019-03-11 10:49:55 +01:00