Skip to content

Revert changes introduced in PR #663#814

Closed
ggmoy wants to merge 1 commit intoenvoyproxy:mainfrom
ggmoy:revert-pr-663-changes
Closed

Revert changes introduced in PR #663#814
ggmoy wants to merge 1 commit intoenvoyproxy:mainfrom
ggmoy:revert-pr-663-changes

Conversation

@ggmoy
Copy link
Copy Markdown
Contributor

@ggmoy ggmoy commented Aug 15, 2025

Description

The changes introduced in envoyproxy/envoy PR #40228 and envoyproxy/examples PR #663 broke the passthrough functionality of the OAuth2 filter: OAuth2 cookies were removed for requests matching the pass_through_matcher configuration. This affected setups with multiple OAuth2 filter instances using different pass_through_matcher configurations, because the first matching instance removed the OAuth2 cookies--even when a passthrough was intended--impacting subsequent filters that still needed those cookies.

This PR reverts the changes introduced by envoyproxy/examples PR #663 and unblocks envoyproxy/envoy PR #40228.

@phlax
Copy link
Copy Markdown
Member

phlax commented Aug 15, 2025

@zhaohuabing for some reason im unable to assign you this - would you mind reviewing

@phlax phlax self-assigned this Aug 15, 2025
@phlax
Copy link
Copy Markdown
Member

phlax commented Aug 15, 2025

@ggmoy not sure why ci is not running on this - could you amend commit or add an empty commit to try and force it

@ggmoy ggmoy force-pushed the revert-pr-663-changes branch from a4b1a61 to c3fd07a Compare August 15, 2025 21:06
Signed-off-by: Gustavo Moyano <gustavo.g.moyano@gmail.com>
@ggmoy ggmoy force-pushed the revert-pr-663-changes branch from c3fd07a to 3918673 Compare August 15, 2025 21:07
@ggmoy
Copy link
Copy Markdown
Contributor Author

ggmoy commented Aug 15, 2025

@ggmoy not sure why ci is not running on this - could you amend commit or add an empty commit to try and force it

@phlax, I added a test commit just to force the CI (I'll revert it then). I can see the following message on the checks tab:

This workflow is awaiting approval from a maintainer in #814.

@zhaohuabing
Copy link
Copy Markdown
Member

zhaohuabing commented Aug 18, 2025

@ggmoy Do we need the cookie attributes in the request to make PR envoyproxy/envoy#40718 work?

@phlax
Copy link
Copy Markdown
Member

phlax commented Aug 18, 2025

ah yep - apologies @ggmoy - i was travelling and didnt check properly - kicked ci and its passing

@phlax
Copy link
Copy Markdown
Member

phlax commented Aug 18, 2025

@zhaohuabing once you approve happy to move these prs through

@ggmoy ggmoy force-pushed the revert-pr-663-changes branch from 7e4e2b9 to 3918673 Compare August 18, 2025 09:17
@zhaohuabing
Copy link
Copy Markdown
Member

@zhaohuabing once you approve happy to move these prs through

I'm a little lost here - why do we need cookie attributes for the requests?

@ggmoy
Copy link
Copy Markdown
Contributor Author

ggmoy commented Aug 18, 2025

@ggmoy Do we need the cookie attributes in the request to make PR envoyproxy/envoy#40718 work?

Good point, @zhaohuabing. Just looking a little deeper, the changes introduced in PR [#663] should not be affecting. Let me try to run those tests locally to understand why the BearerToken can't be found in token_storage when the call to /hub/user is made.

@ggmoy
Copy link
Copy Markdown
Contributor Author

ggmoy commented Aug 18, 2025

@zhaohuabing once you approve happy to move these prs through

I'm a little lost here - why do we need cookie attributes for the requests?

@zhaohuabing , the BearerToken cookie is needed to access /hub/user. You can see this in line 27.

@zhaohuabing
Copy link
Copy Markdown
Member

zhaohuabing commented Aug 18, 2025

@zhaohuabing , the BearerToken cookie is needed to access /hub/user. You can see this in line 27.

Yes, but does the current shell already extracts the BearerToken from the response and use it in the request?

TOKEN=$(echo "$RESPONSE" | grep "set-cookie: BearerToken=" | sed -E 's/^set-cookie: (BearerToken=[^;]+);.*$/\1/')

@ggmoy
Copy link
Copy Markdown
Contributor Author

ggmoy commented Aug 18, 2025

@zhaohuabing , the BearerToken cookie is needed to access /hub/user. You can see this in line 27.

Yes, but does the current shell already extracts the BearerToken from the response and use it in the request?

TOKEN=$(echo "$RESPONSE" | grep "set-cookie: BearerToken=" | sed -E 's/^set-cookie: (BearerToken=[^;]+);.*$/\1/')

Yes, it does. You can see it in the output of the failing of job #48171552179. It is calling curl with the extracted BearerToken:

1257 ERROR: curl (http://localhost:11901/hub/user --cookie OauthHMAC=SqqBu46Ff0h5gaLHs1ifwiBhVfBGE4Zswfq9MIVZUnQ= --cookie OauthExpires=1755267220 --cookie BearerToken=oDrkjNsyWJ0QCl1Yieul-u9Q0ngz5ViEs3UNAMADvDGT8kG9vSbWthAbQAdgY9z8fecP2s4N4xJ4rznxTzBWbA)

@ggmoy
Copy link
Copy Markdown
Contributor Author

ggmoy commented Aug 18, 2025

@zhaohuabing / @phlax, I found the issue. It is not related with the changes introduced in PR [#663]. So sorry for the confusion!

I'll close this PR and open a new one with the final fix.

@ggmoy ggmoy closed this Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants