I have a Zuul Gateway proxy, where I check the authorization of token received from the user. Now, when this is request is passed on to other microservices to get the user-specific data, the user information needs to be passed from the gateway to the microservice.
Right now, I've added the user ID in the request header and I'm getting it at respective microservice's controller using API header
annotation.
Is this the right way to pass the user information. Is there any other better way?
zuul.sensitive-headers=
to.properties
file. Then, in each individual service, use fine grained authorization. – Heimlich