{"id":588,"date":"2015-05-26T17:36:29","date_gmt":"2015-05-27T00:36:29","guid":{"rendered":"https:\/\/blogs.plm.automation.siemens.com\/t5\/Polarion-Blog\/Tech-Tips-Restricting-Repository-Access-Via-SVN-WebClient\/ba-p\/380968"},"modified":"2026-03-26T05:28:59","modified_gmt":"2026-03-26T09:28:59","slug":"tech-tips-restricting-repository-access-via-svn-webclient","status":"publish","type":"post","link":"https:\/\/blogs.sw.siemens.com\/polarion\/tech-tips-restricting-repository-access-via-svn-webclient\/","title":{"rendered":"Tech Tips: Restricting Repository Access Via SVN WebClient"},"content":{"rendered":"<p>Welcome to another post from the Polarion Technical Support Team. From time to time we face challenging situations when the solution of the problem is not obvious at first glance and some research around is necessary. Let me share with you one such case that we successfully resolved. <!--more--><br \/>\n<H2>When security isn&#8217;t quite secure enough<\/H2><br \/>\nYou probably are aware of Polarion&#8217;s multi-tier security architecture and granular permissions scheme that lets you fine tune who can access what. But you might encounter a&nbsp;situation&nbsp;when you require Polarion to be even more strict in its security, and setting permissions is not enough. Suppose, for example, that like one of our customers you want to restrict users&#8217; access to Polarion&#8217;s Subversion repository via the SVN WebClient, which appears in the UI as the Repository Browser topic. Our customer said they didn&#8217;t want allow their users to upload or download files using that feature.<\/p>\n<p>When I received the request asking how to restrict users from accessing the repository via SVN WebClient, I was convinced at first that it is absolutely not possible, as this component is tightly bundled within Polarion. Then I realized that it is at least possible to hide the Navigation topic in the UI. So in Polarion&#8217;s global administration, I went to the Portal &gt; Topics configuration and removed the XML element that makes the SVN WebClient (i.e. Repository Browser) available in the UI:<br \/>\n<CODE>&lt;topic id=&#8221;repository_browser&#8221;\/&gt;<\/CODE>.<\/p>\n<p>OK, so this solution prevented new and less experienced users from accessing the SVN WebClient. But what happens if some users have saved its URL, or they have the link in some email or chat history, or they get it from someone on some internet forum? If they have the URL, they can access the client even if it&#8217;s access point is hidden in Navigation. It took me quite some time to figure out, but I got an idea for a neat little hack: what if I make a redirect&nbsp;in Apache to some custom page? I thought that should definitely work&#8230; and it really does.<br \/>\n<H3>The great repo browser hack in Apache<\/H3><br \/>\nBy using Apache <EM>mod_rewrite<\/EM> you can redirect any page you want. With simple syntax written to the <EM>polarion.conf<\/EM> file and then restarting everything, I convinced Polarion not to display the SVN WebClient even if someone hits its URL. Here&#8217;s the end result of this simple but effective hack:<br \/>\n<P style=\"text-align: center;\"><A href=\"http:\/\/community.plm.automation.siemens.com\/legacyfs\/online\/siemensplm_blogs\/2015\/04\/polarion-blocked-svn-webclient.png\" rel=\"nofollow noopener noreferrer\"><IMG class=\"alignnone  wp-image-7318\" style=\"border: 1px solid #eee;\" src=\"http:\/\/community.plm.automation.siemens.com\/legacyfs\/online\/siemensplm_blogs\/2015\/04\/polarion-blocked-svn-webclient.png\" alt=\"Screenshot: result of Apache modification to block access to Polarion's Repository Browser\" width=\"786\" height=\"327\" \/><\/A><\/P><br \/>\n<P style=\"text-align: left;\">You can get inspired by the code below, where the important parameters of the rewrite rule are location of the SVN WebClient and a custom page that will be displayed in the portal instead of it.<\/P><br \/>\n<CODE>&lt;IfModule mod_rewrite.c&gt;<br \/>\nRewriteEngine on<br \/>\nRewriteRule ^\/polarion\/svnwebclient \/var\/www\/norepobrowser.html<br \/>\n&lt;\/IfModule&gt;<\/CODE><br \/>\n<H3>Still not tough enough?<\/H3><br \/>\nWhat if your goal is to deny access to the whole repository from <EM>any<\/EM> SVN client&#8230; such as TortoiseSVN? There&#8217;s a simple solution: you can deny access from all IP addresses except some specific one (<EM>localhost<\/EM> or a server\u2019s fully qualified domain name). The result is that nobody can access the repository from any address, using any client. Only Polarion itself, or an admin logged in to the server are eligible to access repository.<\/p>\n<p>In the Apache configuration file where the repository location is specified (normally <EM>polarionSVN.conf<\/EM>), it will be necessary to add directives that deny access from all IP addresses and just allow it from one specific one. These lines added to the &lt;\/repo&gt; location definition will get the job done:<\/p>\n<p><CODE>Order deny,allow<br \/>\nDeny from all<br \/>\nAllow from my.polarion.server.mydomain.com<\/CODE><\/p>\n<p>&#8230;where <EM>my.polarion.server.mydomain.com<\/EM> is the fully qualified domain name of the Polarion server (same as in the system configuration file <EM>polarion.properties<\/EM>).<br \/>\n<H3>Happy hacking!<\/H3><br \/>\nSometimes some light hacking of the Apache configuration is just the trick you need. But it&#8217;s something you should undertake with caution, and be sure you know what you&#8217;re doing. Never experiment with your production system! Remember that you can always download a copy of Polarion with it&#8217;s built-in 30-day 3-user evaluation license, and install it on some test machine. Remember too that Polarion&#8217;s Gold support plan is available, which provides a free staging server, and help from our experts with any highly individualistic needs you may have.<\/p>\n<p>In which other areas would you find this trick useful? Is there something you would like to see our support team blog about? Don\u2019t forget to leave us a comment.<\/p>\n<p><HR \/><\/p>\n<p>&nbsp;<br \/>\n<P style=\"text-align: center;\"><A href=\"http:\/\/www.polarion.com\/techsupport\/index.php#support-level\" rel=\"nofollow noopener noreferrer\"><IMG class=\"alignnone size-full wp-image-5839\" src=\"http:\/\/community.plm.automation.siemens.com\/legacyfs\/online\/siemensplm_blogs\/2014\/06\/polarion-silver-gold-support.jpg\" alt=\"Banner: It's all about solutions - Polarion Silver and Gold Support\" width=\"700\" height=\"150\" \/><\/A><\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to another post from the Polarion Technical Support Team. From time to time we face challenging situations when the solution of the problem is not obvious at first glance and some research ar&#8230;<\/p>\n","protected":false},"author":48696,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spanish_translation":"","french_translation":"","german_translation":"","italian_translation":"","polish_translation":"","japanese_translation":"","chinese_translation":"","footnotes":""},"categories":[1],"tags":[],"industry":[],"product":[],"coauthors":[],"class_list":["post-588","post","type-post","status-publish","format-standard","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/588","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/users\/48696"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/comments?post=588"}],"version-history":[{"count":1,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/588\/revisions"}],"predecessor-version":[{"id":589,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/588\/revisions\/589"}],"wp:attachment":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/media?parent=588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/categories?post=588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/tags?post=588"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/industry?post=588"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/product?post=588"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/coauthors?post=588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}