Hi Javier,
An IAG instance creates an in-memory session for each connection (indexed by cookie) which maintains logged-in state after the initial SSO from the OIDC Provider. When you deploy a cluster of IAG instances for High Availability (or Load) you should make sure that whatever is providing the load-balancing is set up for "sticky" sessions. This is usually called "session affinity".
The capabilities available for session affinity may vary by Kubernetes provider and by the type of inbound service you use. Currently you're using a Load-Balancer service but you might also want to look at an Ingress (since this is HTTP traffic).
The two most common types of session affinity are based on either Client IP address or on a cookie injected into the traffic.
Using Client IP address for session affinity is the easiest approach but my give non-optimal results if the client IP address doesn't reach the load-balancing system. This could be because of up-stream proxies - either at the client location or at your server side location. It may prevent traffic from being evenly distributed.
Using a Cookie for session affinity usually gives even load-balancing but it requires the load-balancer to have access to the HTTP payload. This means it won't work for encrypted trafffic. The load-balancer must either perform SSL-offload itself or have something up-steam performing this off-load. This can be a security concern.
I know this isn't answer but I hope it helps you look into the options.
Jon.
------------------------------
Jon Harry
Consulting IT Security Specialist
IBM
------------------------------
Original Message:
Sent: Wed October 21, 2020 05:36 AM
From: Javier Garcia Pazos
Subject: IAG, multiple pods in Kuberentes
Hello,
I want to use IAG as my OIDC RP in Kubernetes. I got to make it worked with the help of people in this community. Now I am trying to get the best solution to it and I have several doubts:
1. What is the best approach to deploy it? I am using a LoadBalancer service linked to the IAG pod.
2. If I want to use more than one IAG pod, it will maintain sessions or do I have to change something?
Regards
------------------------------
Javier Garcia Pazos
------------------------------