When cosuming message I need to know Principal who sent it. Cannot find any more or less standard way of sending Principal via MassTransit. Found one similar question but this not exact what I want. Can you please share some thoughts or code examples.
Send current Principal with MassTransit
187 Views Asked by Александр Сысоев At
1
There are 1 best solutions below
Related Questions in MASSTRANSIT
- MassTransit Kafka producers configure to send several events to the same Kafka topic
- Value cannot be null ( parameter envolope)
- MassTransit mediator and CorrelationId
- Entity Framework core does not work when using masstransit library
- Weird transactional outbox behaviour when running multiple WebApplications with MassTransit in same process
- InboxState.Delivered = null - Transactional Outbox For Consumers
- Using MassTransit to invoke a DurableTaskClient function
- MassTransit creates topics / subscriptions with its default name formatter no matter what configurations
- How do I implement the Request/Response pattern for MassTransit using RabbitMQ Service Bus Plus Filters?
- Is it possible to use MassTransit transactional outbox with multiple db contexts?
- Remove MessageData from repository after successful consumption
- How can we prevent RoutingSlipFaulted to be fired when a single specific RoutingSlipActivity faulted?
- Unable to consume message - MassTransit with ActiveMQ Artemis
- Can we use Redis Stream as message broker with mass transit like mass transit with rabbitMQ or ActiveMQ
- How can my controller action wait and respond the result of my message driven workflow?
Related Questions in IPRINCIPAL
- Custom IAuthenticationFilter in ASP.NET Core 6 Web API based on Active Directory
- ASP.NET Core enrich IIdentity with custom profile
- Send current Principal with MassTransit
- How to implement server side blazor Custom Authorization Provider Correctly
- WebApi Authentication filter
- asp.net check Context.User confirmed
- Cannot Deserialize ClaimsPrincipal
- ASP.NET Core Identity - How to add new claims after initial login
- Why is FindByIdentity with Domain Context ignoring local machine name in argument?
- Retrieving AD username without domain
- Access ApiController User in class library
- ASP.NET MVC - Custom IIdentity or IPrincipal with Windows Authentication
- Shopping Cart in IIdentity IPrincipal
- Custom Principal set by SessionToken reverting to ClaimsPrincipal in Application PostAuthenticateRequest
- IPrincipal property is null when accessed from ASP.NET MVC controller constructor
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I still would promote proper separation of concerns. The application service has no interest in tokens, claims and subs. It needs to know who the user is and what they have, so it can perform authorisation tasks (which are not authentication tasks).
Therefore, it doesn't matter, how the user information is conveyed to the API. Strong coupling between the identity management infrastructure and application services do more hard than good and produce these issues.
If we take the plain HTTP API, it would work like this:
When moving to messaging, the user identity becomes part of the message. We could argue if it should be in the message header, however, I personally consider it important business data and put it to the message contract itself.
Here how I would do it with messaging between HTTP API and the app service: