如何巧妙地限制团队成员的源代码访问?
以前我一个人工作……现在我可能有很多合作者。但我不想授予对源代码的完全访问权限(现在由 SVN 控制)。迁移到 Git 或 Mercurial 实际上并不是什么大问题。但控制安全性的最佳方式和最少的麻烦是什么?您不需要输入命令提示符并执行代码来更改某些权限以限制每秒对团队成员的访问?有没有一个 Web 控件可以实现这个功能?
Previously I've worked alone... Now I may have many collaborators. But I don't want to give full access to the source code (which is controlled now with SVN). Moving to Git or Mercurial is actually not a big deal. But what is the best way and with the least headaches to control security? Where you don't need to enter a command prompt and execute code to change some permissions to limit access to team members every second? Is there a Web control for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
如果您使用 Apache 的 SVN
mod_dav
设置,您可以使用基于路径的授权根据预定义的组权限来限制不同的人可以访问哪些目录。这里有一个广泛的教程:SVN 中基于路径的授权
If you are using a
mod_dav
setup for SVN with Apache, you can use Path-Based Authorization to limit which directories different people have access to according to predefined group permissions.There is an extensive tutorial here: Path-Based Authorization in SVN
如果离开 svn 服务器没什么大不了的,你可以看看 gitosis 或 gitolite http://engineeredweb.com/blog/10/2/building-your-own-git-server
它们都允许您轻松管理存储库的安全性
if leaving svn server is not a big deal you can take a look at gitosis or gitolite http://engineeredweb.com/blog/10/2/building-your-own-git-server
Their both allow you to easily manage the security of your repositories
作为服务器上的预提交挂钩,您应该能够知道哪个用户正在提交以及他们正在尝试提交到哪个分支。如果您检测到他们正在尝试提交到主干或标签(假设标准存储库配置),您可能会导致提交失败。
这将限制他们致力于分支机构。然后,您可以控制哪些分支重新集成到主干中并提交。
我们的设置有点相似,创建标签后,标签下的任何内容都不能更改。
As a pre-commit hook on the server you should be able to tell which user is committing and to which branch they're attempting to commit. If you detect that they're trying to commit to either trunk or tags (assuming a standard repository configuration) you could simply fail the commit.
That would limit them to committing to branches. You could then exercise control over which branches are reintegrated into trunk and committed.
Our setup is a little similar in that nothing under tags may be changed after the tag is created.
如果您想在执行开发过程时限制写入访问权限,请查看 Gerrit ,一个存储库托管和代码审查系统。
If you want to limit write access as part of enforcing your development process, have a look at Gerrit, a repository hosting and code review system.
如果您在 Linux 下使用 SVN 服务器,submin 在保护分支方面做得很好。它通过易于使用的界面向您隐藏基于路径的授权。
If you are using SVN server under Linux, submin does a great job with protecting branches. It hides the path based authorization from you with an easy to use interface.