Skip to content

Commit

Permalink
fix: change permissions in openapi (#33)
Browse files Browse the repository at this point in the history
* feat: add images controller

* feat: increase image size

* feat: add RefTypePathParamMapper

* feat: fix test failure keycloak

* fix: raw file location change

* feat: change permissions openapi

* feat: change permissions openapi

* feat: change permissions openapi tests
  • Loading branch information
jsteenke authored Mar 21, 2024
1 parent f79295b commit 1b9d41e
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 25 deletions.
15 changes: 13 additions & 2 deletions src/main/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,18 @@ app:
enabled: true
spec:
permissions:
product-store:
microfrontend:
read: permission on all GET requests and POST search
write: permission on PUT, POST, PATCH requests, where objects are saved or updated
delete: permission on all DELETE requests
delete: permission on all DELETE requests
product:
read: permission on all GET requests and POST search
write: permission on PUT, POST, PATCH requests, where objects are saved or updated
delete: permission on all DELETE requests
microservice:
read: permission on all GET requests and POST search
write: permission on PUT, POST, PATCH requests, where objects are saved or updated
delete: permission on all DELETE requests
image:
read: permission on all GET requests and POST search
write: permission on PUT, POST, PATCH requests, where objects are saved or updated
42 changes: 21 additions & 21 deletions src/main/openapi/onecx-product-store-bff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ paths:
post:
x-onecx:
permissions:
product-store:
microfrontend:
- write
tags:
- Microfrontends
Expand Down Expand Up @@ -53,7 +53,7 @@ paths:
post:
x-onecx:
permissions:
product-store:
microfrontend:
- read
tags:
- Microfrontends
Expand Down Expand Up @@ -82,7 +82,7 @@ paths:
get:
x-onecx:
permissions:
product-store:
microfrontend:
- read
tags:
- Microfrontends
Expand All @@ -107,7 +107,7 @@ paths:
get:
x-onecx:
permissions:
product-store:
microfrontend:
- read
tags:
- Microfrontends
Expand All @@ -131,7 +131,7 @@ paths:
put:
x-onecx:
permissions:
product-store:
microfrontend:
- write
tags:
- Microfrontends
Expand Down Expand Up @@ -163,7 +163,7 @@ paths:
delete:
x-onecx:
permissions:
product-store:
microfrontend:
- delete
tags:
- Microfrontends
Expand All @@ -188,7 +188,7 @@ paths:
post:
x-onecx:
permissions:
product-store:
product:
- write
tags:
- Products
Expand Down Expand Up @@ -223,7 +223,7 @@ paths:
post:
x-onecx:
permissions:
product-store:
product:
- read
tags:
- Products
Expand Down Expand Up @@ -252,7 +252,7 @@ paths:
get:
x-onecx:
permissions:
product-store:
product:
- read
tags:
- Products
Expand Down Expand Up @@ -286,7 +286,7 @@ paths:
put:
x-onecx:
permissions:
product-store:
product:
- write
tags:
- Products
Expand Down Expand Up @@ -322,7 +322,7 @@ paths:
delete:
x-onecx:
permissions:
product-store:
product:
- delete
tags:
- Products
Expand All @@ -347,7 +347,7 @@ paths:
get:
x-onecx:
permissions:
product-store:
product:
- read
tags:
- Products
Expand Down Expand Up @@ -382,7 +382,7 @@ paths:
post:
x-onecx:
permissions:
product-store:
microservice:
- write
tags:
- Microservices
Expand Down Expand Up @@ -417,7 +417,7 @@ paths:
post:
x-onecx:
permissions:
product-store:
microservice:
- read
tags:
- Microservices
Expand Down Expand Up @@ -445,7 +445,7 @@ paths:
/microservices/{id}:
x-onecx:
permissions:
product-store:
microservice:
- read
get:
tags:
Expand All @@ -470,7 +470,7 @@ paths:
put:
x-onecx:
permissions:
product-store:
microservice:
- write
tags:
- Microservices
Expand Down Expand Up @@ -502,7 +502,7 @@ paths:
delete:
x-onecx:
permissions:
product-store:
microservice:
- delete
tags:
- Microservices
Expand All @@ -526,7 +526,7 @@ paths:
/microservices/appId/{appId}:
x-onecx:
permissions:
product-store:
microservice:
- read
get:
tags:
Expand All @@ -552,7 +552,7 @@ paths:
post:
x-onecx:
permissions:
product-store:
image:
- write
tags:
- imagesInternal
Expand Down Expand Up @@ -595,7 +595,7 @@ paths:
get:
x-onecx:
permissions:
product-store:
image:
- read
tags:
- imagesInternal
Expand Down Expand Up @@ -629,7 +629,7 @@ paths:
put:
x-onecx:
permissions:
product-store:
image:
- write
tags:
- imagesInternal
Expand Down
10 changes: 8 additions & 2 deletions src/test/resources/mockserver/permissions.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"json": {
"appId": "onecx-product-store-bff",
"permissions": {
"product-store": ["read", "write", "delete"],
"microfrontend": ["read", "write", "delete"],
"product": ["read", "write", "delete"],
"microservice": ["read", "write", "delete"],
"image": ["read", "write", "delete"],
"permissions": ["admin-write","admin-read"]
}
},
Expand All @@ -35,7 +38,10 @@
"json": {
"appId": "onecx-product-store-bff",
"permissions": {
"product-store": ["read"],
"microfrontend": ["read"],
"product": ["read"],
"microservice": ["read"],
"image": ["read"],
"permissions": ["admin-write","admin-read"]
}
},
Expand Down

0 comments on commit 1b9d41e

Please sign in to comment.