-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support dropping skipperOauthOidc cookie #3459
Comments
cc @universam1 |
Hmm @AlexanderYastrebov why do we even forward cookies to the backend? |
Right, the cookie is an encrypted blob intended only for Skipper so it should be safe just to drop it after authenticating. We do this for oauthGrant() skipper/filters/auth/grantcookie.go Lines 93 to 100 in 6b448b1
but apparently not for OIDC. This also seems to fit #3455 |
Thank you for the very quick feedback, @szuecs @AlexanderYastrebov ! 🙌 |
The `skipperOauthOidc` cookies are only intended for Skipper, so they don't need to be forwarded to the application. With this PR we simply drop those cookies before forwarding the request. This will reduce the overall header size of requests. The implementation is inspired by the [`oauthGrant` filter](https://github.com/zalando/skipper/blob/6b448b1fe90cc113e365be8fba7cd6d122ad7a6d/filters/auth/grantcookie.go#L93-L100) Closes zalando#3459 Signed-off-by: Andreas Skorczyk <[email protected]>
Is your feature request related to a problem? Please describe.
Some of our applications can't easily handle the size of the header forwarded by Skipper. This is mainly due to the
skipperOauthOidc*
cookies, which the application doesn't even use. We were thinking of just dropping theskipperOauthOidc*
cookies when forwarding the request.Describe the solution you would like
We thought of two different approaches we could take:
oauthOidc*
filters to drop the OIDC cookies before forwarding it. This could be hidden behind a feature flag and turned off by defaultdropRequestCookie
filter to drop based on a regex. This could be turned off by default, but enabled by an optional parameter. Something likedropRequestCookie("skipperOauthOidc.*", "true")
.Describe alternatives you've considered (optional)
We could probably get it to work with a custom Lua script as well, but it seems a bit fiddly.
Would you like to work on it?
Yes
The text was updated successfully, but these errors were encountered: