Commit Graph

34 Commits (4fd4bd019f814db68215df7cfeec5f1dad613a5e)

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 f646653b1b
refactor!: replace authorizer.Allowed method with PermissionSet (#17959)
* refactor!: replace Allow method with PermissionSet

* chore(changelog): update changelog to reflect changes to authorizer
2020-05-13 12:27:46 +01:00
Alirie Gray 2c0916addf
refactor: create new token package (#17874) 2020-04-30 07:52:21 -07: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
George 9f5390e449
feat(auth): add jwt support in auth middleware (#15152) 2019-09-27 12:12:41 +01:00
Todd Persen cd64ec8718 Fix typos in miscellaneous packages 2019-04-17 13:30:22 -07:00
zhulongcheng d5917878d0 feat(http): find auths by org 2019-04-14 18:06:19 +08:00
Kelvin Wang 712010d013 if(influxdb): updated auth shall return 2019-04-01 12:56:29 -04:00
Kelvin Wang a2c0bdbe77 feat(kv): add new update 2019-03-28 11:46:41 -04:00
Mark Rushakoff caf08b5078 feat(task): store authorization ID with task
Accept token when creating or updating a task, but only report back the
authorization ID.

This means the executor and the platform adapter are now both aware of
an Authorization Service.
2019-02-14 08:53:40 -08: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
Michael Desa bef148ffd2 fix(platform): check for matching ids when permission matching 2019-01-09 11:16:02 -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
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
Kelvin Wang 74ef984e53 add http for telegraf 2018-10-30 14:00:10 -04:00
Chris Goller b4e1cd4199 tests(http): add tests for creation without IDs 2018-10-12 10:03:06 +02:00
Michael Desa e64fde585e fix(idpe): add IsActive method back into platform for idpe 2018-10-02 14:11:44 -04:00
Michael Desa 3eb6b35478 test(http): test http authentication middleware
Co-authored-by: Chris Goller <goller@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-10-02 14:11:44 -04:00
Michael Desa 42ba7ffe11 feat(http): add authentication handler middleware 2018-10-02 14:11:44 -04: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
Michael Desa 6d083fb8e3 feat(http): add links to auth service response structures 2018-09-12 11:44:44 -04:00
Chris Goller 40e56333e1 refactor(http): update authorization to use active/inactive status 2018-08-29 13:07:39 -05:00
Chris Goller 8fa72fa35b feat(auth): allow authorizations to be enabled/disabled 2018-08-29 13:07:38 -05:00
Lyon Hill f718b9cdca
feat(task): create validation layer for TaskService (#591)
* feat(task): create validation layer for TaskService
2018-08-20 15:15:04 -06:00
Michael Desa 8c87c9d132 revert #442 2018-08-01 14:54:32 -04:00
Leonardo Di Donato 3191de776d Refactoring code using platform.IDs
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-08-01 18:20:59 +02:00
Leonardo Di Donato 0b235b38cc Refinements to delete authorization refactoring and tests 2018-08-01 18:20:59 +02:00
Leonardo Di Donato a5465f6416 Entities IDs are now pointers to platform.ID 2018-08-01 18:20:59 +02:00
Michael Desa f654b59662 feat(platform): add boltdb implementation of services
feat(platform): add id to authorization

feat(platform): add user arg to CreateAuthorization method on auth svc

migrate(platform): move idp command to platform directory

This comit did not move the ifql command as it depends on the query
service which has yet to be migrated.

feat(platform): add optional user name to authorization struct

feat(platform): add organization name to bucket struct

Additionally allow filtering buckets by organization name.

feat(prom): ensure that prom auth svc implement base interface

feat(prometheus): add user to create authorization method

feat(prom): drop user string from create authorization

feat(zap): ensure that zap auth svc implements base service interface

feat(zap): add user to create authorization method

feat(zap): drop user string from create authorization

feat(http): add ids to authorization service

feat(http): ensure that http authoriztaion service implements auth svc interface

feat(http): use authorization ids in authorization handler

squash(http): add check for http status accepted in authorization service

feat(http): clean up authorization service and handlers

feat(http): drop user string from create authorization

fix(http): normalize the http authorization service

feat(http): normalize bucket service and handler methods

Additonally, we added support for DELETE bucket

feat(http): add delete user handler

Additionally, there was a bit of general cleanup

feat(http): add delete route for organization handler and service

Did a bit of additional cleanup of the http code.

test(testing): add service conformance tests

test(testing): add organization service conformance tests

test(testing): add conformance test for orgs service

Additionally, there was a bit of cleanup in the users service tests

test(testing): add conformance test for authorizations service

test(testing): update auth tests to validate that user exists

test(testing): update authorization conformance tests with user name

test(testing): update bucket conformance tests to include organizations

feat(bolt): add bolt implementation services

feat(bolt): add bolt implementation of organization service

feat(bolt): add bolt implementation of users service

feat(bolt): add bolt implementation of authorization service

feat(bolt): add user to create authorization method

feat(bolt): drop user string from create authorization

fix(bolt): set user name on authorization after put

feat(bolt): update bucket servie to include organizations

feat(bolt): add dependent destroy of resources

feat(cmd/idpd): use bolt services in platform server

feat(cmd/idpd): use bolt organization service in platform server

feat(cmd/idpd): use bolt users service in plaform server

feat(cmd/idpd): use bolt client as authorization service

feat(cmd/idp): show user name in output of auth sub command

feat(cmd/idp): clean up bucket subcommand of idp command

fix(cmd/idp): normalize idp command output for users

fix(cmd/idp): normalize auth subcommand output

feat(cmd/idp): add support for delete organiztion command

migrate(idp): move ifql subcommand of idp to platform
2018-05-21 10:08:22 -04:00
Michael Desa eabba6986d migrate(platform): move public dependencies into platform
migrate(context): move context package to platform

migrate(kit/errors): move errors package to platform

migrate(mock): move mock package to platform

migrate(prometheus): move prometheus package to platform

migrate(rand): move rand package to platform

migrate(snowflake): move snowflake package to platform

migrate(testing): move testing package to platform

migrate(zap): move zap package to platform

migrate(http): move http package to platform

migrate(platform): rename base package idpe to platform

git(base): add gitignore

dep: add dependencies

migrate(platform): remove consumer.go

migrate(platform): make secret things private again
2018-05-14 17:12:53 -04:00