admin管理员组文章数量:1399242
I have a CI-CD pipeline which builds and release a Python package into PyPi. An auth token is used for this and I have a new requirement to rotate/regenerate this token relatively regularly, maybe once per 6-12 months (for sake of security).
So the question is if it is possible to achieve in PyPi in automated fashion somehow? I checked PyPi's docs and help and looks like I need to use its UI and 2FA all the time to add a new token (and remove the old one) and I couldn't find any possibility how to automate this process.
I have a CI-CD pipeline which builds and release a Python package into PyPi. An auth token is used for this and I have a new requirement to rotate/regenerate this token relatively regularly, maybe once per 6-12 months (for sake of security).
So the question is if it is possible to achieve in PyPi in automated fashion somehow? I checked PyPi's docs and help and looks like I need to use its UI and 2FA all the time to add a new token (and remove the old one) and I couldn't find any possibility how to automate this process.
Share Improve this question asked Mar 25 at 15:53 artemdevelartemdevel 6411 gold badge10 silver badges21 bronze badges 2- 1 pypi./help/#trusted-publishers – phd Commented Mar 25 at 18:14
- @phd thanks! looks like this is what I need indeed! – artemdevel Commented Mar 26 at 8:16
1 Answer
Reset to default 0There is currently no way to automate this with PyPi. You could make a selenium script to generate a new token, however it may be clunky and would need to work separately from the rest of the script.
本文标签: securityIs it possible to automatically regenerate auth token for PyPiStack Overflow
版权声明:本文标题:security - Is it possible to automatically regenerate auth token for PyPi? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744184906a2594246.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论