Commit Graph

14 Commits (7e90245dba84647fd40404cfef28d339408010df)

Author SHA1 Message Date
Michael Desa 2d7828b602 Nest user routes under organization
Add global user routes
2018-01-16 16:45:58 -05:00
Michael Desa b360591cb9 Add rawUsers route to AllLinks 2018-01-10 11:18:08 -05:00
Michael Desa 2151413ece 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 5c813493ea Add config.self & config.auth routes, update client routes & make PATCH a PUT 2017-12-13 13:54:23 -08:00
Jared Scheib 5038f8532b 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 fd66c8a227 Fix routes tests 2017-11-01 14:09:58 -04:00
Jared Scheib 81ada5315c Only test one CustomLink to avoid map key order failing test 2017-06-26 16:12:54 -05:00
Jared Scheib 6e59d8ce34 Add custom links to routes test 2017-06-26 16:00:27 -05:00
Jared Scheib 7e359239e5 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 2c5e7ef0d6 Add test for all routes with ExternalLinks 2017-06-14 16:22:30 -07:00
Jared Scheib 25bde527a6 Add status-feed-url build flag within new externalLinks prop in AllRoutes 2017-06-13 13:40:20 -07:00
Jared Scheib 6806f62ac0 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 337c7b16a5 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 9df1630cf8 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 298a8c47e1.

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 b4773c15af.

* 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