envoyproxy / envoyproxy/envoy

Add configurable verification of HttpOnly cookies in JWTAuthentication filter

Open
#7,025 25 comments 4 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

*Title*: *Add configurable verification of HttpOnly cookies in JWTAuthentication filter*

*Problem*:
>One of the methods to protect against XSS attacks and token theft in web apps is the HttpOnly cookie that is set by the server, and that is not accessible from Javascript. A digest of the cookie value is recorded in the token and is verified by the server when the browser sends a request.

*Proposal*:
>It would be very useful for JWT Authentication filter to extract the value from the cookie, take a sha256 digest and verify that a claim with the corresponding value is in the token.

Headers:
>Cookie: secure_key=secure_value_1234567890

Envoy config
>verify_secure_cookie:
> key: "secure_key"
> transform: [sha256, plaintext]
> claim_name: "cookie_key"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.