-
Couldn't load subscription status.
- Fork 33
prototype: keyring backend for package manager sso auth flow #178
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
base: main
Are you sure you want to change the base?
Conversation
|
Thanks! Sorry for the really long wait. I think this is going to work just fine in the end, but I do have some big picture questions and it'll also need a bunch of small changes to make it appropriate for pak. 1. Does this need to be in keyring?This is probably in keyring because that was a good way to implement it for the Python client (pip), which has built-in support for the Python keyring package. But in R we have direct access to the package manager client (pak), so we might as well implement it there because it is not really a keyring backend. 2. How do I test this?Is the protocol a standard OAuth 2.0 workflow? It would be great to have a way to test this against a real PPM instance. Not necessarily for every test suite run, for that I can hopefully use 3. Smaller issuesTo use this in pak, we'd need to trim it down and get rid most of the new dependencies. Plus there are some more changes we need. This is a TODO list for myself:
|
|
@gaborcsardi Thanks for all your comments! I have a few thoughts in response:
No it doesn't. I think adding directly in
This is a standard OAuth 2.0 workflow, but with some Package Manager specific endpoints. A Package Manager admin configures the desired identity provider with the client ID / client secret, then clients (
That's why this is considered a PPM-specific implementation rather than a generic OAuth2.0 backend.
We test the What it does is:
Would this testing strategy be helpful in
Any dependencies and design choices made here were just to get a prototype out for discussion. We can remove or change anything you feel needs to be changed, with one exception. We should discuss the TOML file more, I'll describe that requirement more below.
We write to the If there is no way to write to a TOML file from
No server side events, I think polling is the standard OAuth2.0 way of doing the device access token request and response. I dug around for the RFC to double check and that seems to be the case: This section defines the polling behavior: |
|
@gaborcsardi - I remembered after I made this prototype we changed the payload for the auth endpoints to better match the oauth spec. I just pushed a small commit to get this working again so you have a better reference if you are the one going to be implementing this in |
This is a prototype experimenting with adding the PPM SSO flow into
keyringas a new backend. Here is how to use it (this assumes a Package Manager instance running locally with OIDC configured):This opens a new browser window for the auth flow.
@gaborcsardi Are we able to add a Package Manager specific backend? Is this set up properly to be easily consumed by
pakif it just is updated with the version ofkeyringthat has this newppmbackend?