grafana/public
Sofia Papagiannaki dc9ec7dc91
Auth: Allow expiration of API keys (#17678)
* Modify backend to allow expiration of API Keys

* Add middleware test for expired api keys

* Modify frontend to enable expiration of API Keys

* Fix frontend tests

* Fix migration and add index for `expires` field

* Add api key tests for database access

* Substitude time.Now() by a mock for test usage

* Front-end modifications

* Change input label to `Time to live`
* Change input behavior to comply with the other similar
* Add tooltip

* Modify AddApiKey api call response

Expiration should be *time.Time instead of string

* Present expiration date in the selected timezone

* Use kbn for transforming intervals to seconds

* Use `assert` library for tests

* Frontend fixes

Add checks for empty/undefined/null values

* Change expires column from datetime to integer

* Restrict api key duration input

It should be interval not number

* AddApiKey must complain if SecondsToLive is negative

* Declare ErrInvalidApiKeyExpiration

* Move configuration to auth section

* Update docs

* Eliminate alias for models in modified files

* Omit expiration from api response if empty

* Eliminate Goconvey from test file

* Fix test

Do not sleep, use mocked timeNow() instead

* Remove index for expires from api_key table

The index should be anyway on both org_id and expires fields.
However this commit eliminates completely the index for now
since not many rows are expected to be in this table.

* Use getTimeZone function

* Minor change in api key listing

The frontend should display a message instead of empty string
if the key does not expire.
2019-06-26 09:47:03 +03:00
..
app Auth: Allow expiration of API keys (#17678) 2019-06-26 09:47:03 +03:00
dashboards Revert "Updated home dashboard, removed home dashboard header" 2019-01-28 15:01:42 +01:00
e2e-test Tests: Replaces e2e tests truth screenshot (#17609) 2019-06-17 13:41:29 +02:00
emails Fix: Alert email variable name typo fixed (#16232) 2019-03-27 09:42:20 +01:00
fonts Chore: fix modes for non-executable files (#16864) 2019-05-03 09:51:53 +02:00
img Updated explore icon and style tweaks 2019-02-18 18:26:24 +01:00
sass UserAdmin: UI for disabling users (#17333) 2019-06-25 18:49:12 +02:00
test Explore: Parses and updates TimeSrv in one place in Explore (#17677) 2019-06-25 13:44:19 +01:00
vendor TimePicker: New time picker dropdown & custom range UI (#16811) 2019-06-24 14:39:59 +02:00
views Fix: HTML meta tags fix for iOS (#16269) 2019-03-28 09:23:43 +01:00
robots.txt add support for robots.txt file 2015-06-15 19:02:38 -04:00