grafana/docs/sources
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
..
administration Grafana-CLI: Wrapper for grafana-cli within RPM/DEB packages and config/homepath are now global flags (#17695) 2019-06-24 20:20:21 +01:00
alerting Chore: Hugo upgrade (#17494) 2019-06-12 08:01:44 +02:00
auth Auth: Allow expiration of API keys (#17678) 2019-06-26 09:47:03 +03:00
contribute Chore: Hugo upgrade (#17494) 2019-06-12 08:01:44 +02:00
enterprise Chore: Hugo upgrade (#17494) 2019-06-12 08:01:44 +02:00
features Graph: Add data links feature (click on graph) (#17267) 2019-06-25 11:38:51 +02:00
guides Chore: Hugo upgrade (#17494) 2019-06-12 08:01:44 +02:00
http_api Auth: Allow expiration of API keys (#17678) 2019-06-26 09:47:03 +03:00
installation Docs: Flag serve_from_sub_path as available in 6.3 (#17674) 2019-06-20 07:06:09 +02:00
permissions Chore: Hugo upgrade (#17494) 2019-06-12 08:01:44 +02:00
plugins Chore: Hugo upgrade (#17494) 2019-06-12 08:01:44 +02:00
project Chore: Hugo upgrade (#17494) 2019-06-12 08:01:44 +02:00
reference Chore: Hugo upgrade (#17494) 2019-06-12 08:01:44 +02:00
tutorials Chore: Hugo upgrade (#17494) 2019-06-12 08:01:44 +02:00
whatsnew wip: enterprise docs 2018-10-18 14:34:25 +02:00
_index.md Chore: Hugo upgrade (#17494) 2019-06-12 08:01:44 +02:00
archive.md docs: doc updates 2017-10-17 09:35:14 +02:00
jsearch.md Added grafana 1.x docs to main repo 2015-03-10 08:56:03 +01:00
search.md Added grafana 1.x docs to main repo 2015-03-10 08:56:03 +01:00
test.md Added grafana 1.x docs to main repo 2015-03-10 08:56:03 +01:00
versions.html_fragment docs(): updated download links 2016-06-23 10:35:47 +02:00