-
Notifications
You must be signed in to change notification settings - Fork 291
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
Add PKCEAuthenticator implementation in Rust #2416
Closed
austin362667
wants to merge
11
commits into
flyteorg:flyrs
from
austin362667:austin362667/flyrs/pkce_authentication
Closed
Add PKCEAuthenticator implementation in Rust #2416
austin362667
wants to merge
11
commits into
flyteorg:flyrs
from
austin362667:austin362667/flyrs/pkce_authentication
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## flyrs #2416 +/- ##
========================================
Coverage ? 87.56%
========================================
Files ? 37
Lines ? 1608
Branches ? 0
========================================
Hits ? 1408
Misses ? 200
Partials ? 0 ☔ View full report in Codecov by Sentry. |
austin362667
force-pushed
the
austin362667/flyrs/pkce_authentication
branch
6 times, most recently
from
May 16, 2024 17:41
f4caf6e
to
9feb2a6
Compare
Signed-off-by: Austin Liu <austin362667@gmail.com> doc Signed-off-by: Austin Liu <austin362667@gmail.com>
Signed-off-by: Austin Liu <austin362667@gmail.com> nit Signed-off-by: Austin Liu <austin362667@gmail.com>
Signed-off-by: Austin Liu <austin362667@gmail.com> fmt Signed-off-by: Austin Liu <austin362667@gmail.com> wip Signed-off-by: Austin Liu <austin362667@gmail.com> fmt Signed-off-by: Austin Liu <austin362667@gmail.com> fmt Signed-off-by: Austin Liu <austin362667@gmail.com>
Signed-off-by: Austin Liu <austin362667@gmail.com> wip Signed-off-by: Austin Liu <austin362667@gmail.com> wip Signed-off-by: Austin Liu <austin362667@gmail.com> wip Signed-off-by: Austin Liu <austin362667@gmail.com> wip Signed-off-by: Austin Liu <austin362667@gmail.com> wip Signed-off-by: Austin Liu <austin362667@gmail.com> wip Signed-off-by: Austin Liu <austin362667@gmail.com>
Signed-off-by: Austin Liu <austin362667@gmail.com>
Signed-off-by: Austin Liu <austin362667@gmail.com>
austin362667
force-pushed
the
austin362667/flyrs/pkce_authentication
branch
from
May 28, 2024 17:25
9feb2a6
to
65bda65
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tracking issue
flyteorg/flyte#5344
Why are the changes needed?
To upgrade a gRPC channel to an authenticated one, we must obtain the credentials that will be attached to every gRPC call, similar to what the Flytekit Remote Client does.
There are several ways to achieve this goal, for example:
So we can narrow down our choices to the following approach:
Implement the OAuth flow in Rust, at least supporting the PKCE flow.
Here are some useful packages:
Moreover, even we can pass authenticated credentials from original Python authenticator into Rust channel, it seems much ado about nothing.
Because if we can't have a pure and lite gRPC client with authentication-included in Rust, It can be challenging for them to authenticate without a Python environment, If someone wants to only enable Rust remote in their Rust code.
Considering the two aforementioned options, we can still retain the ability to return authenticated credentials from Python and reimplement another new
oauth2
authenticator in Rust.What changes were proposed in this pull request?
How was this patch tested?
WIP
cargo run
executesauthenticator::PKCEAuthentication();
atsrc/main.py
.auth_url
by clicking a link (will open a new browser tab).access_token
.Setup process
You need to set up the external authentication provider, like Auth0
Screenshots
Check all the applicable boxes
Related PRs
Docs link