GitHub的通用OAuth实现|位桶| GitLab | Azure Devops
我正在建立一个Web应用程序,用户必须在Github中提供对其存储库的访问权限|位桶| GitLab |任何其他代码托管平台。
我已经通过OAuth2实现了它,我必须在所有平台上创建客户端应用程序。
最初,它仅范围范围为github |刻有水桶,但现在我希望我的Web应用程序也支持所有其他主要平台。
因此,我当前的实现要求我为所有其他平台创建客户端应用程序,这很忙,因为我们也希望支持本地版本控制系统。
是否有一种安全且通用的方法可以授权到版本控制系统?
一种解决方案是用户直接向我的Web应用程序提供其个人访问令牌(加密),以便我的应用程序可以保存这些pat并将其用于将以后提取存储库。
但是我想知道这是一种安全还是标准方法。如果不是这样,那么解决此问题的适当解决方案。
I am building a web application where users have to provide my web application access to their repositories in GitHub| Bit bucket| Git Lab | any other code hosting platform.
I have implemented it through OAuth2 for which I had to create client applications on all platforms separately.
Initially it was scoped only to GitHub | Bit Bucket but now I want my web application to support all other major platforms as well.
So my current implementation requires me to create client applications for all other plat platforms which is a hectic because We want to give support for On-Premise version control system as well.
Is there a secure and generic way to authorize to version control system ?
One solution is that user directly provide their Personal Access Tokens (Encrypted) to my web application so that my application can save these PAT and use them to pull the repositories in future.
But I wonder if this is a secure enough or a standard method. If not then what might be the appropriate solution to this problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能需要使用一个OAuth2提供商,例如:
dexidp/dex/dex
,一种使用OpenID Connect的身份服务来驱动其他应用程序的身份验证。DEX通过“ Connectors “,它可以支持您的目标< /p>
casdoor
,身份和访问管理(IAM)/单身 - 带有Web UI支持OAuth 2.0的Sign-On(SSO)平台,包括您的一些目标。oauth2并不是唯一的选择,因为 SmartGit 说明
You might need to use an Oauth2 provider like:
dexidp/dex
, an identity service that uses OpenID Connect to drive authentication for other apps.Dex acts as a portal to other identity providers through "connectors", which do support your targets
or
casdoor
, an Identity and Access Management (IAM) / Single-Sign-On (SSO) platform with web UI supporting OAuth 2.0, including some of your targets.Oauth2 is not the only option, as illustrated by SmartGit