Git Product home page Git Product logo

Comments (5)

irwinsun avatar irwinsun commented on June 10, 2024

gitlab是可以只使用accesstoken的, 你可以看看,不用ssh的方式。用accesstoken的方式, 这样你把accesstoken保存到【凭证管理】中 ,每年定期去更新这一个位置就可以了, 几百个仓库都引用这个accesstoken凭证,不就可以了?

image

以下图可以看看操作方式

image image image image

from bk-ci.

pengkang1991 avatar pengkang1991 commented on June 10, 2024

from bk-ci.

irwinsun avatar irwinsun commented on June 10, 2024

其实这个是个管理的问题, 用户期望的只使用账号密码,而不希望用token,只是单纯从维护角度来考虑, 但没有站在安全上考虑。 密码不过期一直是个安全上的大隐患, 如果贵司哪天安全团队要求让所有人的密码每3个月轮换一次,那么一样要面临这个问题。

然后我刚才又看了一下,你说的gitlab仓库需要 帐号密码+token 这个场景。 我找了一下,gitlab仓库只有2种凭证方式
1、 SSH私钥+私有Token
2、 AccessToken
并没有你说的 账号密码+token的场景。

先说说第1种: SSH私钥+私有Token。 SSH私钥是负责拉代码, 而Token是gitlab api需要的认证方式,如果没有token,则无法实现通过gitlab api去注册 webhook注册回调、拉分支、tag等一序列的操作。 因此token是必需要的。

第2种: AccessToken , 这个就是gitlab官方推荐的拉代码和api的统一认证方式。

最后,如果涉及到数十个项目要更新,那么最便捷的方式,就是通过平台的api调用去更新凭证是一个更好的办法

https://docs.bkci.net/reference/rest-api/certificate-resources/edit-credentials

还有一个问题就是,几百个仓库要分几十个项目去控制权限,而凭证管理又没有公共凭证,岂不是每个项目都要新增一个凭证,到时候修改起来也麻烦。

------------------ 原始邮件 ------------------ 发件人: "TencentBlueKing/bk-ci" @.>; 发送时间: 2024年5月20日(星期一) 上午10:09 @.>; @.@.>; 主题: Re: [TencentBlueKing/bk-ci] 蓝鲸7.1.2,蓝盾2.0,代码关联问题 (Issue #10329) gitlab是可以只使用accesstoken的, 你可以看看,不用ssh的方式。用accesstoken的方式, 这样你把accesstoken保存到【凭证管理】中 ,每年定期去更新这一个位置就可以了, 几百个仓库都引用这个accesstoken凭证,不就可以了? 以下图可以看看操作方式 image.png (view on web) image.png (view on web) image.png (view on web) image.png (view on web) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

from bk-ci.

irwinsun avatar irwinsun commented on June 10, 2024

补充一下,无论是用的哪个类型代码库,是github还是gitlab,本质上在关联时要求用哪种凭据,那都是目标代码库的要求, 不是用户所能决定要不要的

from bk-ci.

pengkang1991 avatar pengkang1991 commented on June 10, 2024

from bk-ci.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.