Skip to content
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

Should USERID header and GROUPS header be considered trustworthy or should they be properly sanitized? #21

Open
1 task
fredmaggiowski opened this issue Jun 28, 2022 · 1 comment
Labels
breaking Issue or PR bringing breaking changes question Further information is requested security Anything security related
Milestone

Comments

@fredmaggiowski
Copy link
Member

fredmaggiowski commented Jun 28, 2022

These two headers are used to create the query used to gather bindings.

Right now they are considered trusted headers as they are generally provided by another service and not directly by the user; however if:

  • one is able to forge its own groups/userid value, or
  • headers from the outside (e.g. a client invoking the exposed API) are not properly filtered

the user could be able to find more bindings than necessary and thus potentially breach the policies.

I propose to find a way to sanitize those inputs, what do you think?

Tracking issue for:

@fredmaggiowski fredmaggiowski added the question Further information is requested label Jun 28, 2022
@davidebianchi
Copy link
Member

Those headers are supposed to be sanitized by a gateway before rond (as currently used). If this does not happen, this could be a problem.
We should definitely add it to the docs!

We could support different types of headers to validate the input, such as JWT header. In this way, we can ensure the payload is not changed in any way instead of the current plain headers.

Side question: should we add a security label?

@fredmaggiowski fredmaggiowski added the security Anything security related label Jun 28, 2022
@fredmaggiowski fredmaggiowski changed the title Should USERID header and GROUPS header be considered trustedworthy or should they be properly sanitized? Should USERID header and GROUPS header be considered trustworthy or should they be properly sanitized? Aug 2, 2022
@fredmaggiowski fredmaggiowski added this to the v2 milestone Aug 2, 2022
@fredmaggiowski fredmaggiowski added the breaking Issue or PR bringing breaking changes label Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Issue or PR bringing breaking changes question Further information is requested security Anything security related
Projects
None yet
Development

No branches or pull requests

2 participants