Hi In our system we have Auth Service and other microservices behind Zuul Gateway. Initially the auth service sets a cookie (upon successful authentication)... This cookie is then passed back and forth on each request (through the gateway to other microservices). When a user directly accesses a microservice (without authentication), he is forced to authenticate first and then there is a subsequent redirect.
The problem is that the Authentication services sets the response cookie but when the subsequent redirection request comes, the cookie is not present. I have the global setting zuul.sensitiveHeaders:
What am i missing here?
Comment From: madheshr
Just to add - there are no overriding sensitiveHeaders setting at individual route level.
Comment From: ryanjbaxter
Can you provide a sample that reproduces what you are seeing?
Comment From: madheshr
Hi I am not able to extract a working code; but here's the full application.yml. Note that we are not using Eureka. We will have multiple instances in the Ribbon... (below is the test setup on my local) We need to pass the cookies back and forth both upstream and downstream
spring:
application:
name: platform-gateway
zuul:
routes:
psm:
path: /platform-services-manager/**
serviceId: psm
stripPrefix: false
platform-home:
path: /platform-home/**
serviceId: ph
stripPrefix: false
session:
path: /SessionTracker/**
serviceId: session
stripPrefix: false
psm:
ribbon:
listOfServers: localhost:9080
session:
ribbon:
listOfServers: localhost:9080
ph:
ribbon:
listOfServers: localhost:9080
hystrix:
command:
default:
execution:
timeout:
enabled: false
ribbon:
ReadTimeout: 100000
ConnectTimeout: 100000
zuul.sensitiveHeaders:
Comment From: ryanjbaxter
It will be hard to figure out what is wrong without something that reproduces the problem. What does the cookie look like that if not making it downstream?
Comment From: madheshr
I was debugging the issue further. The application code does set the cooke as expected. However when i look at the response received, the cookie value is set to na. I set
zuul.debug.request: true to obtain additional zuul specific debug.. but it doesnt seem to work. I had to fallback to springboot level debug using logging.level.: DEBUG.
Comment From: ryanjbaxter
So did the logging show anything then?
Comment From: madheshr
Unfortunately no. There are no specific entries pertaining to the issue.
Comment From: spencergibb
It will be hard to figure out what is wrong without something that reproduces the problem
Comment From: spencergibb
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
Comment From: pokji2
Hi, how did you solve this problem?