Warehouse: API feature to request new project-scoped upload API token

Created on 8 Aug 2019  路  6Comments  路  Source: pypa/warehouse

From @takluyver:

Is there any plan for an API to create upload tokens? E.g. I'd like to have a command-line tool prompt me once for my password & 2FA code, then obtain and store a project-scoped token to use for uploads.

This is a followup to #994.

APIfeeds feature request needs discussion tokens

All 6 comments

I will be working on this issue next!

@brainwane I have a few questions regarding this issue. Should the command line tool be created in Twine? Should this tool create tokens for entire projects or should it implement the new caveats implemented in #6255 ?

As my request was a bit vague: what I'm really looking for is a public, documented HTTP interface for creating API tokens. I maintain a command line tool, which handles project uploads, and I'd like to extend it to use API tokens. But I'm not aware of any way to create them programmatically. Once the HTTP interface exists, no doubt other tools will use it too.

Thanks for working on it!

Sorry for the wait in replying to you @rcipkins -- I think @di or @ewdurbin would be better placed to answer you!

This may be part of (or blocked on) https://github.com/pypa/warehouse/issues/284 -- we don't currently have any authenticated APIs (aside from the upload API) but it seems reasonable that this would be part of some future JSON API which could support authentication.

~@takluyver can't you generate an unscoped macaroon and then narrow the scope of it with Caveats yourself before storing it?~
ah this was already mentioned

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LarsFronius picture LarsFronius  路  4Comments

nlhkabu picture nlhkabu  路  4Comments

nlhkabu picture nlhkabu  路  4Comments

toddrme2178 picture toddrme2178  路  3Comments

webknjaz picture webknjaz  路  4Comments