Commit Graph

46 Commits (ab589cc326e151fd73f9bb8f184cfd0047c777b8)

Author SHA1 Message Date
Daniel Moran 00afd95cb7
refactor: automated move of errors and id from root to kit (#21101)
Co-authored-by: Sam Arnold <sarnold@influxdata.com>
2021-03-30 14:10:02 -04:00
George MacRorie 16d916a952 refactor(kv): delete deprecated kv service code
This includes removal of a lot of kv.Service responsibilities. However,
it does not finish the re-wiring. It removes documents, telegrafs,
notification rules + endpoints, checks, orgs, users, buckets, passwords,
urms, labels and authorizations. There are some oustanding pieces that
are needed to get kv service compiling (dashboard service urm
dependency). Then all the call sites for kv service need updating and
the new implementations of telegraf and notification rules + endpoints
needed installing (along with any necessary migrations).
2020-11-16 12:41:26 +00:00
Daniel Moran 15b9531273
fix: correct various typos (#19987)
Co-authored-by: kumakichi <xyesan@gmail.com>
2020-11-11 13:54:21 -05:00
George 5cbe74630e
chore(tenant): make tenant and kv both conform with harness (#19266) 2020-08-11 15:56:42 +01:00
George 96d84b9126
refactor: migrator and introduce Store.(Create|Delete)Bucket (#18570)
* refactor: migrator and introduce Store.(Create|Delete)Bucket

feat: kvmigration internal utility to create / managing kv store migrations

fix: ensure migrations applied in all test cases

* chore: update kv and migration documentation
2020-07-01 12:08:20 +01:00
Jonathan A. Sternberg 0ae8bebd75
refactor: rewrite imports to include the /v2 suffix for version 2 2020-04-03 12:39:20 -05:00
George f239a2ed9c
fix(kv): remove URM and Authorizations by UserID Index (#16852)
* Revert "fix(kv): Don't stop when key not found from index."

This reverts commit bd9167d383.

* Revert "fix(kv): push down org ID to skip in delete URM (#16841)"

This reverts commit a5f508de77.

* Revert "fix(kv): delete authorization from correct index bucket (#16835)"

This reverts commit 7349216e94.

* Revert "feat(kv): Index Authorizations by User ID (#16818)"

This reverts commit df36fe957b.

* Revert "feat: add indexes to urm for user lookups (#16789)"

This reverts commit 9561d0a4f4.
2020-02-13 15:27:57 +00:00
George df36fe957b
feat(kv): Index Authorizations by User ID (#16818)
* feat(kv): add user id index on authorizations

* chore(auths): test FindAuthorizations both with and without a populated index

* chore(kv): cleanup index skipping flag in auths service

* fix(kv): bad flag around auth by user index population

* fix(kv): auth by user index lookup use correct buckets

* chore(kv): ensure indexer is called as expected when auth user index missing

* chore(kv): add benchmarks around authorization lookup
2020-02-11 17:34:20 +00:00
Johnny Steenbergen 2b0b32abe8 chore(http): pull out eror handler into kit pkg for portability 2020-02-03 12:39:47 -08:00
Johnny Steenbergen e6f1805e5e chore(inmem): nuke the duplicative inmem store
use kv store... its a thing
2019-12-30 11:04:45 -08:00
Johnny Steenbergen 1c2b900687 chore(http): refactor auth service http client to use httpc.Client
normalizing the auth service http client to follow suit with other services.
2019-12-17 12:18:16 -08:00
Jacob Marble 5f19c6cace
chore: Remove several instances of WithLogger (#15996)
* chore: Remove several instances of WithLogger

* chore: unexport Logger fields

* chore: unexport some more Logger fields

* chore: go fmt

chore: fix test

chore: s/logger/log

chore: fix test

chore: revert http.Handler.Handler constructor initialization

* refactor: integrate review feedback, fix all test nop loggers

* refactor: capitalize all log messages

* refactor: rename two logger to log
2019-12-04 15:10:23 -08:00
George 3dbb9c0fd2
feat(tracing): dont trace spans with full request paths as operation name in ExtractFromHTTPRequest (#15971)
* feat(tracing): dont trace spans with full URL path names in ExtractFromHTTPRequest

* chore(multiple): replace all occurrences of julienschmidt/httprouter with influxdata/httprouter
2019-11-25 15:22:19 +01:00
Ariel Salem 3ba8eaac3e
feat(createdAt): Added createdat and updatedAt to Authorization (#15784)
* feat(auth): add createdAt and updatedAt to authorization

Co-Authored-By: Ariel <ariel.salem1989@gmail.com>

* feat(auth): passing createAuth tests

* test: ensured that createdAt and updatedAt are valid on authorizations
2019-11-07 06:46:30 -08:00
Brandon Farmer d83fabeabc feat(influxdb): user disabling 2019-09-23 11:57:16 -07:00
Kelvin Wang 9ecada4dce feat(http): convert errorEncode to use interface 2019-06-26 21:41:01 -04:00
Jade McGough c27a96da9a
chore(http): surface unmarshaling failures in tests (#13855) 2019-05-08 12:51:03 -07:00
Jade McGough 0d81a1ebdd fix(http): don't include nil values when auth responses are skipped 2019-04-23 14:34:04 -07:00
kelwang be674622c6
Revert "fix(inmem): remove the old inmem implementation" 2019-04-09 14:24:40 -04:00
zhulongcheng cacd6a8223 fix(inmem): replace inmem.Service with kv.Service 2019-04-08 15:18:38 +08:00
Kelvin Wang a2c0bdbe77 feat(kv): add new update 2019-03-28 11:46:41 -04:00
Michael Desa 386c70ea0d fix(influxdb): revert functionality added in pr#10947 2019-02-06 15:54:09 -05:00
zhulongcheng 385cca43b7 feat(http): construct authorization handler by AuthorizationBackend 2019-02-06 19:18:23 +01:00
Kelvin Wang 79ce30691e update(http): remove kerrors, change the default to be influxdb error 2019-01-25 10:29:26 -08:00
Chris Goller 49782c3be4 feat(bolt): add metrics for resources stored in boltdb 2019-01-18 17:45:45 -06:00
Michael Desa c60031a6b7 fix(influxdb): change resource to resource type 2019-01-15 12:57:57 -05:00
Michael Desa a3541b22d4 feat(http): allow user id to be specified explicitly on authorization
test(http): get user off of session in create authz test

fix(http): allow user id to be specified explicitly on authorization

create authorization now allows specifying user id explicitly. If no
user id is specified then we use the user id from the authorizer.

fix(http): use influxdb import

fix(http): use platform error in http auth tests

feat(cmd/influx): allow create auth command to specify user explicitly

feat(http): add org id to permissions
2019-01-14 10:20:20 -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
Kelvin Wang f392f1bab0 fix(bolt): fix auth status update error 2019-01-04 12:21:34 -05:00
Jade McGough 7562c9a6d2
chore(http): make test diffs more readable (#2203)
* chore(http): make test diffs more readable

* fixes

* add back telegraf output spacing

* whitespace hell

* jsonEqual2 -> jsonEqual
2019-01-03 14:29:22 -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
Leonardo Di Donato b8153e83d1 feat(http): test an authorization for non-existing user cannot be created 2018-12-21 19:23:12 +01:00
zhulongcheng 94d86186c7 fix(http): rename auths to authorizations 2018-12-18 00:12:16 +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
Kelvin Wang 8d15d70360 fix(http): convert auth errors 2018-11-16 19:30:34 -05:00
Chris Goller 2bea48f15a refactor(testing): rename MustIDFromString to MustIDBase16 2018-10-11 09:54:19 -05:00
Leonardo Di Donato d54fdd51e0 wip(http): porting to uint64 IDs
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-10-11 09:54:18 -05: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
Lorenzo Fontana aa8016feca
Convert tests to v2
Signed-off-by: Lorenzo Fontana <lo@linux.com>
2018-09-28 14:20:31 +02:00
Chris Goller 31a2ed1fbb feat(testing): add service testing helpers 2018-09-14 21:08:49 -05:00
Chris Goller e0b1f89423 chore(http): remove unneeded function 2018-09-14 19:34:00 -05:00
Chris Goller 01950e9942 fix(http): update tests to use context.Background() 2018-09-14 19:24:32 -05:00
Chris Goller 235836f4c4 fix(http): remove org parameter and add client tests 2018-09-14 18:03:38 -05:00
Chris Goller 29a1eb4714 test(http): add client tests for auth and bucket 2018-09-14 13:18:02 -05:00
Michael Desa 6d083fb8e3 feat(http): add links to auth service response structures 2018-09-12 11:44:44 -04:00