Skip to content

Retrieving user information in a proxied microservice #503

Answered by Tratcher
PieterBoeren asked this question in Q&A
Discussion options

You must be logged in to vote

So if I understand this right, you have auth set up in destination A as shown above, and you want to share that user information with the app at destination B? There's no auth set up in the proxy?

That user information is preserved in the auth cookie which is attached to each request. All the microservice needs to do is read that cookie. The easiest way to do that is to add cookie auth to the microservice. There are two steps:

  1. The apps need to share encryption keys so they can both read the cookies. That's configured through DataProtection:
    https://docs.microsoft.com/en-us/aspnet/core/security/data-protection/configuration/overview?view=aspnetcore-3.1

  2. Add cookie auth to the microservice:

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Tratcher
Comment options

@PieterBoeren
Comment options

@Tratcher
Comment options

Answer selected by PieterBoeren
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants