Commit Graph

14 Commits (cba5baffeda0d0e0c06dd6f1a762bb6711495e11)

Author SHA1 Message Date
Michael Desa 6168dc3e06 Nest user routes under organization
Add global user routes
2018-01-16 16:45:58 -05:00
Michael Desa 4c33cf7846 Add rawUsers route to AllLinks 2018-01-10 11:18:08 -05:00
Michael Desa b41816c5cd Add /chronograf/v1/env endpoint to expose env vars
Some environment variables are needed by the front end. This PR
introduces a route so that those environment variables can be exposed.
Additionally, a new environment variable TELEGRAF_SYSTEM_INTERVAL was
added. This env var controls the rate at which the host list page will
update its red/green status.
2018-01-03 11:52:40 -08:00
Jared Scheib a54712f600 Add config.self & config.auth routes, update client routes & make PATCH a PUT 2017-12-13 13:54:23 -08:00
Jared Scheib 1e42cd6e0e Add /config link to AllRoutes handler
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-12-12 15:11:30 -08:00
Michael Desa eb845b1630 Fix routes tests 2017-11-01 14:09:58 -04:00
Jared Scheib def34560e0 Only test one CustomLink to avoid map key order failing test 2017-06-26 16:12:54 -05:00
Jared Scheib 81aa909329 Add custom links to routes test 2017-06-26 16:00:27 -05:00
Jared Scheib 7a6131bd40 Refactor statusFeedURL to be set in CLI 'default'
Reverts to a clean separation of concerns between mux.go vs AllRoutes
AllRoutes now expects a StatusFeed url directly
2017-06-15 13:51:22 -07:00
Jared Scheib 95e2c18c5a Add test for all routes with ExternalLinks 2017-06-14 16:22:30 -07:00
Jared Scheib f63cba3581 Add status-feed-url build flag within new externalLinks prop in AllRoutes 2017-06-13 13:40:20 -07:00
Jared Scheib cb394dd716 Refactor /chronograf/v1 to not return logoutLink if not using auth
Use logoutLink to determine if logout menu item is shown

Signed-off-by: Chris Goller <güllère@gmail.com>
2017-05-30 17:34:55 -07:00
Tim Raymond & Jared Scheib dcbe44d9ce Fix OAuth when using Basepath
Updated the logout link in the UI to use a link provided by the
/chronograf/v1/ endpoint. We also replaced many instances of string
concatenation of URL paths with path.Join, which better handles cases
where prefixed and suffixed "/" characters may be present in provided
basepaths. We also refactored how Basepath was being prefixed when using
Auth. Documentation was also updated to warn users that basepaths should
be applied to the OAuth callback link when configuring OAuth with their
provider.
2017-05-08 14:40:50 -07: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