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

Act as user instead of service #278

Merged
merged 10 commits into from
May 16, 2024
Merged

Act as user instead of service #278

merged 10 commits into from
May 16, 2024

Conversation

aktech
Copy link
Member

@aktech aktech commented May 15, 2024

Reference Issues or PRs

This is so that we have better control of fine-grained permissions on what a user can and cannot do instead of delegating these tasks to service, which has more permissions than user. Previously we were doing all the operations as service, this PR is undoing that.

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

Documentation

Access-centered content checklist

Text styling

  • The content is written with plain language (where relevant).
  • If there are headers, they use the proper header tags (with only one level-one header: H1 or # in markdown).
  • All links describe where they link to (for example, check the Nebari website).
  • This content adheres to the Nebari style guides.

Non-text content

  • All content is represented as text (for example, images need alt text, and videos need captions or descriptive transcripts).
  • If there are emojis, there are not more than three in a row.
  • Don't use flashing GIFs or videos.
  • If the content were to be read as plain text, it still makes sense, and no information is missing.

Any other comments?

Copy link

vercel bot commented May 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
jhub-apps ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2024 4:40pm
jhub-apps-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2024 4:40pm

Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

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

This looks like a very nice solution. I wonder what will be the overhead of using temporary tokens for each operations (after all they are added to database and commits are not free) but I suspect that this will be rather cheap.

jhub_apps/hub_client/hub_client.py Outdated Show resolved Hide resolved
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
@aktech
Copy link
Member Author

aktech commented May 16, 2024

This looks like a very nice solution. I wonder what will be the overhead of using temporary tokens for each operations (after all they are added to database and commits are not free) but I suspect that this will be rather cheap.

Yeah, ideally I would have preferred caching them and delete them after some delay, but didn't wanted to complicate logic until we know it's a problem in practice.

@aktech aktech merged commit 197ac4d into main May 16, 2024
25 checks passed
@aktech aktech deleted the act-as-user branch May 26, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants