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

Deny access to the request #293

Open
RomBurunduk opened this issue Nov 20, 2024 · 1 comment
Open

Deny access to the request #293

RomBurunduk opened this issue Nov 20, 2024 · 1 comment

Comments

@RomBurunduk
Copy link

Access control is now implemented on a whitelist basis.
Is there any way to deny access to some request?
In case there are several subqueries in one query - skip one and deny the other.

@pkqk
Copy link
Member

pkqk commented Nov 20, 2024

Hi @RomBurunduk, currently the example authorization and the version we run at @movio are both based on the allowlist. We haven't yet added a denylist option.

After a brief look you could alter the AllowedFields struct in auth.go so that IsAllowed checks for a deny option as well as the allow checks.

It could be marshalled as a - for example, so a simple permission looked like:

{
  "query": "*",
  "mutation": "-"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants