-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#170129433] Get all services #11
Conversation
Affected stories
Generated by 🚫 dangerJS |
GetServices/handler.ts
Outdated
// Extract Azure Functions bindings | ||
ContextMiddleware(), | ||
// Allow only users in the ApiServiceWrite group | ||
AzureApiAuthMiddleware(new Set([UserGroup.ApiServiceRead])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need a new permission ApiServiceList.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ApiServiceList, ApiServiceKeyRead. ApiServiceKeyWrite. Can you change this one here with ApiServiceList
?
GetServices/handler.ts
Outdated
// Extract Azure Functions bindings | ||
ContextMiddleware(), | ||
// Allow only users in the ApiServiceWrite group | ||
AzureApiAuthMiddleware(new Set([UserGroup.ApiServiceRead])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ApiServiceList, ApiServiceKeyRead. ApiServiceKeyWrite. Can you change this one here with ApiServiceList
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs rebasing (package.json / yarn.lock conflicts)
3487b42
to
67fe335
Compare
Codecov Report
@@ Coverage Diff @@
## master #11 +/- ##
==========================================
- Coverage 85.27% 84.44% -0.84%
==========================================
Files 8 9 +1
Lines 163 180 +17
Branches 13 13
==========================================
+ Hits 139 152 +13
- Misses 23 27 +4
Partials 1 1
Continue to review full report at Codecov.
|
|
||
const middlewaresWrap = withRequestMiddlewares( | ||
// Extract Azure Functions bindings | ||
ContextMiddleware(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since some services (the calling service tied to the current api-key)
may have restrictions on origin IP addresses, you must apply all middlewares here:
https://github.com/pagopa/io-functions-admin/blob/master/GetService/handler.ts#L100
in order to call checkSourceIpForHandler
…Services function
…ctions-admin into 170129433-get-all-services
This PR aims to add a function to get the collection of all services.