-
Notifications
You must be signed in to change notification settings - Fork 99
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
@Logged vs @NotLogged #196
Comments
To further expand on this. A simple BC solution would be to add a new method to the Additionally, a similar concept could be applied to the These default policies can also support future settings. |
FWIW we've put our auth layer higher in the stack and forgone the need for this within GraphQLite. I still think that it's a better assumption that operations require authentication by default. I realize that'd be a BC break. I guess a setting could be added :/ |
I do understand your idea on this. In particular, in the future, there might be third party packages providing GraphQL controllers. I'm not sure whether those third party controllers should be part or not of those default settings. Maybe we could have a An alternative might be to be able to put Anyway, this requires a bit of work. I'll focus on releasing v4.0 first, and I'll come back to this topic when 4.0 is released. |
@moufmouf yea, as I was saying, we just put a layer in front of GraphQL to handle this, it can definitely wait. Unfortunately, the solution requires us to parse the graphql request body prior to passing the request to GraphQLite, which is redundant and less performant, but necessary in our case. Ultimately, the issue is that annotations are terribly easy to overlook and miss. And when it comes to something like security, that's problematic. I'd be all for any way to define a policy. I just find the current method to be insufficient. |
Following back on this. I think the |
I'd like to suggest an additional
NotLogged
annotation that, instead, makes the assumption that all operations are authenticated operations, unless theNotLogged
annotation has been added.As it is now, security is set such that, any missing
Logged
annotation, could expose the API. I think this is dangerous, and would much prefer the option of taking the alternate approach to security.The text was updated successfully, but these errors were encountered: