Commit Graph

122 Commits (c1975c20208ef520210a00704a53e26a6fe8217b)

Author SHA1 Message Date
Michael Desa 394673c54b
Merge pull request #2367 from influxdata/fix/issue#2252
Add org admin and member specific permissions
2019-01-09 17:54:20 -05:00
Leonardo Di Donato 740723ae16 chore(bolt): revisit telegraf configs to support org 2019-01-09 22:17:19 +01:00
Michael Desa 0ec22953df fix(testing:bolt:inmem): add org admin permissions during onboarding generate 2019-01-09 11:43:58 -05:00
Michael Desa ead4a0a170 fix(bolt): grand first user org admin privileges during onboarding 2019-01-09 10:35:50 -05:00
Michael Desa 857b60150e feat(platform): add proto service for creating templated resources
feat(http): add http handler for proto service

feat(mock): add mock proto service

test(http): add proto handler tests

fix(platform): add view as option when adding a cell

feat(platform): add dashboard to proto struct

feat(fs): add filesystem implementation of proto

feat(http): add protos endpoints to api handler

feat(cmd/influxd/launcher): add protos path to server

doc(http): add protos to swagger

test(cmd/influxd/launcher): add --protos-path to launcher tests

fix(fs): remove unused args from test

fix(http): use platform.Error where appropriate
2019-01-09 09:55:15 -05:00
Michael Desa 338e0587d0 fix(platform): nest view beneath dashboard cell
feat(platform): add functional options for platform errors

fix(testing): set dashboard ids properly in dashboard tests

feat(bolt): add dashboard specific views

fix(bolt): delete view when cell is removed or dashboard is deleted
2019-01-08 18:11:13 -05:00
Kelvin Wang f392f1bab0 fix(bolt): fix auth status update error 2019-01-04 12:21:34 -05:00
Kelvin Wang de708f3e98 fix(bolt): check org id exists before create bucket 2019-01-03 15:20:13 -05:00
Kelvin Wang 739d12bc00 fix(http): convert source errors 2019-01-03 11:38:01 -05: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
Michael Desa 4c60eacb58 chore(platform): cleanup, document, and use secret service
fix(http): add members/secrets/labels links on org response

fix(http:cmd/influxd): use secret service in api backend

fix(bolt): return empty list if there are no secrets for an org

chore(vault): add description of vault usage
2018-12-28 11:11:21 -05:00
Chris Goller c4f6f729fd fix(inmem): user service now filters by id
Related: #2072
2018-12-26 21:38:18 -06:00
Kelvin Wang 003561148d fix(platform): remove creator and time 2018-12-21 11:05:55 -05:00
Leonardo Di Donato 3ade9bd3a5 feat(bolt): session refactoring for platform errors 2018-12-21 09:56:23 +01:00
Jade McGough 3ee90eefc2
Merge pull request #2085 from influxdata/label-properties
Label properties
2018-12-20 14:16:51 -08:00
Michael Desa ce88906188 fix(platform): make onboarding token "<user name>'s token" 2018-12-20 16:46:21 -05:00
Jade McGough 7cf03bc1de address PR comments 2018-12-20 13:41:20 -08:00
Jade McGough f89a7f1f4a create label properties map and allow for patching of it 2018-12-20 12:52:48 -08:00
Jade McGough 1a10ae701a remove colors from labels 2018-12-20 12:18:03 -08:00
Kelvin Wang 726cf3cdd6 fix(platform): fix the pointer alloc for telegraf config 2018-12-20 12:45:45 -05:00
Kelvin Wang f1c562f848 fix(http): view errors endpoint conversion 2018-12-19 16:54:48 -05:00
Kelvin Wang 1f983f7896 fix(http): convert view errors 2018-12-19 16:54:48 -05:00
Michael Desa 28cea4d957 feat(platform): add generic kv store
Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

feat(kv): add kv store interface for services

feat(bolt): add boltdb implementation of kv.Store

spike(platform): add kv backed user service

feat(kv): add static cursor

Note here that this operation cannot be transactionally done. This poses
a bit of issues that will need to be worked out.

fix(bolt): use error explicit error message

squash: play with interface a bit

fix(kv): remove commit and rollback from kv interface

feat(inmem): add inmem kv store

chore: add note for inmem transactions

fix(bolt): remove call to tx in kv store tests

feat(kv): add tests for static cursor

doc(kv): add comments to store and associated interfaces

doc(bolt): add comments to key value store

feat(testing): add kv store tests

test(testing): add conformance test for kv.Store

test(inmem): add kv.Store conformance tests

doc(inmem): add comments to key value store

feat(inmem): remove CreateBucketIfNotExists from Tx interface

feat(bolt): remove CreateBucketIfNotExists from Tx

feat(inmem): remove CreateBucketIfNotExists from Tx

doc(kv): add note to bucket interface about conditions methods can be called

feat(kv): add context methods to kv.Tx

feat(bolt): add context methods to bolt.Tx

feat(inmem): add context methods to inmem.Tx

test(kv): add contract tests for view/update transactions

feat(kv): ensure that static cursor is always valid

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

fix(kv): remove error from cursor methods

test(kv): remove want errors from cursor test

test(testing): add concurrent update test for kv.Store

feat(kv): make kv user service an example service

fix(testing): add concurrnent update test to the kv.Store contract tests

test(platform): fix example kv service tests

dep(platform): make platform tidy
2018-12-18 16:08:48 -05:00
Jade McGough 74a64d9a46 fix more error responses 2018-12-18 09:22:48 -08:00
Jade McGough d5bf127648 remove name updates 2018-12-18 01:41:47 -08:00
Jade McGough bafee9c475 add put fn for bolt labels 2018-12-18 01:06:28 -08:00
Jade McGough 5036777750 use new error library 2018-12-17 23:59:04 -08:00
Jade McGough 01a5aff7e3 feat(http): add ability to update labels 2018-12-17 23:00:57 -08:00
kelwang 48fe377af3
Merge pull request #1926 from influxdata/convert_dashboard_error
fix(http): convert dashboard errors
2018-12-17 13:01:25 -05:00
Kelvin Wang 4cabda439e fix(http): convert scraper target error 2018-12-17 09:08:19 -05:00
Kelvin Wang 6ca7c68e2e fix(http): convert dashboard errors 2018-12-13 14:36:46 -05:00
zhulongcheng 8522c93063 fix(http): convert macro errors 2018-12-13 23:11:52 +08:00
Kelvin Wang 831fc8697b fix(http): convert user errors 2018-12-11 20:11:26 -05:00
Jade McGough 2a615712a6
Feat/filter view type (#1781)
* update swagger

* WIP filter views on type

* add GetType to view interface
2018-12-07 17:15:24 -08:00
Andrew Watkins 3655947bd1
feat(auth): add description string to Authorization
* feat(auth): add description key to Authorization

* chore(swagger): update Authorization definition to include description
2018-12-07 14:22:23 -08:00
Jade McGough 6451d7cca2
chore(platform): use a constant for label not found error (#1782) 2018-12-07 10:25:11 -08:00
Kelvin Wang 2b602bfcfe fix(http): convert org errors endpoint 2018-12-06 11:05:13 -05:00
Jade McGough 8c961e12bb
Labels (#1668)
* feat(platform): add label struct

* feat(platform): add label service interface

* WIP label service

* chore(http): simplify URMapping validation

* WIP label service skeleton

* add new GET labels handler

* feat(http): add POST handler for label service

* feat(http): add label delete handler

* fix json tag

* add happy path testing

* feat(http): add label endpoints to dashboard service

* make fmt

* add label delete handler

* make fmt again :(

* feat(bolt): add label implementation

* wire boltdb implementation of labels

* feat(mock): add mock for label service

* fix tests, add delete test

* add remaining tests, flesh out GET params

* unused code

* remove comments

* add labels endpoints

* clean up labels after deleting a dashboard

* fix issues from code review

* WIP remove type from labels

* feat(http): add label cli functions

* fixes

* make fmt

* feat(http): add labels to tasks and buckets

* feat(bolt): remove labels if their resources are deleted

* remove bolt cleanup for now

* make fmt

* type conversion magic

* feat(inmem): implement label service

* prevent race conditions

* remove labels from inmem if their resources are deleted

* fix race condition

* fix formatting
2018-12-03 08:07:08 -08:00
Jade McGough 873aae3fad
Revert "feat(http): add label service" (#1667)
This reverts commit 70a430c599.
2018-12-03 04:27:27 -08:00
Jade McGough 70a430c599
feat(http): add label service (#1346) 2018-11-30 21:08:35 -08:00
Michael Desa 56de056085 feat(vault): add vault implementation of secret service
test(platform): run testcontainer integration tests for nightly release

Integration tests for the vault secret service using testcontiners
should not run along with unit tests, however, they should run on some
regular schedule. This commit introduces `make test-integration` which
runs integration tests for vault using testcontainers. The command introduced
relies on docker being available on the host it is executed on.

chore(platform): make go modules tidy

chore: try to fix go mod

chore(platform): remove explicit logrus dependency

chore(platform): run go mod tidy

chore(platform): replace github.com/Sirupsen/logrus with github.com/sirupsen/logrus

chore(platform): update docker dependency

feat(vault): add vault implementation of secret service

test(platform): run testcontainer integration tests for nightly release

Integration tests for the vault secret service using testcontiners
should not run along with unit tests, however, they should run on some
regular schedule. This commit introduces `make test-integration` which
runs integration tests for vault using testcontainers. The command introduced
relies on docker being available on the host it is executed on.

chore(platform): make go modules tidy

chore: try to fix go mod

chore(platform): run go mod tidy

feat(vault): add vault implementation of secret service

chore(platform): make go modules tidy

feat(platform): add Put/Patch/Delete methods on secret service

feat(vault): add Put/Patch/Delete methods on vault secret service

feat(http): add http handler methods for secret service

feat(bolt): add Put/Delete/Patch methods to bolt secret service

feat(testing): add tests for Put/Patch/Delete methods in secret service

feat(mock): add mock secret service

feat(http): add tests for secrets endpoints

feat(http): update swagger for secrets endpoints

chore: run go mod tidy
2018-11-30 13:07:32 -08:00
kelwang 6db9acc951
Revert "Revert "convert /buckets endpoint error to platform error "" 2018-11-30 13:27:40 -05:00
Edd Robinson b81b30ee87 Ensure error don't end in punctuation: ST1005 2018-11-30 10:54:24 +00:00
Edd Robinson 9403c1ec8e Ensure error strings not capitalised ST1005 2018-11-30 10:54:24 +00:00
kelwang 2a57dc1970
Revert "convert /buckets endpoint error to platform error " 2018-11-29 12:02:32 -05:00
Kelvin Wang 232d9d71e3 fix(http): fix bucket errors 2018-11-29 09:58:56 -05: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
Kelvin Wang 1c3ba481eb leo's proposed change 2018-11-16 19:33:20 -05:00
Kelvin Wang 25eebd0084 fix(http): convert auth errors 2018-11-16 19:33:20 -05:00
Kelvin Wang 8d15d70360 fix(http): convert auth errors 2018-11-16 19:30:34 -05:00