zarusz / SlimMessageBus

Lightweight message bus interface for .NET (pub/sub and request-response) with transport plugins for popular message brokers.
Apache License 2.0
465 stars 77 forks source link

[Host.Outbox] Execute permission is required for Outbox #297

Closed zzeneg closed 1 week ago

zzeneg commented 2 weeks ago

Hey,

When trying to use Outbox feature, we receive the following error: The EXECUTE permission was denied on the object 'OutboxId', database 'SQL-DB-SAMPLE', schema 'dbo'.

My understanding that EXEC permission is required for the custom OutboxId type, and that error could be fixed with something like GRANT EXEC ON TYPE::[dbo].[OutboxId] TO [User] but it's an issue to get such permission in secured environments and I wonder if it's possible to use Outbox without the custom type.

Thanks!

zarusz commented 2 weeks ago

Ok, we will try to see if the custom type can be avoided to relax the permission needs.

zarusz commented 2 weeks ago

@zzeneg could you try it and report here if it worked for you? https://www.nuget.org/packages/SlimMessageBus.Host.Outbox.DbContext/2.5.2-rc1 https://www.nuget.org/packages/SlimMessageBus.Host.Outbox.DbContext/3.0.0-rc9

The custom type was removed, so hopefully the EXEC permission should not be needed.

zzeneg commented 1 week ago

I tried 2.5.2-rc1 - it seems to work. No custom type, no issues with permissions :) Thanks!

zarusz commented 1 week ago

Released in: https://www.nuget.org/packages/SlimMessageBus.Host.Outbox.DbContext/2.5.2 https://www.nuget.org/packages/SlimMessageBus.Host.Outbox.DbContext/3.0.0-rc10