-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
propagate context through to the sql store #1030
propagate context through to the sql store #1030
Conversation
Unit tests pass for me locally. |
Would it make sense to propagate context down to other stores too? |
Yes, it definitely does. Would you like me to do this in this PR @aeneasr? Edit: I'll just jump on it! |
…integration Signed-off-by: Amir Aslaminejad <aslaminejad@gmail.com>
Signed-off-by: Amir Aslaminejad <aslaminejad@gmail.com>
Signed-off-by: Amir Aslaminejad <aslaminejad@gmail.com>
Signed-off-by: Amir Aslaminejad <aslaminejad@gmail.com>
…t and propagate context Signed-off-by: Amir Aslaminejad <aslaminejad@gmail.com>
Signed-off-by: Amir Aslaminejad <aslaminejad@gmail.com>
dde0593
to
e5cf6b8
Compare
ℹ️ Update: • Client manager and handler have been updated to pass along context Remaining handlers (will check these on Monday): • Consent |
@aeneasr at this point I am a bit concerned that the PR is getting too large 😬. Could you review this as is and let me know if you want me to proceed with the Consent and JWK handlers in here or as a separate PR. They can be 🚀'ed independently. |
It's definitely a bit larger, but that's fine as there's no functional change so it's very easy to review. So far this looks good to me! |
Do you want to address the rest of the managers in this PR as well? You can also create another one - it doesn't really matter to me :) Maybe it's best to have the context in one commit (the one I'll squash when merging this) |
@aeneasr it's all good, i'll do it all in this PR. Tackling through this now - I shall keep posting updates here as I make progress or find out new things that need doing. |
Signed-off-by: Amir Aslaminejad <aslaminejad@gmail.com>
Update: • JWK manager and all of it's clients have been updated ✅ Coming up: • Updating the JWTStrategy to pass along context where appropriate - (See comment below) |
@aeneasr I believe the JWTStrategy interface in fosite needs to be updated to take in a context. Why? The implementation of this interface in Hydra makes calls to the db to fetch the latest keys:
The oauth handler consumes the Generate method. Could you please confirm if this makes sense before I proceed with the plumbing? If so I believe this would require:
|
…t and update all consumers Signed-off-by: Amir Aslaminejad <aslaminejad@gmail.com>
Update: Consent Manager and all of its clients have been updated to pass along context. All that is left is the JWT Strategy which I have outlined a plan for above. If that makes sense, I can jump on it. @aeneasr ready for another review 🙏 |
Ah yeah, that makes sense regarding JWT Strategy. It will also improve the API contract in fosite, which is using context almost everywhere anyways (well, except there and in bcrypt). |
Wow this is massive! But looks good to me so far! |
Thank you for your contribution! |
With the introduction of #1019 we will need to start propagating the request context down to sql store(s) so we can instrument our database calls.
Notes: