User scenario is as follows:
- Anonymous user navigates to website home page
- Automatically redirected to /login, which detects user is not authenticated & redirects to ADFS
- User authenticates on ADFS & redirects back to /login
- Login page processes the ADFS data, logs the user in as a virtual user, adds some Sitecore role & redirects user
- Users ends up on page they originally requested on step 1
Depending on the route taken, you get a different result
Route 1:
- CD 1 (home page)
- CD 1 (/login)
- External (ADFS)
- CD 1 (/login) - Sitecore roles applied
- CD 1 (home page) - user has retained the Sitecore roles applied
Route 2:
- CD 1 (home page)
- CD 1 (/login)
- External (ADFS)
- CD 1 (/login) - Sitecore roles applied
- CD 2 (home page) - user is missing the Sitecore roles applied from step 4
If you refresh the page on step 5, and receive CD 2 again the roles will be present. To test a theory, we added a 2 second delay after the roles have been saved to the user, step 4. In that instance, scenario 2 persists the roles after the redirect.
The above scenario & routes have been tested manually and also put through a load test to create higher volume.
Azure Landscape
Application Gateway >> Load Balancer >> 3 x CD (Virtual Machine Scale Set - D4s_v3) >> Redis (Standard C2)
Edit 1: Removed notion of Redis as it's clear it's not part of the equation.