-
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
[#IP-215] Add AzureAllowBodyPayloadMiddleware #167
Conversation
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.
Just a question: Should this middleware be always combined with the authorization middleware to check that the calling user is effectively into the desired group?
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.
LGTM except the test name and what @michaeldisaro pointed out
Co-authored-by: gquadrati <[email protected]>
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.
LGTM
I actually copied that part : NonEmptyString.decode(request.header("x-user-groups")) In the end, it's nothing more than a plain text header |
Add a middleware that allow a specific payload to be provided only by a specific set of user groups.
It is designed for when it's needed to allow only a subset of users to provide a payload that matches a specific subset of the payload schema.
The use case is: we want restrict the opportunity to send a specific field into a Message content to a limited group of users.