istio: Persistent session filter not working as expected from 1.19.x onwards

Is this the right place to submit this?

  • This is not a security vulnerability or a crashing bug
  • This is not a question about how to use Istio

Bug Description

I have implemented the persistent session filter as my application is stateful and requires sticky sessions to function correctly and the following istio setup works perfectly between 1.17.2 & 1.18.7. From 1.19.x the configuration no longer works, including the latest 1.20.x version.

For the working versions the session remains “sticky” for hours, however it lasts just over a minute when using 1.19.x onwards, at which time I’m logged out as the last request appears to have been sent to a different pod.

I have ran istioctl analyze and it hasn’t shown anything wrong with the configuration.

istio-flow-diagram drawio

Version

client version: 1.19.6
control plane version: 1.19.6
data plane version: 1.19.6 (62 proxies)

Client Version: v1.26.0
Kustomize Version: v4.5.7
Server Version: v1.25.16-eks-8cb36c9

Additional Information

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 40 (24 by maintainers)

Most upvoted comments

Envoy PR needs to merge first, than after we update envoy version in Istio my PR.

I am hoping to backport this at least to current version (if rel managers agree).

On Tue, Feb 6, 2024, 06:01 Graeme @.***> wrote:

Do you have an idea on when a build of istio will be available to test the various fixes linked to this issue? I would like to upgrade to the latest version of istio as soon as possible, since at the moment I am stuck on 1.18.X, which is out of support

— Reply to this email directly, view it on GitHub https://github.com/istio/istio/issues/49000#issuecomment-1929733672, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAUR2XAH67JWBJUTJM66NLYSIZT7AVCNFSM6AAAAABCK5BSW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRZG4ZTGNRXGI . You are receiving this because you were mentioned.Message ID: @.***>

Another likely bug (based on the headers and config): the cookie does not have “Expires” attribute, despite ttl being set to 120s. The other bug we are investigating has ttl=0, so explicit request for a session cookie.

I opened a bug on gateway API too - https://github.com/kubernetes-sigs/gateway-api/issues/2747

I can confirm the cookies are protobuf - when I first looked I didn’t pay attention to the ‘garbage’ in the output,

echo ChIxMDAuNjQuNjkuMjE3OjcwMDEQ2CQ= | base64 -d | od -t ax1 0000000 nl dc2 1 0 0 . 6 4 . 6 9 . 2 1 7 : 0a 12 31 30 30 2e 36 34 2e 36 39 2e 32 31 37 3a 0000020 7 0 0 1 dle X $ 37 30 30 31 10 d8 24