Commit Graph

265 Commits (bd1edaafebf7980ef16858110a084017d135bde9)

Author SHA1 Message Date
Chris Goller 94fd7ef164 Update influxql AST parsing to return full binary exprs (#1380) 2017-05-03 15:57:19 -07:00
Chris Goller 6ee108d5b7 Update swagger.json to mention queryConfig's range 2017-05-02 15:20:06 -05:00
Chris Goller e6aab20617 Add Range.Lower and Range.Upper to query config to persist custom ranges 2017-05-02 15:08:51 -05:00
Chris Goller b48448fdef Update /queries endpoint to handle templates 2017-04-28 15:12:28 -05:00
Luke Morris 9a198bb5dc Remove unused dependencies from dashboard_test.go 2017-04-28 12:57:16 -07:00
Hunter Trujillo 0d1c416c98 Merge branch 'master' into feature/template-variables
# Conflicts:
#	bolt/internal/internal.pb.go
#	ui/src/CheckSources.js
#	ui/src/dashboards/actions/index.js
#	ui/src/dashboards/containers/DashboardPage.js
#	ui/src/data_explorer/components/Visualization.js
#	ui/src/shared/components/AutoRefresh.js
#	ui/src/shared/components/Dropdown.js
2017-04-25 17:08:55 -06:00
Jade McGough 50914024ea make kapacitor patching work 2017-04-21 12:42:35 -07:00
Jade McGough 87af3b44a4 persist the currently active kapacitor in boltdb 2017-04-21 12:42:35 -07:00
Jade McGough 7a5457644a WIP 2017-04-21 12:39:41 -07:00
Jade McGough 17ff852d94 add kapacitors to AllRoutes 2017-04-21 12:39:41 -07:00
Jade McGough 2a0dee6536 clean up kapacitor swagger docs 2017-04-21 12:39:40 -07:00
Chris Goller 3ca35dc721 Remove extra debug info in the dashboard testing 2017-04-20 16:31:00 -05:00
Chris Goller fee966da28 Add measurements and databases to template variables 2017-04-20 14:32:02 -05:00
Chris Goller b38ee73c6b Update templates API response 2017-04-20 12:22:55 -05:00
Chris Goller abc5ad0b17 Add more validation checks to dashboard updates 2017-04-20 11:47:31 -05:00
Chris Goller e44f716543 Add initial template CRUD operations 2017-04-20 11:09:56 -05:00
Chris Goller ac0ba1334e Move dashboard cells into cells.go 2017-04-20 09:24:57 -05:00
Chris Goller 9075c0da83 Add swagger documentation for template variables 2017-04-19 12:09:22 -05:00
Chris Goller 76fdbc9d55 Merge branch 'master' into feature/refreshing-jwts 2017-04-17 15:24:10 -05:00
Chris Goller 3c6f0db623 Update oauth2 Authenticator signatures to use extend 2017-04-17 11:49:45 -05:00
Chris Goller 017b01d384 Update tests for refreshing jwts 2017-04-14 02:35:30 -05:00
Chris Goller 7c048e8135 Add JWT refresh on validation.
JWTs will only life five minutes into the future.  Any time
the server receives an authenicated request, the JWT's expire at
will be extended into the future.
2017-04-14 02:12:52 -05:00
Andrew Watkins 99a36cb586 Add default RP to queryConfig when no RP is present
This will only happen if the qC is fully qualified.  A fully
qualified query is one that has a db, measurement, and field.
2017-04-13 17:49:53 -07:00
Andrew Watkins 4ef7ff2dc5 Merge pull request #1232 from influxdata/feature/voltron-the-builder
Voltron the builder / One Builder to Rule Them All / Make Builder Great Again
2017-04-13 09:49:45 -07:00
Fred Cox 183a0e0f28 Fix env var name for Google client secret 2017-04-11 16:48:35 +03:00
Hunter Trujillo fd672f0f05 Use backend IDs for great justice. 2017-04-10 12:02:09 -06:00
Chris Goller 65231c2409 Update rawtext in queryconfig to be null and not omitempty 2017-04-07 17:32:10 -05:00
Chris Goller 84e9e0018a Update queries endpoint to return InfluxQL, queryConfig, queryAST 2017-04-07 16:58:56 -05:00
Chris Goller 8d5dcc3ec7 Fix JSON typos in swagger.json 2017-04-07 16:35:05 -05:00
Chris Goller 2f01e567c4 Merge branch 'master' into feature/structured-queries
Conflicts:
	Godeps
	LICENSE_OF_DEPENDENCIES.md
	server/mux.go
	server/routes.go
	ui/.eslintrc
2017-04-07 16:06:24 -05:00
Chris Goller f0acd1b7e0 Merge branch 'master' into feature/generic-oauth 2017-04-07 15:35:28 -05:00
Chris Goller eb5b288e00 Fix PathEscape work for go 1.7 2017-04-07 15:32:35 -05:00
Chris Goller 65b4789227 Update generic oauth routes to be path escaped. 2017-04-07 15:20:53 -05:00
Chris Goller 84f1263357 Add configurable scopes to generic oauth2 support 2017-04-07 14:58:35 -05:00
Chris Goller 51fdcdb944 Merge branch 'master' into feature/generic-oauth 2017-04-07 08:39:52 -05:00
John Gilden f050b5adc6 Use the Host header from the original Kapacitor URL 2017-04-07 08:15:19 -05:00
Chris Goller 1b189c1eab Update cell dashboard error messags to be descriptive 2017-04-06 17:30:53 -05:00
Chris Goller e81a569de5 Merge branch 'master' into feature/generic-oauth 2017-04-06 16:47:58 -05:00
Chris Goller 4a56fdddfc Add generic oauth2 configuration options 2017-04-06 16:45:33 -05:00
Luke Morris d6fab042ed Merge branch 'master' into hotfix/1193-influxql-no-quotes 2017-04-06 13:51:15 -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
Chris Goller 8ec4c2a32f Workaround InfluxQL bugs by returning original query. 2017-04-06 00:06:15 -05:00
Timothy J. Raymond 42ad7e407a Merge pull request #1168 from influxdata/feature/tr-mountable-router
Prefix all Chronograf routes with Basepath when configured
2017-04-04 17:45:31 -04:00
lukevmorris 2d023c2650 Admin Databases Page no longer breaks if a db is missing an rp (#1179)
* retentionPolicies could be a blank array

* Update CHANGELOG

* Add `retentionPolicies` to swagger docs
2017-04-04 14:42:24 -07:00
Tim Raymond 23c5ff061f Remove unnecessary conditional tests
Re-mounting should only happen if the --prefix-routes option is set. If
this happens, the result will be a no-op as intended since the
--basepath will be "". MountableRouter and http.StripPrefix are both
no-ops with prefix set to ""
2017-04-04 16:29:48 -04:00
Tim Raymond a8dbbf0f0f Favor http.StripPrefix over home-rolled version
http.StripPrefix is a standard library handler which is designed to do
exactly what the inline http.HandlerFunc did (with almost the same
implementation).
2017-04-04 14:03:46 -04:00
Tim Raymond 3177d4ef3c Bypass URLPrefixer if http.Flusher is unavailable
In certain situations, the http.ResponseWriter passed to the URLPrefixer
may not be an http.Flusher. A simple case where this may occur is if the
Prefixer has been wrapped up in a middleware where the above middleware
wraps the ResponseWriter in a ResponseWriter that doesn't implement the
Flush method.

Previously, the Prefixer would error, which would cause the request to
fail with a 500. Instead, the condition is logged and the request is
passed unmodified to the next middleware in the chain. This effectively
disables prefixing for requests where the above ResponseWriter is not an
http.Flusher.

Misc. Changes
=============

- Some tests for "builders" were moved to server/builders_test.go to
  follow with convention. We've been naming files after different things
  under test and leaving the file matching the package name for support
  objects-in this case a mock logger was added to that file.
2017-04-04 10:33:14 -04:00
Tim Raymond d75ee187e6 Add parameter to control mounting behavior
Some load balancers will strip prefixes on their way to the chronograf
backend, others won't. The "--prefix-routes" parameter forces all
requests to the backend to have the prefix specified in "--basepath".
Omitting it will only cause routes to be rewritten in rendered
templates and assumes that the load balancer will remove the prefix.

Use with Caddy
==============

An easy way to test this out is using the free Caddy http server at
http://caddyserver.com.

This Caddyfile will work with the options `--basepath /chronograf
--prefix-routes` set:

```
localhost:2020 {
  proxy /chronograf localhost:8888
  log stdout
}
```

This Caddyfile will work with only the option `--basepath /chronograf`
set:

```
localhost:2020 {
  proxy /chronograf localhost:8888 {
    except /chronograf
  }
  log stdout
}
```
2017-04-04 10:28:46 -04:00
Tim Raymond f35de37257 Use MountableRouter when Basepath is set
This breaks compatibility with the old behavior of --basepath, so this
requires that proxies be configured to not modify routes forwarded to
backends. The old behavior will be supported in a subsequent commit.
2017-04-03 17:09:05 -04:00
Tim Raymond 84cc43cc77 Implement a MountableRouter
The httprouter used in Chronograf did not support prefixing every route
with some basepath. This caused problems for those using the --basepath
parameter in combination with a load balancer that did not strip the
basepath prefix from requests that it forwarded onto Chronograf.

To support this, MountableRouter prefixes all routes at definition time
with the supplied prefix.
2017-04-03 17:06:21 -04:00