Shuttle / Shuttle.Esb

A highly extensible service bus implementation.
http://shuttle.github.io/shuttle-esb/
BSD 3-Clause "New" or "Revised" License
95 stars 30 forks source link

Add an IPrincipalProvider interface #9

Closed eben-roux closed 8 years ago

eben-roux commented 8 years ago

The following was brought to my attention by:

Hi Eben,

Thanks for merging my pull requests. I created a new pull request again, it contains 2 fixes: 1st is only a small thing, the observer type name was wrong in the exception message. It was my fault, sorry. I think it is not so critical, since it appears only in the exception and log message, but the correct message would help to the developers. 2nd makes the StreamExtensions.CopyTo faster

But I'm writing you, because I have another problem: More than 27% of the CPU usage is because every transport message gets the Windows username: Szövegközi kép 1

I know that it is possible to impersonate a user on Windows from code, but I think it is very uncommon, so getting the windows username every time is unnecessary. Maybe a boolean configuration settings should be added to force update the current user with "false" default value. And if this setting is "false", save the name to a private field in TransportMessageConfigurator and use this cached name. What do you think about it?

Thanks, Gábor

It may be worthwhile creating an interface used to provide the principal to add to the TransportMessage. The default implementation could cache the principal. A configuration settings can influence this behaviour.

eben-roux commented 8 years ago

Implemented IIndentityProvider.