-
-
Notifications
You must be signed in to change notification settings - Fork 362
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
fix: response handling for session store (bearer + cookie) #916
base: master
Are you sure you want to change the base?
Conversation
till
commented
Feb 9, 2022
- Fix: response lost
- Chore: include tag/commit (instead of master)
- Fix: gzip handling
Codecov Report
@@ Coverage Diff @@
## master #916 +/- ##
===========================================
- Coverage 77.87% 65.66% -12.22%
===========================================
Files 80 104 +24
Lines 3924 4636 +712
===========================================
- Hits 3056 3044 -12
- Misses 589 1316 +727
+ Partials 279 276 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you for your contribution! This looks pretty good and I have some ideas how to improve it further :)
@aeneasr tried to address everything, let me know what you think. |
@aeneasr we are relying on this to work, is it possible to get this integrated soon? As we are now having issues with websockets (see ory/network#76), it's getting messy to maintain this downstream. We'd also like to update of course. |
Sorry for dropping the ball on this - I'm currently on my holidays but will try to find some time to review it :) |
I am not sure where to start, we run against ory platform and noticed that the response "from" oathkeeper did not contain a subject when it got to the backend service. I managed to find out that the "body" in `forwardRequestToSessionStore()` was nil/empty in some cases and the gjson calls failed silently. I started log.Printf() debugging in these two service files and simplified the code a bit to make it more readable. And that seemed to have fixed it.
Related: ory#836
Related: ory#836
@aeneasr everything but lint works, when I run |
Hi @till - sorry that I missed your comment. If you resolve the conflicts with master everything should pass and we can take this for another review spin :) |
@aeneasr seems like you implemented most of what we had (around preserving headers, settings, etc.) so this PR just adds test coverage for the original issue and fixes a bug where subject is not returned (where it is expected). |
- refactors test helpers into middleware_test.go - provides a "complete" response from the test server - complete response is necessary in order to provide subject (to allow the request)