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

Guard support #62

Open
UFOMelkor opened this issue Jan 29, 2018 · 1 comment
Open

Guard support #62

UFOMelkor opened this issue Jan 29, 2018 · 1 comment

Comments

@UFOMelkor
Copy link
Member

The service-bus has two plugins to support authorization, the RouteGuard and the FinalizeGuard.
Both rely on a simple interface AuthorizationService.

Any thoughts about …

  • … adding a AuthorizationService adapter for Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface
  • … allowing to enable each guard for each message-bus per configuration
  • … adding an (optional) event listener to convert Prooph\ServiceBus\Plugin\Guard\UnauthorizedException into Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException if it is not caught in the controller.
@prolic
Copy link
Member

prolic commented Jan 29, 2018

@UFOMelkor

  • Adding an implementation of AuthorizationService in the bundle is a good idea, but I would do it for 1.1 release, not targeting upcoming 1.0 release, as this would only delay the final release (and it's not a strict requirement).

  • about enabling guards per bus: the guards are plugins, so it should already be possible to add them simply

  • convert Prooph\ServiceBus\Plugin\Guard\UnauthorizedException into Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException - same as above, I would target this for 1.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants