Commit Graph

7 Commits (ece512c631d6c130b6db58acdfb324a700329e26)

Author SHA1 Message Date
Benjamin Schweizer 30d03f78b6 added test cases for ValidClaims() 2017-12-13 16:00:21 +01:00
Benjamin Schweizer b17c89f755 updated existing test cases to interface changes 2017-12-13 15:55:21 +01:00
Chris Goller e098045a92 Fix JWTs for auth-durations less than 5 mins (#1318)
* WIP

* Fix JWTs for auth-durations less than 5 mins

For auth-duration = 0 the JWT now understands that there does not
need to be duration checks.

For auth-duration < 5 minutes > 0 the JWT lifespan will be 1/2
of auth-duration to allow one extension

There is likely a range of very short auth-duration times like, say,
less than 5 seconds that would never allow a person to login simply
because the time of issue and request is longer.

* Update changelog
2017-04-20 17:33:08 -07:00
Chris Goller 9b40e39775 Add tests for token extend 2017-04-17 14:49:05 -05:00
Chris Goller 45e9508d31 Update oauth2 Authenticator signatures to use extend 2017-04-17 11:49:45 -05:00
Chris Goller 1fabed5039 Update tests for refreshing jwts 2017-04-14 02:35:30 -05:00
Jared Scheib ac4423a6fd Add new auth duration CLI option; add client heartbeat; fix logout (#1119)
* User can now set oauth cookie session duration via the CLI to any duration or to expire on browser close

* Refactor GET 'me' into heartbeat at constant interval

* Add ping route to all routes

* Add /chronograf/v1/ping endpoint for server status

* Refactor cookie generation to use an interface

* WIP adding refreshable tokens

* Add reminder to review index.js Login error handling

* Refactor Authenticator interface to accommodate cookie duration and logout delay

* Update make run-dev to be more TICKStack compliant

* Remove heartbeat/logout duration from authentication

* WIP Refactor tests to accommodate cookie and auth refactor

* Update oauth2 tests to newly refactored design

* Update oauth provider tests

* Remove unused oauth2/consts.go

* Move authentication middleware to server package

* Fix authentication comment

* Update authenication documentation to mention AUTH_DURATION

* Update /chronograf/v1/ping to simply return 204

* Fix Makefile run-dev target

* Remove spurious ping route

* Update auth docs to clarify authentication duration

* Revert "Refactor GET 'me' into heartbeat at constant interval"

This reverts commit 298a8c47e1431720d9bd97a9cb853744f04501a3.

Conflicts:
ui/src/index.js

* Add auth test for JWT signing method

* Add comments for why coverage isn't written for some areas of jwt code

* Update auth docs to explicitly mention how to require re-auth for all users on server restart

* Add Duration to Validation interface for Tokens

* Make auth duration of zero yield a everlasting token

* Revert "Revert "Refactor GET 'me' into heartbeat at constant interval""

This reverts commit b4773c15afe4fcd227ad88aa9d5686beb6b0a6cd.

* Rename http status constants and add FORBIDDEN

* Heartbeat only when logged in, notify user if heartbeat fails

* Update changelog

* Fix minor word semantics

* Update oauth2 tests to be in the oauth2_test package

* Add check at compile time that JWT implements Tokenizer

* Rename CookieMux to AuthMux for consistency with earlier refactor

* Fix logout middleware

* Fix logout button not showing due to obsolete data shape expectations

* Update changelog

* Fix proptypes for logout button data shape in SideNav
2017-04-06 11:40:57 -07:00