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

add support for bearer token and loading token from filesystem #45

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

wolfv
Copy link
Member

@wolfv wolfv commented Jan 2, 2024

No description provided.

@wolfv wolfv requested a review from janjagusch as a code owner January 2, 2024 14:26
@wolfv wolfv added the enhancement New feature or request label Jan 2, 2024
@janjagusch
Copy link
Collaborator

Thanks for the PR, @wolfv. I'll review this by EOW.

Copy link
Collaborator

@janjagusch janjagusch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, @wolfv. When was the support for Bearer tokens implemented into Quetz? I haven't seen any recent PR about that. Or is that something we get for free from FastAPI?

src/quetz_client/cli.py Outdated Show resolved Hide resolved
src/quetz_client/cli.py Outdated Show resolved Hide resolved
Comment on lines 32 to 35
if token:
return ApiKey(token)
elif bearer_token is not None:
return BearerToken(bearer_token)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does token default to an empty string but bearer_token defaults to None? Why don't both default to None?

src/quetz_client/cli.py Outdated Show resolved Hide resolved
src/quetz_client/cli.py Outdated Show resolved Hide resolved
@wolfv
Copy link
Member Author

wolfv commented Jan 30, 2024

Hey @janjagusch actually, it's not really implemented in quetz but useful in conjunction with a Google IAM Proxy. The IAM proxy takes a classic "bearer" token and then allows you to upload to quetz (when quetz is configured with the google IAP plugin that's in an open PR right now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants