Skip to content

CptCheesebeard/axon-security-context

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

It is possible to specify an ExecutorService for the Command/Query-Bus. Adding a DelegatingSecurityContextExecutorService does not bring the wanted behaviour.

CommandBus

Three tests have been added to demonstrate the problem.

  1. LocalDefaultCommandBusTest

Using the default CommandBus without any configuration and without axon server.
As expected, SecurityContext is not delegated.

  1. LocalContextDelegatingCommandBusTest

The SimpleCommandBus does not allow to set an executor, but it is possible with the AsynchronousCommandBus. Using a custom AsynchronousCommandBus with registered DelegatingSecurityContextExecutorService.
As expected, SecurityContext is delegated.

  1. ServerContextDelegatingCommandBusTest

Using the bean definitions of the spring-boot-autoconfigure project and extend it with the DelegatingSecurityContextExecutorService
Unexpected, the SecurtyContext IS NOT delegated 😢

QueryBus

There is no AsynchronousQueryBus, so it is not possible to configure it in a way it works locally. It would be nice to be able to specify an Executor that is used in some way (on Gateway or Bus).

To Demonstrate the Problem, I added two tests.

  1. LocalDefaultQueryBusTest

Using the default QueryBus without any configuration and without axon server.
As expected, SecurityContext is not delegated.
As mentioned, it is not possible to specify an executor in any way to make it work "locally" (without AxonServer - for Tests).

  1. ServerContextDelegatingQueryBusTest

Using the bean definitions of the spring-boot-autoconfigure project and extend it with the DelegatingSecurityContextExecutorService
Unexpected, the SecurtyContext IS NOT delegated 😢

About

demo project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages