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

GraphQL doesn't respect restricted paths #46

Open
RSoeborg opened this issue Mar 7, 2022 · 3 comments
Open

GraphQL doesn't respect restricted paths #46

RSoeborg opened this issue Mar 7, 2022 · 3 comments
Labels
status/needs-investigation We need to conduct some further analysis at HQ before we can proceed

Comments

@RSoeborg
Copy link

RSoeborg commented Mar 7, 2022

Issue description

If you restrict public access to a certain user group, then GraphQL still returns the result regardless of you providing "Authorization" header.

This seems to be a huge security loophole?

An example of this can be seen here:

image
image
image

Trying to access same resource from the REST api correctly gives me a permission denied unless a bearer token is provided:
image

@RyuLindow
Copy link

Hi there.

This feature only works for the Content Delivery API as per - https://our.umbraco.com/documentation/Umbraco-Heartcore/API-Documentation/#member-authentication since the member auth only works with that endpoint, so what you're seeing is intended.

Just to make sure, you've mentioned "If you restrict public access to a certain user group"

This feature only restricts access to members, not users.

If you want to restrict backoffice users from accessing certain nodes in the backoffice then I recommend looking into the permissions each user group has :)

If you would like this as a feature then please raise a feature request instead 👍

@RSoeborg
Copy link
Author

RSoeborg commented Mar 7, 2022

@RyuLindow So unless you protect the API, the "Restrict public access" feature is pointless? Since anyone could just query the graphql api instead of the rest api and get the results out

@RyuLindow
Copy link

That's not entirely correct.

The public access feature is only for members and Content Delivery API.

The best use case for it would be an intranet where different members have access to different content pages etc.

Since anyone could just query the graphql api instead of the rest api and get the results out
I'm not sure how that would be possible without knowing the necessary headers and names of the content properties 🤔

Just to clarify the public access feature is only for members and for requesting content using member auth.

@nul800sebastiaan nul800sebastiaan transferred this issue from umbraco/Umbraco.Cloud.Issues Mar 25, 2022
@Fjellvang Fjellvang added the status/needs-investigation We need to conduct some further analysis at HQ before we can proceed label Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/needs-investigation We need to conduct some further analysis at HQ before we can proceed
Projects
None yet
Development

No branches or pull requests

4 participants