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 caveats to macaroons for expiration (time) and version #6255

Closed
alex opened this issue Jul 25, 2019 · 8 comments · Fixed by #11122
Closed

Add caveats to macaroons for expiration (time) and version #6255

alex opened this issue Jul 25, 2019 · 8 comments · Fixed by #11122
Labels
feature request help needed We'd love volunteers to advise on or help fix/implement this. needs discussion a product management/policy issue maintainers and users should discuss tokens Issues relating to API tokens

Comments

@alex
Copy link
Member

alex commented Jul 25, 2019

What's the problem this feature will solve?

This will allow further attenuating the permissions granted by an API key

Describe the solution you'd like

Addition of two addition types of caveat, project version (for uploads) and time (expiry).

@brainwane brainwane added needs discussion a product management/policy issue maintainers and users should discuss feature request labels Jul 25, 2019
@brainwane
Copy link
Contributor

This is a fine idea to add onto future work for #994 -- thank you! I believe it's out of scope for our current funding for security improvements to PyPI, sorry to say.

@di di added the tokens Issues relating to API tokens label Jul 29, 2019
@woodruffw
Copy link
Member

Another potentially useful caveat would be IP address/range, for future consideration.

@brainwane brainwane added the help needed We'd love volunteers to advise on or help fix/implement this. label Aug 8, 2019
@woodruffw
Copy link
Member

@rcipkins is going to take a stab at this!

@brainwane
Copy link
Contributor

@rcipkins -- how is this going?

@rachelcipkins
Copy link

@brainwane I am almost finished, I just need to fix a couple things and add tests!

@brainwane
Copy link
Contributor

@rcipkins - Great to hear!

It's a good idea to push your branch to your GitHub fork and start a "work in progress" ("WIP") pull request. That way:

  • in case your computer breaks or is lost/stolen, you haven't lost your progress
  • other people can easily see that you're working on the issue, and avoid accidentally duplicating your effort
  • it's easy to ask "am I on the right track?" questions about your general architectural approach, before spending time polishing stuff and fixing tests

To do this, push your branch to your fork, and create a pull request where the start of the PR title is "(WIP)".

Looking forward to seeing it!

@rachelcipkins
Copy link

Done! Thank you so much!

@woodruffw
Copy link
Member

NB: This is addressed by #11122.

(We'll need separate UI work to make that caveat useable with user-minted macaroons, but that PR will add all of the backend logic needed.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request help needed We'd love volunteers to advise on or help fix/implement this. needs discussion a product management/policy issue maintainers and users should discuss tokens Issues relating to API tokens
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants