Commit Graph

273 Commits (abff962431f6be14ee926b04591fbc4cca29103c)

Author SHA1 Message Date
Lyon Hill a31b651057
feat(task): Add new permission lookup pattern for executor (#18920)
* feat(task): Add new permission lookup pattern for executor

We can now use the user service to populate task owners permissions.
This should improve the task lookup time and decouple the task system
from the URM system. In the future we will have the ability to better isolate
tenant pieces from the rest of the service.

* feat: add feature flagging
2020-07-13 14:47:58 -06:00
George b8f5604613
revert(tasks): Add new permission lookup pattern for executor (#18869) (#18915)
This reverts commit e9e4d794cf.
2020-07-10 11:05:07 +01:00
Lyon Hill e9e4d794cf
feat(task): Add new permission lookup pattern for executor (#18869)
We can now use the user service to populate task owners permissions.
This should improve the task lookup time and decouple the task system
from the URM system. In the future we will have the ability to better isolate
tenant pieces from the rest of the service.
2020-07-09 14:06:46 -06:00
George 4a6bc1d74f
chore: remove kv Session service and sessionsv1 bucket (#18823)
* chore: remove sessionsv1 bucket

* chore: add extra configuration to sessions.Service
2020-07-02 15:15:08 +01:00
George bb95969ccd
fix: typo in migration name (#18830) 2020-07-01 19:55:58 +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 5aeca082c8
chore: update staticcheck and fix newly identified lint checks (#18737) 2020-06-26 18:54:09 -05:00
Brett Buddin 81e4b02b42
fix(kv): Install feature-flag for switching between normal and simplified options parsing. (#18662) 2020-06-23 12:22:53 -04:00
Lyon Hill c9177b8913
feat: migrate task records to always have an owner id (#18513)
* feat: migrate task records to always have an owner id

Co-authored-by: Alirie Gray <alirie.gray@gmail.com>
Co-authored-by: George <me@georgemac.com>
2020-06-17 12:30:37 -06:00
Lyon Hill 4809285c91
fix: remove urm create from task create request. (#18519)
* fix: remove urm create from task create request.

This will greatly reduce the amount of urms created in the system. To make this change to the system we need to also remove our direct reliance on the urm's in tasks.
Remove the create and delete portion of the task actions that are creating and deleting urms
Remove reliance on urm's when we are doing FindTaskByUser and instead rely on the user filter matching the task.OwnerID

One test had to be changed because the test was explicitly hacking the task to remove the owner ID and then trying to successfully look up the task by ownerID

* fix: add in feature flag

* fix: apply cursor cleanliness and permission error handling
2020-06-17 08:20:05 -06:00
Alirie Gray ec3a857fd0
refactor: remove org service from kv dashboard service (#18504) 2020-06-16 14:03:42 -07:00
Johnny Steenbergen 003816684a chore(kv): update tracing with bucket/resource tags for store base 2020-06-05 12:45:50 -07:00
jlapacik 7db9f4c520 Merge branch 'master' into chore/merge-master 2020-05-26 10:03:42 -07:00
Alirie Gray 7f4ddabe8a
refactor: add new label package (#18078) 2020-05-21 11:30:19 -07:00
jlapacik 34e581ca0a Merge branch 'master' into chore/merge-master 2020-05-12 11:18:25 -07:00
George f9fd9d4717
refactor: remove urm and org service from check service interface definition (#17969) 2020-05-12 11:11:42 +01:00
Lyon Hill bdc882f6ce
feat(session): Build out a new session service (#17950)
This new session service has the ability to work independant of other systems
it relies on having its own store type which should allow us to be more flexible
then using the built in kv system.

I have included an in mem session store.
2020-05-11 15:04:11 -06:00
jlapacik 4aec0dc48e Merge branch 'master' into chore/update-flux 2020-05-06 10:00:09 -07:00
Johnny Steenbergen 8e52b6cf56 fix: delete unique keys when record not found
was missign this in one code path. Decided to throw this into a defer
so its always caught on exit regardless of what path it follows.
2020-05-05 11:01:13 -07:00
jlapacik 2ef9999907 Merge branch 'master' into chore/merge-master 2020-04-30 09:53:04 -07:00
Brett Buddin af4f8e40f7
fix(kv): Ensure UpdateUser cleans up the index when updating names. 2020-04-29 17:46:18 -04:00
jlapacik 63fd3655be Merge branch 'master' into chore/merge-master-into-algo-w 2020-04-22 14:52:59 -07:00
Johnny Steenbergen e5e5500401 feat(dashboards): extend dashboard update API to take cells as a put doc operation 2020-04-20 14:04:45 -07:00
jlapacik 90fb7543ce Merge branch 'master' into chore/merge-master 2020-04-16 14:43:52 -07:00
Lyon Hill c02e83038f
fix: org filtering for both kv and tenant need to match behaviors. (#17758) 2020-04-16 12:22:21 -06:00
Alirie Gray 4e690062cb
fix(labels): prevent adding duplicate labels to resources in kv (#17340) 2020-04-16 09:02:50 -07:00
jlapacik 7541af8414 chore: merge master into algow 2020-04-15 14:42:03 -07:00
George 00eb982b18
fix(kv): don't set session expiration time to earlier than existing expiration on renew session (#17751)
* chore(kv): add failing test for session renewal extension

* fix(kv): ensure renew session only updates expiration if it is newer than existing

* chore: update changelog to reflect renew session expiration fix
2020-04-15 16:45:29 +01:00
George 655f0df2d9
feat(kv): enable reading from URM by user index (#17618) 2020-04-15 10:36:39 +01:00
Lyon Hill 4421a39639
feat(tenant): Build out the onboarding system in tenant and integrate it into launcher (#17558)
We are adding in a setup/user route this is not in swagger at the moment but will be
added once we feel it is stable.
2020-04-06 15:58:15 -06:00
Jonathan A. Sternberg d3fa60991f
Merge branch 'master' into chore/merge-master 2020-04-06 12:17:47 -05: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 2840e6f26e
feat(kv): add ability to configure a max permissions using auth filter function (#17598) 2020-04-03 17:02:51 +01:00
Jonathan A. Sternberg 469c5849c4
Merge branch 'master' into feat/use-algo-w 2020-04-03 09:30:04 -05:00
George 0a7772ac93
fix(kv): update index to use new bucket.GetBatch (#17544)
* fix(kv): update index to use new bucket.GetBatch

* chore(kv): add index walk benchmark for inmem and bolt
2020-04-02 13:12:35 +01:00
Jonathan A. Sternberg f385840f3a
refactor(kv): set the default session length when not specified (#17547)
At the moment, the default session length only gets set to the default
when no service config is specified. So if a service config is used and
it does not set a value for the session length, then the session length
will be zero.

This modifies the creation of the kv service so that it will set the
default session length if the session length is set to zero (the default
value) instead of only doing it when no service config is specified.
2020-04-01 15:02:22 -05:00
George 9d5d63518d
feat(kv): add support for batch getting keys on bucket interface (#17531) 2020-04-01 17:51:35 +01:00
George 173ded1a10
fix(kv): make index walk use cursor instead of get (#17501) 2020-03-31 17:26:21 +01:00
Yiqun (Ethan) Zhang 48efdb52ea
build(flux): update Flux to v0.65.0 (#17484) 2020-03-27 18:42:19 -04:00
Lorenzo Affetti 1e36e7b3ad
feat(tenant): add duplicate read service 2020-03-25 12:06:28 +01:00
Marc Delagrammatikas 71ee028973 feat: export transactions to support importing kv as a library
Co-authored-by: Chris Goller <goller@gmail.com>
2020-03-20 11:59:11 -07:00
Marc Delagrammatikas ea8e6d15d0 refactor: fixes typo in OnboardInitialUser method
Fixes typo introduced by 7b99c28a99
2020-03-20 10:48:20 -07:00
Johnny Steenbergen 481ee1653d fix: add validation for existing resource for index store base
issue was that all checks were being made excdept for the initial check
in the entity store. fix added with tests here to validate.
2020-03-20 10:15:02 -07:00
George 6f0d769625
feat(kv): add user resource mapping by user index (#17349)
* feat(kv): add user resource mapping by user index

* feat(kv): add support for reading from URM user index when enabled
2020-03-20 11:03:00 +00:00
Lorenzo Affetti 413f7ad126
test: add tests for tenant service 2020-03-19 11:34:15 +01:00
Marc Delagrammatikas 7b99c28a99 refactor: rename Generate to OnboardInitialUser
Renaming Generate in anticipation of a new method that will onboard
users other than the initial user. The intent is to simplify multi-user
setups.

Co-authored-by: Chris Goller <goller@gmail.com>
2020-03-18 15:35:26 -07:00
George 1d400a4f0f
feat(kv): support for migrations (#17145)
* feat(kv): migration types for managing kv buckets and indexes over time

chore(kv): fixup comments in migrator types

fix(kv): initialize migrator bucket on kv service initialize

chore(kv): remove currently unused auth index

chore(kv): remove currently unused urm index

* chore(kv): move migrator tests into testing package and run for inmem and bolt

* chore(changelog): update changelog to reflect kv migrator type

* fix(kv): update auto migration store to return migratable store

* chore(kv): wrap error using func instead of defer in index

* chore(kv): rename Name method to MigrationName for clarity

* chore(kv): update migration log messages to match influxdb standard
2020-03-18 12:23:51 +00:00
Gavin Cabbage f5e8547482
fix(buckets): prevent returning system buckets to unauthorized users (#17117) 2020-03-11 13:06:08 -04:00
Greg f98874566c
fix: allow authorized label service to be called indirectly (#17111)
* fix: allow authorized label service to be called indirectly

17071 exists because pkger loads all service resources as authorized on
start, resulting in them all being authorized when referenced indirectly
(not hit directly via api by consumer). Rather than restructure pkger to
only authorize direct services, this allows proper indirect auth to
labels (the cause of 17071).

* Add orgService to tests

* Add resource types to find orgID from
2020-03-11 10:58:39 -06:00
George e25b8e5931
feat(kv): index utility type (#16910)
* feat(kv): new index type for managing kv indexes

* feat(kv): index verify diff now can produce list of corrupt foreign keys

* fix(testing): refactor kv index tests into testing package and integrate with bolt

* chore(kv): fix go lint error in index

* fix(kv): add test for index walk

* fix(kv): change index cursing strategy to reduce calls to source bkt.Get

* feat(kv): add delete and populate remove dangling foreign keys to index
2020-03-11 14:42:29 +00:00