-
Notifications
You must be signed in to change notification settings - Fork 30
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
Removed headers filter from loopbackApi #1331
base: master
Are you sure you want to change the base?
Removed headers filter from loopbackApi #1331
Conversation
For E2E test to pass, #1328 needs to be merged |
96ddaa6
to
7b25aec
Compare
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.
looks good to me
But I'd like feedback from facilities that run SciCat in production: @minottic , @dapvan , @dylanmcreynolds
…-use-query-filter
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.
Is this code part of the autogenerated code? We have been discussing regenerating based on the new backend, in which case this PR would be removed, yes?
I am pretty sure our ingestors use for historical reasons the headers in many places rather than the query params. Could the BE change wait until all facilities have rollout the new be, or at least a couple of weeks after the JOBs migration will be over? In the end all the concerns for the moment could be overcome simply by not using the headers. Happy, otherwise, to change the FE |
Hmm, as this does not remove the header support in the backend, this change should not affect ingesters running standalone. Only if a proxy does header injection (e.g. for sec. reasons) it could affect the frontend. I think this is a good point to discuss for the meeting. |
yes, indeed. I have nothing against changing the FE, but the PR description mentions a change in the BE |
A PR SciCatProject/scicat-backend-next#911 in the new BE removed header filter usage(in datasets, policies, and user-identities controllers). |
ah ok, thanks, I must have missed that. I support Bjorn's point, let's discuss it in the meeting if time allows |
Quality Gate passedIssues Measures |
Description
For better compatibility, visibility, and ease of use headers filter are removed and will no longer be supported by scicat backend
Motivation
Couple of reasons to remove header filters as following:
Limited Visibility and Debugging
: Headers are less visible than query parameters or request bodies, complicating debugging and logging.Convention and Consistency
: In RESTful APIs, headers are conventionally used for control-related metadata like content type or authentication, not for business logic like filter parameters. Using them for filters goes against standard practices.Security Concerns
: Using headers for business logic can expose APIs to overlooked security vulnerabilities.Tests included/Docs Updated?