Commit Graph

42 Commits (0fc47bc6921f247a5373761b9f2c0094a30cc068)

Author SHA1 Message Date
Brandon Farmer 2e0749b3ba feat(influxdb): Add system buckets on org creation
* Only allow users to create user buckets
* Only accept bucket creation parameters on post
2019-10-21 14:48:47 -07:00
Chris Goller bb72fdeae0 test(http): add unit tests for /api/v2/write
We have been tracking down odd error messages when writing data and
found the problem to be internal server errors when writing empty
bodies.

I added fairly comprehensive test coverage for /api/v2/write as well
as simplify and clarify the error messages.
2019-09-12 13:39:24 -05:00
Michael Desa 515df68a83
fix(http): add return after returning system bucket errror 2019-09-10 09:47:44 -04:00
Jade McGough 6e6e7fef9b
feat(http): block writes to system buckets (#14920) 2019-09-05 11:22:18 -07:00
Jakub Bednář b6b5befad7
fix(http): The org parameter takes either the ID or Name interchangeably (#14540) 2019-08-06 06:20:26 +02:00
Kelvin Wang 9ecada4dce feat(http): convert errorEncode to use interface 2019-06-26 21:41:01 -04:00
Christopher M. Wolff c35c15f54d
refactor(http): move queryd http interface to idpe (#13862) 2019-05-09 10:41:14 -07:00
Ben Johnson 272f340c30
Merge point parse & explode. 2019-04-24 10:12:15 -06:00
Michael Desa e00c071c2c
feat(influxdb): add query/write http event recorders
feat(http): add prometheus counters for tracking write/query usage

feat(http/metric): add metric recoder for recording http metrics

feat(prometheus): implement metric.Recorder for prometheus metrics

fix(prometheus): remove erroneous fmt.Printlns

feat(http): add prometheus registry to API backend

This was done as exposing prometheus metrics to a higher level was quite
difficult. It was much simple to simply pass the registry down to
anything that needs it.

feat(cmd/influxd/launcher): pass prom registry in on api backend

feat(http): collect metrics for write and query endpoints

This was much messier than I would have preferred. Future work is
outlined in TODOs.

review(influxdb): rename metric.Metric to metric.Event
2019-04-17 08:33:31 -04:00
Jacob Marble 603a1f26e0 use tracing.StartSpanFromContext 2019-03-07 12:12:31 -07:00
Jacob Marble 9541e861a3 goimports -w -local github.com/influxdata/influxdb 2019-03-07 12:12:31 -07:00
Jacob Marble 92fa813c45 add spans to multiple services 2019-03-07 12:12:31 -07:00
Ben Johnson 12d35f1a50
Revert "Merge point parse & explode."
This reverts commit 1004abc3e1.
2019-03-02 06:23:04 -07:00
Ben Johnson 1004abc3e1
Merge point parse & explode. 2019-03-01 15:55:37 -07:00
Michael Desa 0d3d0d4d78
chore(influxdb): add context to storage.PointsWriter 2019-02-25 11:11:20 -05:00
zhulongcheng c283b068ed feat(http): construct write handler by WriteBackend 2019-02-06 19:18:23 +01:00
Kelvin Wang 875162abd3 update(http): remove check error true 2019-01-25 10:29:27 -08:00
zhulongcheng acbb47781e pr review changes 2019-01-22 21:24:05 +08:00
zhulongcheng edf8dfad52 fix(http): convert write error 2019-01-22 11:28:15 +08:00
Mark Rushakoff 3e1551334f fix(http): ensure response body always closed
This avoids leaking resources.

Found by manually inspecting results of `git grep -A5 -F '= hc.Do'`.
2019-01-18 14:55:48 -08:00
Michael Desa f66774a766 fix(http): use wrapped org/bucket services only when required
return reasonable error message for http errors on write
2019-01-16 19:03:08 -05:00
Michael Desa c60031a6b7 fix(influxdb): change resource to resource type 2019-01-15 12:57:57 -05:00
Michael Desa 944de4157a fix(influxdb): add org id to permissions
filter out resources that have mission IDs

fix(influxdb): simplify auth check in PermissionAllowed

review(platform): update as noted in review

fix(influxdb): ensure permission has valid org id
2019-01-11 12:23:28 -05:00
Mark Rushakoff d73d73c0d4 chore: rename imports from platform to influxdb
I did this with a dumb editor macro, so some comments changed too.

Also rename root package from platform to influxdb.

In interest of minimizing risk, anyone importing the root package has
now aliased it to "platform" so that no changes beyond imports were
necessary in those files.

Lastly, replace the old platform module to local path /dev/null so that
nobody can accidentally reintroduce a platform dependency while
migrating platform code to influxdb.
2019-01-09 20:51:47 -08:00
Andrew Watkins 3429e8d0c6
feat(auth): rewrite authorization service (#2157)
* feat(view-token-overlay): add view token overlay

* test(tokens): update tests

* chore(auths): rename mock data file

* feat(token-view): clicking on description opens token view modal

* feat(token-view): add ability to close overlay

* feat(token-view): display token permissions with updated permissions shape

* feat(token-view): wip update authorization and permission shapes

* feat(auth): wip refactor auth permissions

* fix(auth): generate permissions via functions

* fix(auth): make Id ID

* chore(types): update generated client

* feat(auth): wip add user and org names to auth

* fix(user): didnt save rebase

* feat(auth): WIP refactor auth

* feat(auth): check for user existence during auth creation

* feat(auth): org must exist during auth creation

* fix(auth): pluralize telegrafs resource type

* docs(http): update swagger definition for the Authorization

* test(auth): fix broken tests

* docs(swagger): update cur_swagger Authrorizations

* fix(api): remove trace from cur_swag

* test(ui/token): update components with new generated type definitions

* feat(http): add lookup service adding names for permissions

* fix(http): remove debugging panics

* chore: go tidy

* fix: unsaved rebase

* test(idpe): add ids to Authorizations for log tests
2018-12-28 15:02:19 -08:00
Kelvin Wang ddaa602014 fix(http): convert write endpoint error 2018-12-21 20:19:30 -05:00
zhulongcheng 5f40883342 add custom-404 handler 2018-12-16 22:55:39 +08:00
Michael Desa 407c01cb17 fix(platform): use authorizer instead of authorizion for endpoints
feat(platform): add ToPermissions method to user resource mapping

The ToPermissions method returns a set of permissions that is granted
via a user resource mapping.

feat(bolt): resolve sessions permissions on lookup

feat(http): use authorizer instead of authorization service for write api

feat(bolt): create user resource mappings for org users in bucket create

feat(bolt): create user resource mapping for first org/user

fix(platform): use authorizer for query endpoint instead of authorization

test(http): use cmp instead of reflect for decode test
2018-11-20 10:56:58 -08:00
Chris Goller d2ecf8aad6 http(write): support timestamp precision 2018-10-25 21:23:50 -05:00
Chris Goller d62e2e009a test(http): add tests for write client 2018-10-25 19:13:53 -05:00
Chris Goller 6f4bd54afc feat(http): add http write client 2018-10-25 19:11:12 -05:00
Jeff Wendling 260ed3eb13 chore: don't depend on details of what platform.ID is
It may become a uint64 in the future, for example. This does mean
that we have to call Decode on some data that we just Encoded, but
we can fix that later.
2018-10-08 12:31:39 -06:00
Edd Robinson 81e0fbabeb Integrate WAL into engine 2018-10-05 12:44:27 +01:00
Jeff Wendling 6a0fc9237c Read/write points with the appropriate measurement 2018-10-03 17:39:30 -06:00
Jeff Wendling 6176671ecb Change how the write and query handlers look at auth 2018-10-03 15:55:56 -06:00
Michael Desa 1a0c29ad34 feat(platform): add authorizer interface
This iterface is supposed to be something that both sessions and
authorizations can share so that other components can authorize requests
as they see fit.
2018-10-02 14:11:44 -04:00
Lorenzo Fontana 1a2f606533
Convert everything to /api/v2
Signed-off-by: Lorenzo Fontana <lo@linux.com>
2018-09-28 14:23:21 +02:00
Chris Goller b48fad0c4e
Merge pull request #771 from influxdata/feature/query
feat(http): add flux endpoint /v2/query influx
2018-09-06 11:27:54 -05:00
Jade McGough 43e0d143e7
chore(http): return early if a critical error occurs in write path org/bucket lookup (#767) 2018-09-05 15:53:57 -07:00
Chris Goller 37bd273acd feat(http): add flux endpoint /v2/query influx 2018-09-04 16:08:00 -05:00
Mark Rushakoff eb24f2d780 fix(http): fix compile error from outdated merge 2018-08-30 09:16:07 -07:00
Jade McGough b39ba889e4
feat(http): add write path (#682)
feat(http): Add write path with embedded NATS streaming server
2018-08-29 16:15:39 -07:00