-
Notifications
You must be signed in to change notification settings - Fork 491
SNOW-1825495 OAuth flows implementation #2135
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
SNOW-1825495 OAuth flows implementation #2135
Conversation
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.
Great!
A couple over-arching thoughts:
- I only really looked at the security semantics, we should have additional reviewers for the Pythonic HTTP bits.
- Ideally we find some way to add automated tests for this flow. Do we have browser automation testing, for example, that we could use to build an integration test?
We do this manually when we mess with the authentication code, otherwise we just don't touch these pieces of the code and we don't test them. None of them have any dependencies outside of std lib, so there's no need to |
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.
Broadly LGTM modulo a few minor comments!
We should have the "new owners" take a look too. This is complex and sensitive enough that I think it benefits from additional eyes.
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.
Nice! Stamped.
I'd really love more eyes on this, however. Can we perhaps involve the team taking over this driver to take a second look? There's enough security-sensitive handling here that more than one reviewer is ~necessary.
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.
Can you provide some testing? I think it can be done pretty easily. We could inject fake/mock webbrowser object and access token request? The fake web browser could do a redirect call immediately (extracted from the url).
a850492
to
3fbb1ed
Compare
8210acf
to
6bad2e1
Compare
f4d206c
to
dafeb5b
Compare
e920d82
to
984246e
Compare
…ken cache implementation as Authorization Code flow (#2225)
… get rid of port wildcard, and use dynamic redirect port when it's not user-defined
…horization Code authentication
…er is not available
Please answer these questions before submitting your pull requests. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-1825621
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
In this PR I add support for OUath authorization code flow. It's very similar to external browser authentication, but it uses oauth and more options are more better for users.
This change has been tested manually, as it's fairly complicated to setup and we don't do unit tests for the different authentication methods.
(Optional) PR for stored-proc connector: Not applicable