Joe Porpeglia
90754d4fa9
Remove strict validation from PermissionCriteria schemas
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-04-18 12:38:29 -04:00
Vincenzo Scamporlino
63902fcc17
PermissionEvaluator: rename query to authorizeConditional
...
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev >
2022-04-08 12:29:00 +02:00
Vincenzo Scamporlino
6ca16bdf2d
Apply suggestions from code review
...
Co-authored-by: Joe Porpeglia <josephp@spotify.com >
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev >
2022-04-08 12:29:00 +02:00
Vincenzo Scamporlino
b4af8664b5
api report and minor fixes
...
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev >
2022-04-08 12:29:00 +02:00
Vincenzo Scamporlino
173aadff5b
Avoid PermissionEvaluator breaking changes
...
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev >
2022-04-08 12:29:00 +02:00
Vincenzo Scamporlino
8f4792a196
Mark PermissionAuthorizer as deprecated
...
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev >
2022-04-08 12:28:59 +02:00
Vincenzo Scamporlino
a119dfbbd5
Apply suggestions from code review
...
Co-authored-by: Joe Porpeglia <josephp@spotify.com >
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev >
2022-04-08 12:28:59 +02:00
Vincenzo Scamporlino
dc8037213c
Use PermissionEvaluator
...
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev >
2022-04-08 12:28:59 +02:00
Vincenzo Scamporlino
ef2dd617e3
Fix comments
...
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev >
2022-04-08 12:28:59 +02:00
Vincenzo Scamporlino
2903c1fd5d
Move PolicyQuery to permission-node
...
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev >
2022-04-08 12:28:59 +02:00
Vincenzo Scamporlino
8960a2bfed
Split PermissionClient#authorize
...
Co-authored-by: Mike Lewis <mtlewis@users.noreply.github.com >
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev >
2022-04-08 12:28:59 +02:00
Joe Porpeglia
2b07063d77
Add PermissionEvaluator interface
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-04-08 12:28:59 +02:00
MT Lewis
8012ac46a0
permissions: ensure returned conditions match permission in PermissionPolicy#handle ( #10075 )
...
* permission-node: fix signature of permission rule in test suites
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
* permission-common: add isPermission helper for comparing permissions
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
* permission-node: adjust createConditionExports for more type safety
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
* permissions: add resourceType property to PermissionCondition and PermissionRule
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
* catalog: handle changes to PermissionCondition and PermissionRule types
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
* catalog-backend: avoid re-exporting alpha import
cf. https://github.com/backstage/backstage/pull/10128
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
* Update changeset
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
* Resolve api-report conflict
Signed-off-by: Joon Park <joonp@spotify.com >
Co-authored-by: Joe Porpeglia <josephp@spotify.com >
Co-authored-by: Joon Park <joonp@spotify.com >
2022-03-28 11:06:38 +01:00
Joe Porpeglia
678d81a6d5
Remove duplicate type
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-03-25 10:02:46 -04:00
Joe Porpeglia
55f72c4445
Update comment
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-03-25 10:02:46 -04:00
Joe Porpeglia
e43290ce96
Rename permission backend request and response types
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-03-25 10:02:46 -04:00
Joe Porpeglia
970814ed38
Move policy decision types to permission-common
...
Co-authored-by: Mike Lewis <mtlewis@users.noreply.github.com >
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-03-25 10:02:46 -04:00
Joe Porpeglia
ac0a6cb827
Introduce PermissionMessageBatch utility type. Rename Identified type to IdentifiedPermissionMessage.
...
Co-authored-by: Mike Lewis <mtlewis@users.noreply.github.com >
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-03-25 10:02:46 -04:00
MT Lewis
9a80cfc768
permission-common: add comment explaining separation of type property on PermissionBase
...
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com >
2022-03-22 14:32:38 -04:00
MT Lewis
8dc2be1daa
permission-common: add doc comment to PermissionBase.type
...
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com >
2022-03-22 14:32:38 -04:00
Mike Lewis
9cbb270aef
permissions: add a discriminator type to Permission
...
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
2022-03-22 14:32:38 -04:00
Mike Lewis
899d38ea68
permission-common: add utility types for creating and refining Permissions
...
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
2022-03-22 14:32:38 -04:00
Mike Lewis
95284162d6
permission-common: introduce ResourcePermission type
...
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
2022-03-22 14:32:38 -04:00
Dimitris Apostolou
aedd4daa66
Fix typos
...
Signed-off-by: Dimitris Apostolou <dimitris.apostolou@icloud.com >
2022-03-13 14:12:05 +02:00
Mike Lewis
79b9d8a861
permission-common: add apidocs for permission properties
...
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
2022-03-01 14:09:37 +00:00
Joe Porpeglia
17c9f846bb
Make NonEmptyArray type private/ignored
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-02-11 11:08:56 -05:00
Joe Porpeglia
9d91a6965c
Fix api reports
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-02-11 11:08:56 -05:00
Joe Porpeglia
08ce0c83dd
Use strict() validation for permission criteria zod schemas
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-02-11 11:08:56 -05:00
Joe Porpeglia
e66bb84798
Require at least one item in allOf/anyOf criteria
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-02-11 11:08:56 -05:00
MT Lewis
0ae4f4cc82
permissions: rename authorize request and response types to avoid envelope suffix
...
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com >
2022-01-13 17:51:06 +00:00
MT Lewis
b768259244
permission-backend: wrap authorize request and response batches in envelope
...
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com >
2022-01-13 17:51:05 +00:00
Joon Park
0e8ec6d974
Rename all the things
...
Signed-off-by: Joon Park <joonp@spotify.com >
2021-12-17 18:16:47 +00:00
Joon Park
d1801d7166
Refactor ServerPermissionClient away from inheritance
...
Signed-off-by: Joon Park <joonp@spotify.com >
2021-12-17 18:16:47 +00:00
Joon Park
24dce3ca43
Reintroduce noop token manager and refactor ServerPermissionClient
...
Signed-off-by: Joon Park <joonp@spotify.com >
2021-12-17 18:16:47 +00:00
Mike Lewis
d1dcd7e309
permission-common: make permission.enabled config optional
...
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
2021-11-19 09:36:02 +00:00
Mike Lewis
430b3f7a8f
permission-common: accept configApi in PermissionClient constructor
...
Moving the responsibility of pulling the right configuration key inside
the PermissionClient keeps it as the responsibility of
permission-common, whereas putting it on the outside means anyone
constructing a PermissionClient has to know which key to use.
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
2021-11-19 09:35:09 +00:00
Tim Hansen
db299e05ef
Add config, type fixes
...
Signed-off-by: Tim Hansen <timbonicush@spotify.com >
2021-11-16 14:41:13 -07:00
Mike Lewis
e84abaccaf
authz: move permission-common to plugins
...
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
2021-11-12 14:18:10 +00:00