Skip to content
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

Support for oauth2 token per user per host (vs per host only) #430

Closed
1 task done
gerilya opened this issue Dec 19, 2023 · 0 comments · Fixed by #435
Closed
1 task done

Support for oauth2 token per user per host (vs per host only) #430

gerilya opened this issue Dec 19, 2023 · 0 comments · Fixed by #435

Comments

@gerilya
Copy link

gerilya commented Dec 19, 2023

Describe the feature

Hello,

While using this package in Sagemaker Notebook I noticed that OAuth2 tokens are cached per host making it hard for multiple users to share a single notebook.
I think tokens should be cached per (host,user) pair and not just per host for the following reasons:

  • Security: token is user-specific and can't (and should not) be shared between users.
  • Granular access: there are use cases with granular access where different resources (schemas, tables) are accessed with different usernames/credentials. Having just 1 token per host makes it more difficult for developer to access different databases/tables within an application.
  • web service: similar to Sagemaker Notebook's use case, using this package within a webservice would require a workaround.
    This request is somewhat similar to Custom cache for oauth2 tokens, but offers a different approach to address it: rather than implementing a custom cache, extend official caching mechanism to support multi user token caching.
    Thank you

Describe alternatives you've considered

currently using a keyring with file-based backend which can be configured with a different filename per user.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant