Atividades de "Denis"

I have similar issue. I have 2 modules A and B. Module A has Background Job which calls endpoint in module B. Background Job gets exception AbpAuthoizationException because endpoint is protected with permission

My qestions about that https://support.abp.io/QA/Questions/1364/Authorization-in-event-handlers https://support.abp.io/QA/Questions/1347/Distributed-Events-in-monolith

hi

Don't call application service in event handler. You can call the domain service that without the Authorization.

I can not move Application Service logic into Domain Service because endpoint is implemented by another Module. Event Handler in module A pulls some data from module B using its endpoint

There is also one more example with background jobs. For example I need periodical background job which creates stats about users created passed period. Background Job needs to make endpoint call to Idenity module, but it will not able to do that due it is not authorized

So question is how to make authorization prodecure in same way as that done in middleware when endpointcalled?

why do you need authorization? extract the running code part from AppService and move it to a DomainService. then call the domain service method in your handler. And also use it in your AppService as well.

I need authorization because domain make calls to endpoints of another module. I can not move logic of endpoint in module B to domain of module A, which calls endpoint.

For instance, domain may call GET User endpoint in Identity module to get Name of user and use it in own purporse

Hi Alper,

I already resolved the issue by adding RabbitMQ. Now, all events are sent to broker and them return back application. But now I have issue with authorization. Event handler needs to call application sevices, which are protected by authorization.

How I can do authorization with JWT token which passed to event data?

Hi

I have issue with distributed event handlers. I am using monoltih deloyment with RabbitMQ enabled. If event handler tryes to call application service, which have authorization attribute enabled, then it gets AbpAuthorizationException.

How this issue can be resolved in ABP?

  • ABP Framework version: v4.3rc1
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:

Hi

I have several modules and one of them (A) sends distirbuted event. Another module (B) listening for this event. When modules are deployed in monolith I get endpojnt in module A, which sends the event, finished only after when distributed event processed by module B, because in monolith DIstributed Event Bus works as Local Event bus. I would like to know what option ABP framework can suggest to make distirbuted events processed asynchronously?

  • ABP Framework version: v4.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:

Hi liangshiwei,

It does not make sense to share code because we are talking about architecture. And I can not share code btw. I explained anough in topic, on my opinion.

There are 2 modules in monolith app. Module A makes several endpoint calls of module B. It is obvious that this calls share one UoW by default. There can be problems with that because every endpoint in B does take in account it will be called in same UoW with another endpoint

So question is how to make calling of endpoints of module B isolated, like module be is running in own microservice.

Hi liangshiwei,

Module A uses module B. And events will not help because they will be running in same UoW. Please help me to resolve question in topic

Hi

I have issue with modular architecture. My solution consist of multiple modules which calledl as A, B, C All modules are included in monolith application. All of them share same data base.

The problem occurs when endpoint (Application service method) in module A calls Application Service methods in module B Endpoint in module A needs to create couple aggregates in module B, for that it calls

B_app_service_1.CreateB1(data) B_app_service_2.CreateB2(data)

That happens that both methods track same entity. In other words one entity is tracked twice in one UoW and EF core can not perform changes in db If my modules would running as microservices, that would not happen because calls above would be isolated.

My question is how to avoid this situtaion in monotlith deployment? As I know I can force saving changes on endpoint of module A, but that is bad workaround on my opinion. Also I know that UoW is ambient and wrapping of module B application services calls will not help (that is still workaround)

Thanks

  • ABP Framework version: v4.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): Separate
  • Exception message and stack trace:
  • Steps to reproduce the issue:
Mostrando 21 até 30 de 46 registros
Made with ❤️ on ABP v8.2.0-preview Updated on março 25, 2024, 15:11