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

Secured Annotation is not fired on @GraphQLQuery and @GraphQLMutation #178

Open
4 tasks done
fabienmifsud opened this issue Mar 10, 2021 · 0 comments
Open
4 tasks done

Comments

@fabienmifsud
Copy link

fabienmifsud commented Mar 10, 2021

Thanks for reporting an issue, please review the task list below before submitting the
issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.

NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (https://stackoverflow.com/tags/micronaut) or Gitter (https://gitter.im/micronautfw/). DO NOT use the issue tracker to ask questions.

Task List

  • Steps to reproduce provided
  • Stacktrace (if present) provided
  • Example that reproduces the problem uploaded to Github
  • Full description of the issue provided (see below)

Steps to Reproduce

  1. Launch the app : https://github.com/fabienmifsud/micronaut-crud
  2. Execute a graphQL query :
    POST : http://localhost:8080/graphql
query readClients {
  clients{
    id,
    name,
    email,
    dateOfBirth
  }
}

With Basic Authent standardUser/standardUser
3. The query response is a 403 forbidden because all @secured annotations are not triggered (only the path /graphql is triggered when debugging SecuredAnnotationRule class)

Expected Behaviour

The secured & RolesAllowed annotations on ClientService should be interpreted.

Actual Behaviour

The secured & RolesAllowed annotations on ClientService are not interpreted and since graphql use the same url for all the queries, it is not possible to secured specificaly some queries or mutations.

Environment Information

  • Operating System: Linux
  • Micronaut Version: 2.3.4
  • JDK Version: OpenJDK 8

Example Application

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

1 participant