Class SameSiteCookieHeaderFilter

java.lang.Object
net.shibboleth.shared.servlet.AbstractConditionalFilter
net.shibboleth.shared.spring.servlet.impl.SameSiteCookieHeaderFilter
All Implemented Interfaces:
Filter, ChainableFilter, Ordered

public class SameSiteCookieHeaderFilter extends AbstractConditionalFilter implements ChainableFilter
Implementation of Filter which adds the SameSite attribute to cookies, until the Java API supports it natively, if ever.

Explicitly named cookies are configured and placed into a Map of cookie name to same-site attribute value.

All other cookies may be assigned a default value.

Cookies with an existing same-site cookie flag are left unaltered - copied back into the response without modification.

A single cookie can only have at most one same-site value set. Attempts in the configuration to give more than one same-site value to a cookie are caught during argument injection and throw an IllegalArgumentException.