Commit Graph

115 Commits

Author SHA1 Message Date
Vincenzo Scamporlino 3c3fafb5cb permission-node: fix target plugin id
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2024-04-10 11:50:07 +02:00
Fredrik Adelöw f3e2e86c33 fix permissions being overwritten by the unprocessed entities module
Co-authored-by: Vincenzo Scamporlino <vincenzos@spotify.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-03-22 11:41:57 +01:00
Patrik Oldsberg 5c3720a228 permission-node: assert user credentials forwarding in ServerPermissionClient
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2024-02-23 15:22:46 +01:00
Patrik Oldsberg 16b23eddd3 permission-node: added tests for ServerPermissionClient with credentials
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2024-02-23 15:12:18 +01:00
Patrik Oldsberg 6c06f99ba6 permission-node: refactor to true private fields for ServerPermissionClient
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2024-02-23 15:11:40 +01:00
Patrik Oldsberg 0502d826a5 permissions: migrate to new auth system and accept credentials
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Carl-Erik Bergström <cbergstrom@spotify.com>
Co-authored-by: blam <ben@blam.sh>
Co-authored-by: Camila Belo <camilaibs@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2024-02-23 10:15:02 +01:00
Patrik Oldsberg 16685cf8a2 Merge pull request #17077 from backstage/permission-router-options-array
createPermissionIntegrationRouter: accept an array of options
2023-04-25 10:37:18 +02:00
Vincenzo Scamporlino 7996d8900b permission-node: improve naming
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-04-13 21:02:40 +02:00
Vincenzo Scamporlino 4dd6bbe59e permission-node: add support for extra permissions
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-04-12 17:13:52 +02:00
Vincenzo Scamporlino 2c837e99a3 permission-node: add example to changeset
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-04-12 11:51:14 +02:00
Vincenzo Scamporlino b947f4230d permission-node: improve typings
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-04-12 11:39:08 +02:00
Vincenzo Scamporlino 81ea755347 permission-node: update api-report
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-04-11 13:47:54 +02:00
Ainhoa Larumbe 49584cebc4 do not pass array of options directly
Signed-off-by: Ainhoa Larumbe <ainhoaL@users.noreply.github.com>
2023-04-05 16:24:06 +01:00
Fredrik Adelöw 788f0f5a15 set permission backend policies using an extension point
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Johan Haals <johan.haals@gmail.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2023-04-04 11:45:36 +02:00
Ainhoa Larumbe 82cd54cac8 Cleanup comments
Signed-off-by: Ainhoa Larumbe <ainhoaL@users.noreply.github.com>
2023-03-24 11:00:19 +00:00
Ainhoa Larumbe 19eefbd0f4 Add tests for router with multiple resource types
Signed-off-by: Ainhoa Larumbe <ainhoaL@users.noreply.github.com>
Co-authored-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-03-24 10:36:06 +00:00
Ainhoa Larumbe 16c725e939 Complete code in router and fix tests
Signed-off-by: Ainhoa Larumbe <ainhoaL@users.noreply.github.com>
Co-authored-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-03-24 10:35:56 +00:00
Ainhoa Larumbe d524bf467b WIP createPermissionIntegrationRouter takes an array of ResourceOptions
Signed-off-by: Ainhoa Larumbe <ainhoaL@users.noreply.github.com>
2023-03-24 10:35:30 +00:00
Vincenzo Scamporlino 6e5e1b49c0 permission-node rename createIsAuthorized to createConditionAuthorizer
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-03-21 16:40:49 +01:00
Vincenzo Scamporlino b79dee1cf8 permission-node: test createIsAuthorized
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-03-21 16:37:55 +01:00
Harry Hogg 97be4a96ed Refactored createIsAuthorized to take a decision
Signed-off-by: Harry Hogg <hhogg@spotify.com>
Co-authored-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-03-21 16:37:55 +01:00
Harry Hogg 2b124bc24a Reworked authorization of conditions to use a single export by combing getRule and applyConditions into
createIsAuthorized

Signed-off-by: Harry Hogg <hhogg@spotify.com>
Co-authored-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-03-21 16:37:55 +01:00
Harry Hogg 277847e064 Reworked permission rules and filtering to follow similar pattern to catalog
Signed-off-by: Harry Hogg <hhogg@spotify.com>
Co-authored-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-03-21 16:37:53 +01:00
Patrik Oldsberg f758b99ea2 Merge pull request #16616 from backstage/docs/remove-backend-to-backend-references
Docs: remove backend-to-backend references
2023-02-28 13:55:54 +01:00
Vincenzo Scamporlino d4523f5b93 Merge pull request #16333 from backstage/pf/optional-get-resources
createPermissionIntegrationRouter - optional getResources
2023-02-27 16:28:02 +01:00
Vincenzo Scamporlino 37e9215c79 permission-node: improve service-to-service error url
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-02-27 15:52:53 +01:00
Vincenzo Scamporlino 4c0ba1cfc7 permission-node: improve createPermissionIntegrationRouter docs
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-02-27 15:20:08 +01:00
Vincenzo Scamporlino e837143bc9 permission-node: simplify api report
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-02-27 11:30:05 +01:00
Patrik Oldsberg eb9252186f permission-node,kubernetes-backend: mark public API as public
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-02-21 14:43:21 +01:00
Vincenzo Scamporlino 36e90ecdf1 permission-node: fix error message
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-02-17 13:39:03 +01:00
Vincenzo Scamporlino 5632097f92 permission-node: make getResources optional
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-02-17 10:50:38 +01:00
Vincenzo Scamporlino dbf36da3eb permission-node: improve api report for createPermissionIntegrationRouter
Co-authored-by: Harry Hogg <hhogg@spotify.com>
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-02-14 17:22:17 +01:00
Vincenzo Scamporlino 85194da56c permission-node: make resources and rules optional in createPermissionIntegrationRouter
Co-authored-by: Harry Hogg <hhogg@spotify.com>
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2023-02-14 17:12:28 +01:00
Harry Hogg 27a103ca07 Changed the createPermissionIntegrationRouter API to allow getResources to be optional
Signed-off-by: Harry Hogg <hhogg@spotify.com>
2023-02-14 13:03:18 +00:00
Harry Hogg fd7fc3902e Updated MetaData wording to Metadata
Signed-off-by: Harry Hogg <hhogg@spotify.com>
2022-10-17 17:45:16 +01:00
Harry Hogg a7e4adf169 Updated import location
Signed-off-by: Harry Hogg <hhogg@spotify.com>
2022-10-17 17:00:10 +01:00
Harry Hogg 9335ad115e Exported types for the permission router metadata endpoint
Signed-off-by: Harry Hogg <hhogg@spotify.com>
2022-10-12 08:21:57 +01:00
Harry Hogg bbbe968e10 Fixed allowing optional params outside of the toQuery and apply
Signed-off-by: Harry Hogg <hhogg@spotify.com>

Co-authored-by: Mike Lewis <mlewis@spotify.com>
2022-10-11 11:53:02 +01:00
Harry Hogg 78e7698e4b Removed unnecessary tupling of params
Signed-off-by: Harry Hogg <hhogg@spotify.com>
2022-10-07 12:08:00 +01:00
Harry Hogg fa40df2bc7 Made changs to allow params and schemas to be defaulted and required only when there is params defined.
Co-authored-by: Vincenzo Scamporlino <vincenzos@spotify.com>
Co-authored-by: Mike Lewis <mlewis@spotify.com>

Signed-off-by: Harry Hogg <hhogg@spotify.com>
2022-10-06 12:09:42 +01:00
Harry Hogg db63ce8b07 Rename schema to paramsSchema
Signed-off-by: Harry Hogg <hhogg@spotify.com>
2022-10-06 09:36:54 +01:00
Harry Hogg 26e5513c32 Update API reports
Signed-off-by: Harry Hogg <hhogg@spotify.com>
2022-10-04 15:57:04 +01:00
Harry Hogg 4eb0f6d23d Limited the permission rule parameters to JsonPrimatives and array of
Signed-off-by: Harry Hogg <hhogg@spotify.com>
2022-10-04 13:24:33 +01:00
Harry Hogg fbc636c4a5 Use z.input to corrently type the input to correctly reflect optional fields
Signed-off-by: Harry Hogg <hhogg@spotify.com>
2022-10-04 12:14:22 +01:00
Harry Hogg 445c5f41a5 Reworded and added missing parameter descriptions
Signed-off-by: Harry Hogg <hhogg@spotify.com>
2022-10-04 12:14:20 +01:00
Harry Hogg 42fa9cdcdb Removed the parameters count from the permissions metadata endpoint
Signed-off-by: Harry Hogg <hhogg@spotify.com>
2022-10-04 12:03:17 +01:00
Harry Hogg 755361681c Add explanation comment around the schema type and whay we need to remove the optional def for the schema
Signed-off-by: Harry Hogg <hhogg@spotify.com>
2022-10-04 12:03:17 +01:00
Harry Hogg 1d4b847c98 Explicitly use the schema to infer the types for the permission rule
Signed-off-by: Harry Hogg <hhogg@spotify.com>
2022-10-04 12:03:16 +01:00
Harry Hogg 6d447843fa Changing over permission rules params API to accept a single object
Signed-off-by: Harry Hogg <hhogg@spotify.com>
2022-10-04 12:03:16 +01:00
Harry Hogg eec3f766f2 Output a JSON schema from the .well-known metadata endpoint
Signed-off-by: Harry Hogg <hhogg@spotify.com>
2022-10-04 12:03:15 +01:00