Package io.netty.handler.codec.http3
Interface QpackSensitivityDetector
-
public interface QpackSensitivityDetectorDetermines whether a header field is sensitive, in which case the QPACK encoder- MUST NOT insert it into the dynamic table, and
- MUST encode it as a literal with the "Never Indexed" (
N=1) flag set as defined in RFC 9204 4.5.4 through 4.5.7.
This mirrors
io.netty.handler.codec.http2.Http2HeadersEncoder.SensitivityDetectorfrom the HTTP/2 / HPACK side.Setting
If the object can be dynamically modified and shared across multiple connections it may need to be thread safe.N=1prevents intermediaries from inserting the field into their own dynamic tables, which mitigates information disclosure via compression-based side channels (RFC 9204 7.1) for credentials such asAuthorization,Cookie,Set-CookieandProxy-Authorization.
-
-
Field Summary
Fields Modifier and Type Field Description static QpackSensitivityDetectorALWAYS_SENSITIVETreats every header field as sensitive.static QpackSensitivityDetectorNEVER_SENSITIVETreats every header field as non-sensitive.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisSensitive(java.lang.CharSequence name, java.lang.CharSequence value)Determine if a headername/valuepair is sensitive.
-
-
-
Field Detail
-
NEVER_SENSITIVE
static final QpackSensitivityDetector NEVER_SENSITIVE
Treats every header field as non-sensitive. This is the historical default behaviour of the QPACK encoder and is the backward-compatible choice.
-
ALWAYS_SENSITIVE
static final QpackSensitivityDetector ALWAYS_SENSITIVE
Treats every header field as sensitive.
-
-
Method Detail
-
isSensitive
boolean isSensitive(java.lang.CharSequence name, java.lang.CharSequence value)Determine if a headername/valuepair is sensitive.- Parameters:
name- the header field name.value- the header field value.- Returns:
trueif the field is sensitive and must be encoded withN=1and excluded from the dynamic table;falseotherwise.
-
-