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

Expose sha256 function to rhai script #2112

Closed
Meemaw opened this issue Nov 16, 2022 · 1 comment
Closed

Expose sha256 function to rhai script #2112

Meemaw opened this issue Nov 16, 2022 · 1 comment

Comments

@Meemaw
Copy link
Contributor

Meemaw commented Nov 16, 2022

Is your feature request related to a problem? Please describe.
We are using a variant of persisted queries. Clients will send sha256 query signature within a request header, and the server validates that this matches the request body, and rejects the query otherwise.

With federation we cannot do that on the subgraphs anymore, because the query that is sent to subgraphs is modified so the signature obviously won't match.

Describe the solution you'd like
It's already possible to access request body, and headers within a rhai script, but the missing part is the sha256 function/module.

Describe alternatives you've considered
N/A

Additional context
I think exposing sha256 might be useful for other usecases as well.

@abernix
Copy link
Member

abernix commented Nov 18, 2022

Thanks for opening this Let's go ahead and track this in the existing #2025, which is essentially trying to capture the same thing. Please do add your use-case concretely for SHA256 (though that was definitely inclusive of my consideration when I opened it).

Duplicate of #2025

@abernix abernix closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2022
@abernix abernix removed the triage label Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants