Commit Graph

1227 Commits

Author SHA1 Message Date
Sean Lafferty f3c52710df Make recently used auth_module test more robust by adding another 'log in' 2019-03-14 08:40:19 -04:00
Sean Lafferty 8d19ca005f Merge branch 'master' into 12556-oauth-pass-thru 2019-03-13 14:25:43 -04:00
Sean Lafferty de338338bf Remove todo about index on user_id in user_auth because it exists 2019-03-13 13:46:49 -04:00
Sean Lafferty f17307bb97 Always return most recently used auth_module from GetAuthInfo 2019-03-13 11:29:13 -04:00
Sean Lafferty d922285ab8 Move oauth token migrations in user_auth_mig 2019-03-11 09:31:03 -04:00
bergquist 66e71b66dd renames key to cache_key
apparently key is a reserved keyword in mysql.
and the error messages doesnt mention that.
can I please have 6h back?
2019-03-11 10:49:55 +01:00
Carl Bergquist f3753712e0 Revert "Fix Datasource Update to no User/Password" 2019-03-11 07:22:54 +01:00
Marcus Efraimsson e3b3062107 add nil/length check when delete old login attempts 2019-03-08 13:31:46 +01:00
bergquist d99af23946 add garbage collector for database cache 2019-03-08 09:09:27 +01:00
bergquist d4f5789660 cache: initial version of db cache 2019-03-08 09:09:27 +01:00
Marcus Efraimsson f845a3b841 upgrade xorm packages to latest versions 2019-03-05 21:11:23 +01:00
Carl Bergquist 71bfefa8fb Merge pull request #15608 from Maddin-619/fix-datasource-update
Fix Datasource Update to no User/Password
2019-03-05 14:38:32 +01:00
bergquist ae9327ff3a remove UseBool since we use AllCols 2019-03-05 13:41:40 +01:00
Marcus Efraimsson d49f0bedd3 fix: prevent datasource json data stored as nil (#15508)
prevent datasource json data stored as nil

closes #14239
2019-03-02 21:18:26 +01:00
bergquist 8a3a3cccc3 moves metric package to /infra
ref #14679
2019-02-24 21:12:51 +01:00
Maddin-619 09cd173e92 updates all cols except created so user and password
of the database can be chaned to no user and password
2019-02-22 14:19:15 +01:00
bergquist 3ce99bca66 renames usage state name for auth token
as noted, sessions might not be a good name for this metrics.
while devices would be a better name for users I think we should
align the name with the code as much as possible. The ui listing
all auth_tokens per user should probarbly say "devices" instead
2019-02-11 11:08:31 +01:00
bergquist 2be60887ca adds usage stats for sessions 2019-02-07 16:27:40 +01:00
Marcus Efraimsson d433ca7d40 fix util for splitting host and port
Now you can provide both a default host and a default port
2019-02-04 13:10:32 +01:00
Sean Lafferty fa22311a95 base64 encode encrypted oauth token fields 2019-02-02 09:03:04 -05:00
Sean Lafferty 4a7cf82f5f Remove length from text columns 2019-02-01 19:45:27 -05:00
Sean Lafferty 5a59cdf0ef Add oauth pass-thru option for datasources 2019-02-01 19:40:57 -05:00
Torkel Ödegaard 9a598be4f7 Fixed failing unit test 2019-01-29 21:17:56 +01:00
Torkel Ödegaard 416562bd90 Merge pull request #15102 from mjtrangoni/fix-golint-issues
Fix golint issues
2019-01-29 21:12:34 +01:00
Torkel Ödegaard a2dd6f378f fixed sqlite issue introduced by #14709 2019-01-29 20:27:01 +01:00
Marcus Efraimsson a067862a0a Merge pull request #14709 from tpetr/extra-connection-string-args
add support for defining additonal database connection string args
2019-01-29 20:13:17 +01:00
Carl Bergquist c6f80ecec2 Merge pull request #14229 from pbakulev/configurable-alert-notification
Configurable alert notification
2019-01-28 22:47:12 +01:00
Mario Trangoni b7628f2060 pkg/util/{filepath.go,shortid_generator.go}: Fix golint issues
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=golint  ./...
filepath.go:12:5⚠️ error var WalkSkipDir should have name of the form ErrFoo (golint)
shortid_generator.go:11:5⚠️ var validUidPattern should be validUIDPattern (golint)
shortid_generator.go:19:6⚠️ func IsValidShortUid should be IsValidShortUID (golint)
shortid_generator.go:24:6⚠️ func GenerateShortUid should be GenerateShortUID (golint)
2019-01-28 22:37:44 +01:00
Mario Trangoni 8261613b51 pkg/util/{ip.go,url.go}: Fix some golint issues
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=golint  ./...
ip.go:8:6⚠️ func SplitIpPort should be SplitIPPort (golint)
url.go:14:6⚠️ func NewUrlQueryReader should be NewURLQueryReader (golint)
url.go:9:6⚠️ type UrlQueryReader should be URLQueryReader (golint)
url.go:37:6⚠️ func JoinUrlFragments should be JoinURLFragments (golint)
2019-01-28 22:29:20 +01:00
bergquist e218cc7637 docs: updates docs to refer to using uid 2019-01-28 22:03:16 +01:00
Marcus Efraimsson ed6cca61c9 Merge pull request #15051 from ellisvlad/13711_parse_database_config_ipv6_host
Parse database host correctly when using IPv6
2019-01-28 18:32:09 +01:00
bergquist 6a8643b3d1 Merge branch 'master' into configurable-alert-notification
* master: (250 commits)
  Firing off an action instead of listening to location changes
  Changes after PR Comments
  Made ExplorerToolbar connected and refactored away responsabilities from Explore
  Removed some split complexity
  Fixed some more styling
  Fixed close split look and feel
  Fixed position of Closesplit
  Fixed small issue with TimePicker dropdown position
  Simplified some styles and dom elements
  Fixed some more with the sidemenu open and smaller screens
  Fixed so heading looks good with closed sidemenu
  Restructure of component and styling
  Refactored out ExploreToolbar from Explore
  Fixed reinitialise of Explore
  changelog: add notes about closing #13929
  changelog: add notes about closing #14558
  changelog: add notes about closing #14484
  changelog: add notes about closing #13765
  changelog: add notes about closing #11503
  changelog: add notes about closing #4075
  ...
2019-01-28 14:16:43 +01:00
Vlad Ellis 9692955d4f Correct formatting of sqlstore_test.go 2019-01-27 16:28:02 +00:00
Vlad Ellis c208186f26 Parse database host correctly when using IPv6 2019-01-25 21:56:19 +00:00
Pavel Bakulev f461d52004 Converted notification id to uid via fmt for old alert notification settings 2019-01-16 16:52:00 +02:00
Pavel Bakulev 2de32756c2 Returned id for alert notifications which were created without uid 2019-01-16 16:52:00 +02:00
Pavel Bakulev 4bcace567b Formatted errors to err 2019-01-16 16:50:00 +02:00
Pavel Bakulev f132e929ce Added uid for alert notifications 2019-01-16 16:50:00 +02:00
Marcus Efraimsson b0df7280be begin user auth token implementation 2019-01-15 15:16:20 +01:00
bergquist 8880829eda avoid infinite loop in the dashboard provisioner
if one dashboard with an uid is refered to by two
provsioners each provsioner overwrite each other.
filling up dashboard_versions quite fast if using
default settings.

ref #12864
2019-01-14 16:38:39 +01:00
Torkel Ödegaard 0a936a55b4 Fixed new gometalinter issues 2019-01-07 11:01:31 +01:00
tpetr 32dfc4e8b1 forgot go fmt 2019-01-05 00:02:15 -05:00
tpetr 5bc8d50864 pull connection string args from url instead 2019-01-04 23:52:36 -05:00
tpetr a693d42e31 add support for defining additonal database connection string args via extra_connection_string_args 2019-01-02 13:02:40 -05:00
Torkel Ödegaard 22399b336f Merge pull request #14577 from marefr/14351_db_migration
fix only create/drop database indices if not exists/exists
2018-12-31 16:20:07 +01:00
bergquist 74124ec8ed makes cache mode configurable
this makes the cache mode in the sqlite connection
string configurable. the default also changed from
shared to private to solve #107272 but allow the user
to use shared if performance is more important.

ref #10727
2018-12-27 10:48:11 +01:00
Torkel Ödegaard cbeefcd376 Merge pull request #14574 from grafana/14543_org_redirect
fix signed in user for orgId=0 result should return active org id
2018-12-19 11:31:06 +01:00
Torkel Ödegaard 36154e59b0 Merge pull request #14571 from oiooj/pr-ds-limit
Raise datasources number to 5000
2018-12-19 11:26:16 +01:00
Marcus Efraimsson 12f3c8f9d6 fix only add column if not exists for mysql 2018-12-18 23:02:08 +01:00
Carl Bergquist 854487acab Merge pull request #14441 from cinaglia/delete-external-snapshot
Add support for deleting external snapshots from Snapshots List
2018-12-18 22:43:12 +01:00