Alternative to path based access control in Subversion

跟風遠走 提交于 2019-12-06 12:01:59

I'm not sure that even properties will do the trick, as they are versioned. So if you add a file and forget to set the property right away, a clever user could retrieve an earlier version of the file. You'd have to be willing to scrub the offending data from your dump file, which of course requires some down time.

Anyway, that's a problem you'll hit with almost any solution if someone makes a mistake and puts a file in the wrong place, in the wrong repo, or with the wrong properties. If you know some property of the ITAR files then you could write a hook to prevent them being put into the wrong part of the repository. Then you can look at solutions based on 'known sensitive' paths or even separate repositories and externals.

Otherwise you can look at putting a proxy in front of Apache that knows all the sensitive files, regardless of when they were designated as sensitive, and scrubs them out of the traffic for unauthorized users. It's a tricky problem.

Alternative to path based access control in Subversion

I don't know of a read-access restriction based soly on file properties.

the downside is that if a file becomes ITAR sensitive, it needs to be moved from one tree to the other.

That cannot be avoided, or easily automated without "race condition": you could set a property on that file, and have a cron job moving any file found in general to mil, but that means until that cron job runs, anyone having access to mil can have a look at that file.

An on-demand move between the two top folders (which acts like branches) is better.
The closest you can get to automate that move is by:

  • setting a property on the file
  • having an svn post-revprop hook running, which would detect that special property and do the move for you.
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!