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

@Allow not failing, if multiple services exist #77

Open
haukec opened this issue May 21, 2021 · 1 comment
Open

@Allow not failing, if multiple services exist #77

haukec opened this issue May 21, 2021 · 1 comment

Comments

@haukec
Copy link

haukec commented May 21, 2021

Hi Mario,

I am not sure, if this belongs to the previous issue. If so, we can also handle it there.

With a single grpc-service, the annotations work as expected. But when I have multiple services, at least one of them fails to apply the annotation.

In my demo project, I tried two different appraoches:

  • In the main branch, I have two .proto-files and two separated services, each in one package
  • In the branch services-in-same-directory, I put both service declarations in the same .proto-file and implemented the services in the same package.

The result for both approaches is the same. For approach 1, the first service reacts as expected, but the second doesn't:

~/repos/demo$ grpcurl --plaintext -proto ./src/main/proto/helloservice.proto -d '{"name": "test"}' localhost:6565 com.example.demo.helloservice.HelloService/SayHello
ERROR:
  Code: PermissionDenied
  Message: Missing JWT data.
~/repos/demo$ grpcurl --plaintext -proto ./src/main/proto/anotherhelloservice.proto -d '{"name": "test"}' localhost:6565 com.example.demo.anotherhelloservice.AnotherHelloService/SayHello
{
  "message": "Hello test"
}

... and for approach 2, the behaviour is the same:

~/repos/demo$ grpcurl --plaintext -proto ./src/main/proto/helloservice.proto -d '{"name": "test"}' localhost:6565 com.example.demo.helloservice.HelloService/SayHello
ERROR:
  Code: PermissionDenied
  Message: Missing JWT data.
~/repos/demo$ grpcurl --plaintext -proto ./src/main/proto/helloservice.proto -d '{"name": "test"}' localhost:6565 com.example.demo.helloservice.AnotherHelloService/SayHello
{
  "message": "Hello test"
}

Did I miss something, here?

Kind regards,
Hauke

p.s.: I also tried to even put the application starter into the same package. This also doesn't make any difference (and I would have been surprised, if so), just wanted to make sure

@haukec
Copy link
Author

haukec commented Jun 8, 2021

Hi Mario,

already any idea on this?

Kind regards,
Hauke

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