grafana/docs/sources/auth
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
..
_index.md Chore: Hugo upgrade (#17494) 2019-06-12 08:01:44 +02:00
auth-proxy.md Removing erroneous backtick in docs 2018-12-22 18:18:15 -06:00
enhanced_ldap.md LDAP:Docs: add information on LDAP sync feature and update LDAP sync default (#17689) 2019-06-25 12:54:13 +02:00
generic-oauth.md docs: Fix indentation level for OAuth2 config 2019-03-08 22:38:50 +05:30
github.md Update github.md 2018-12-17 00:24:52 +01:00
gitlab.md change enabled to true 2019-01-18 14:06:15 +01:00
google.md grafana/grafana#13340 complete oauth doc 2018-10-11 21:22:02 +02:00
ldap.md Docs: Example for multiple LDAP servers (#17216) 2019-05-22 13:53:33 +02:00
overview.md Auth: Allow expiration of API keys (#17678) 2019-06-26 09:47:03 +03:00