- Template: microservice
- Created ABP Studio Version: 0.9.5
- UI Framework: angular
- Theme: leptonx
- Theme Style: system
- Database Provider: ef
- Database Management System: sqlserver
- Mobile Framework: maui
- Public Website: Yes
- Exception message and full stack trace: 401 : Unauthorized
- Steps to reproduce the issue: following this article : https://abp.io/docs/commercial/latest/startup-templates/microservice/using-grpc#contributors-section
Hello, I'm working on a project based on the microservices' template, when I implement the gRPC for the inter services communication, the authorization : [Authorize(IdentityPermissions.Users.Create)] blocks me when I call the service from the client µS, 401, Unauthorized. How can I solve this problem with best practices ?
3 Answer(s)
-
0
hi
Have you added the
Authorization header with Bearer {access_token}
for your request?Please share your code using
grpc
Thanks.
-
0
I want to bypass the authorization for all the calls via gRPC, from the µservices, and keep the authorization for the external calls coming from the Gateway.
-
0
hi
For internal calls between microservices, you can use
integration-services
, which does not require authorization.For application services you have to pass authorization state(token)
https://abp.io/docs/latest/framework/api-development/integration-services https://abp.io/docs/latest/tutorials/modular-crm/part-06