grafana/pkg/services
Eric Leijonmarck b00f3216c1
Auth: Refactor for revoking user tokens within last hours (#74616)
* fix: revoked tokens within last hours

adds check for unlimited sessions out of index
adds a function for specifing the hours to look back when revoking users tokens, otherwise we "assume" the clean up takes care of them adds a index for the `user_auth_token` - `revoked_at` for faster queries when using `revoked_at`

* fix: sqllite datetime conversion with unixtimestamps

* fix: postgres dialect

* fix: mysql dialect

* fix: mysql dialect missing closing )

* refactor: delete revoked tokens directly

* fix: tests for sqlite

* AuthToken: Simplify DeleteUserRevokedTokens and add test

* fix: linting newline

* Reset get time after test

* fix: test order by revoked

* fix: order by different db

* ascending

* test with seen at

---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2023-09-13 10:24:37 +01:00
..
accesscontrol Auth: Silence no permissions warning (#74477) 2023-09-07 10:22:31 +02:00
alerting Chore: capitalise messages for alerting (#74335) 2023-09-04 18:46:34 +02:00
annotations Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
anonymous Chore: capitalise log message for auth packages (#74332) 2023-09-04 18:49:47 +02:00
apikey Auth: Move apikey service from userSignedIn to identity.Requester interface (#74323) 2023-09-07 16:54:38 +01:00
auth Auth: Refactor for revoking user tokens within last hours (#74616) 2023-09-13 10:24:37 +01:00
authn Chore: AuthN/IdentitySynchronizer interface/impl compatibility wire fix (#74400) 2023-09-06 15:10:07 +04:00
caching Fixing typos (#70487) 2023-06-22 09:43:38 +01:00
cleanup
contexthandler Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
correlations Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
dashboardimport Plugins: Move store and plugin dto to pluginsintegration (#74655) 2023-09-11 13:59:24 +02:00
dashboards Auth: Reduce restriction with non-user accounts (#74397) 2023-09-06 13:37:54 +02:00
dashboardsnapshots Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
dashboardversion Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
datasourceproxy Plugins: Move store and plugin dto to pluginsintegration (#74655) 2023-09-11 13:59:24 +02:00
datasources Chore: capitalise logs in other backend packages (#74344) 2023-09-04 22:25:43 +02:00
encryption Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
featuremgmt Dashboard: Remove old panel code and leave only new panel design (#74196) 2023-09-12 11:54:41 +03:00
folder Folders: Do not allow modifying the folder UID via the API (#74684) 2023-09-12 14:28:33 +03:00
grafana-apiserver Chore: Fix grafana-apiserver config (#74608) 2023-09-08 17:12:12 +03:00
grpcserver Chore: make GPRCServerService private (#74612) 2023-09-08 12:44:18 -07:00
guardian Replace signed in user for identity.requester (#74048) 2023-08-30 16:51:18 +02:00
hooks Hooks: Remove AddLoginHook and RunLogin hooks (#73227) 2023-08-17 09:51:45 +02:00
kmsproviders Secrets: Make the Migrator extensible (#67307) 2023-06-19 23:44:01 +02:00
ldap Chore: capitalise log message for auth packages (#74332) 2023-09-04 18:49:47 +02:00
libraryelements Auth: Implement requester interface in access control module (#74289) 2023-09-06 11:16:10 +02:00
librarypanels Auth: Implement requester interface in access control module (#74289) 2023-09-06 11:16:10 +02:00
licensing
live Plugins: Move store and plugin dto to pluginsintegration (#74655) 2023-09-11 13:59:24 +02:00
login Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
loginattempt Chore: capitalise log message for auth packages (#74332) 2023-09-04 18:49:47 +02:00
navtree Plugins: Move store and plugin dto to pluginsintegration (#74655) 2023-09-11 13:59:24 +02:00
ngalert Alerting: Add message options for Telegram contact point (#74635) 2023-09-12 10:45:57 -04:00
notifications Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
oauthserver Chore: capitalise log message for auth packages (#74332) 2023-09-04 18:49:47 +02:00
oauthtoken Chore: capitalise log message for auth packages (#74332) 2023-09-04 18:49:47 +02:00
org Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
playlist Chore: Replace entity GRN with infra/grn GRN (#74198) 2023-08-31 15:43:35 -04:00
plugindashboards Plugins: Move store and plugin dto to pluginsintegration (#74655) 2023-09-11 13:59:24 +02:00
pluginsintegration Plugins: Angular patterns: Use ETag for GCOM requests (#74453) 2023-09-12 18:03:57 +02:00
preference Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
provisioning Plugins: Move store and plugin dto to pluginsintegration (#74655) 2023-09-11 13:59:24 +02:00
publicdashboards PublicDashboards: Return no data found instead of internal server error (#74417) 2023-09-12 20:59:28 +03:00
query Plugins: Move store and plugin dto to pluginsintegration (#74655) 2023-09-11 13:59:24 +02:00
queryhistory Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
quota Plugins: Move store and plugin dto to pluginsintegration (#74655) 2023-09-11 13:59:24 +02:00
rendering Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
screenshot Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
search Search API: Search by folder UID (#65040) 2023-08-04 12:43:47 +03:00
searchusers Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
searchV2 Chore: capitalise log messages for app platform (#74336) 2023-09-04 18:46:08 +02:00
secrets Chore: remove IsDisabled method for access control (#74340) 2023-09-05 11:04:39 +01:00
serviceaccounts Chore: capitalise log message for auth packages (#74332) 2023-09-04 18:49:47 +02:00
shorturls Chore: Add errutils helpers (#73577) 2023-08-22 12:52:24 +02:00
signingkeys Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
sqlstore Auth: Refactor for revoking user tokens within last hours (#74616) 2023-09-13 10:24:37 +01:00
star Auth: Move star service to identity interface (#73114) 2023-08-10 17:17:27 +02:00
stats Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
store Plugins: Move store and plugin dto to pluginsintegration (#74655) 2023-09-11 13:59:24 +02:00
supportbundles Plugins: Move store and plugin dto to pluginsintegration (#74655) 2023-09-11 13:59:24 +02:00
tag
team Chore: Implement requester in util pkg (#74105) 2023-08-31 09:46:55 +02:00
temp_user Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
updatechecker Plugins: Move store and plugin dto to pluginsintegration (#74655) 2023-09-11 13:59:24 +02:00
user Auth: Reduce restriction with non-user accounts (#74397) 2023-09-06 13:37:54 +02:00
validations