blob: 207d544fb4ef0c05ee325a16a13f0c8cdeb6a0a7 [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.7.4
| Rendered using Apache Maven Fluido Skin 1.6
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Language" content="en" />
<title>Archiva Documentation &#x2013; Understanding Proxy Connector Configuration of Apache Archiva</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.6.min.css" />
<link rel="stylesheet" href="../css/site.css" />
<link rel="stylesheet" href="../css/print.css" media="print" />
<script type="text/javascript" src="../js/apache-maven-fluido-1.6.min.js"></script>
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-140879-5']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body class="topBarDisabled">
<div class="container-fluid">
<div id="banner">
<div class="pull-left"><a href="../../../" id="bannerLeft"><img src="../../../images/archiva.png" alt="Apache Archiva"/></a></div>
<div class="pull-right"><a href="http://www.apache.org/" id="bannerRight"><img src="https://www.apache.org/images/asf_logo_wide_2016.png" alt="Apache Software Foundation"/></a></div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li class=""><a href="http://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>
<li class=""><a href="../index.html" title="Apache Archiva">Apache Archiva</a><span class="divider">/</span></li>
<li class=""><a href="../../../index.html" title="Apache Archiva">Apache Archiva</a><span class="divider">/</span></li>
<li class="active ">Understanding Proxy Connector Configuration of Apache Archiva</li>
<li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2018-11-03</li>
<li id="projectVersion" class="pull-right">Version: 3.0.0-SNAPSHOT</li>
</ul>
</div>
<div class="row-fluid">
<div id="leftColumn" class="span2">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Introduction</li>
<li><a href="../quick-start.html" title="Quick Start"><span class="none"></span>Quick Start</a> </li>
<li><a href="../tour/index.html" title="Feature Tour"><span class="none"></span>Feature Tour</a> </li>
<li><a href="../release-notes.html" title="Release Notes"><span class="none"></span>Release Notes</a> </li>
<li><a href="../../../download.html" title="Downloads"><span class="none"></span>Downloads</a> </li>
<li class="nav-header">Users Guide</li>
<li><a href="../userguide/browsing.html" title="Browsing"><span class="none"></span>Browsing</a> </li>
<li><a href="../userguide/searching.html" title="Searching"><span class="none"></span>Searching</a> </li>
<li><a href="../userguide/delete-artifact.html" title="Deleting an Artifact"><span class="none"></span>Deleting an Artifact</a> </li>
<li><a href="../userguide/using-repository.html" title="Using as a repository"><span class="none"></span>Using as a repository</a> </li>
<li><a href="../userguide/deploy.html" title="Deploying to repository"><span class="none"></span>Deploying to repository</a> </li>
<li><a href="../userguide/virtual-repositories.html" title="Configuring Virtual Repositories"><span class="none"></span>Configuring Virtual Repositories</a> </li>
<li><a href="../userguide/rss.html" title="Rss Feeds in Archiva"><span class="none"></span>Rss Feeds in Archiva</a> </li>
<li><a href="../userguide/querying-artifacts.html" title="Querying Artifacts"><span class="none"></span>Querying Artifacts</a> </li>
<li class="nav-header">Administrators Guide</li>
<li><a href="../adminguide/installing.html" title="Installing Archiva"><span class="icon-chevron-right"></span>Installing Archiva</a> </li>
<li><a href="../adminguide/databases.html" title="Databases"><span class="none"></span>Databases</a> </li>
<li><a href="../adminguide/repositories-content-storage.html" title="Repositories Content Storage"><span class="none"></span>Repositories Content Storage</a> </li>
<li><a href="../adminguide/security.html" title="Security"><span class="icon-chevron-right"></span>Security</a> </li>
<li><a href="../adminguide/configuration.html" title="Archiva Configuration"><span class="icon-chevron-down"></span>Archiva Configuration</a>
<ul class="nav nav-list">
<li><a href="../adminguide/repositories.html" title="Repositories"><span class="none"></span>Repositories</a> </li>
<li class="active"><a href="#"><span class="none"></span>Proxy Connectors</a>
</li>
<li><a href="../adminguide/proxy-connector-rules.html" title="Proxy Connectors Rules"><span class="none"></span>Proxy Connectors Rules</a> </li>
<li><a href="../adminguide/network-proxies.html" title="Network Proxies"><span class="none"></span>Network Proxies</a> </li>
<li><a href="../adminguide/network-configuration.html" title="Network Configuration"><span class="none"></span>Network Configuration</a> </li>
<li><a href="../adminguide/legacy.html" title="Legacy (Maven 1) Support"><span class="none"></span>Legacy (Maven 1) Support</a> </li>
<li><a href="../adminguide/consumers.html" title="Consumers"><span class="none"></span>Consumers</a> </li>
<li><a href="../adminguide/staging-repositories.html" title="Staging Repositories"><span class="none"></span>Staging Repositories</a> </li>
<li><a href="../adminguide/appearance-configuration.html" title="Appearance Configuration"><span class="none"></span>Appearance Configuration</a> </li>
<li><a href="../adminguide/ui-configuration.html" title="UI Configuration"><span class="none"></span>UI Configuration</a> </li>
<li><a href="../adminguide/file-locking-configuration.html" title="File Locking Configuration"><span class="none"></span>File Locking Configuration</a> </li>
<li><a href="../adminguide/url-cache-failure-configuration.html" title="Url Failure Cache Configuration"><span class="none"></span>Url Failure Cache Configuration</a> </li>
<li><a href="../adminguide/redback-runtime-configuration.html" title="Redback Runtime Configuration"><span class="none"></span>Redback Runtime Configuration</a> </li>
</ul>
</li>
<li><a href="../adminguide/webservices/rest.html" title="REST Apis"><span class="none"></span>REST Apis</a> </li>
<li><a href="../adminguide/configuration-files.html" title="Configuration Files"><span class="none"></span>Configuration Files</a> </li>
<li><a href="../adminguide/system-status.html" title="System Status"><span class="none"></span>System Status</a> </li>
<li><a href="../adminguide/logging.html" title="Log Files"><span class="icon-chevron-right"></span>Log Files</a> </li>
<li><a href="../adminguide/reports.html" title="Reports"><span class="none"></span>Reports</a> </li>
<li class="nav-header">Customising Archiva</li>
<li><a href="../customising/writing-consumer.html" title="Writing a Consumer Plugin"><span class="none"></span>Writing a Consumer Plugin</a> </li>
<li class="nav-header">More Information</li>
<li><a href="http://cwiki.apache.org/confluence/display/ARCHIVA/Index" class="externalLink" title="Archiva Wiki"><span class="none"></span>Archiva Wiki</a> </li>
<li class="nav-header">ASF</li>
<li><a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink" title="How Apache Works"><span class="none"></span>How Apache Works</a> </li>
<li><a href="http://www.apache.org/foundation/" class="externalLink" title="Foundation"><span class="none"></span>Foundation</a> </li>
<li><a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsoring Apache"><span class="none"></span>Sponsoring Apache</a> </li>
<li><a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"><span class="none"></span>Thanks</a> </li>
<li class="nav-header">Project Documentation</li>
<li><a href="../project-info.html" title="Project Information"><span class="icon-chevron-right"></span>Project Information</a> </li>
</ul>
<form id="search-form" action="https://www.google.com/search" method="get" >
<input value="http://archiva.apache.org/docs/3.0.0-SNAPSHOT/" name="sitesearch" type="hidden"/>
<input class="search-query" name="q" id="query" type="text" />
</form>
<script type="text/javascript">asyncJs( 'https://cse.google.com/brand?form=search-form' )</script>
<hr />
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<div id="twitter">
<a href="https://twitter.com/archiva" class="twitter-follow-button" data-show-count="false" data-align="left" data-size="medium" data-show-screen-name="true" data-lang="en">Follow archiva</a>
<script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
<div class="clear"></div>
<div class="clear"></div>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" /></a>
</div>
</div>
</div>
<div id="bodyColumn" class="span10" >
<div class="section">
<h2><a name="Understanding_Proxy_Connector_Configuration_of_Apache_Archiva"></a>Understanding Proxy Connector Configuration of Apache Archiva</h2>
<p>Archiva uses the terminology &quot;proxy&quot; for two different concepts:</p>
<ul>
<li>The remote repository proxying cache, as configured through proxy connectors between repositories</li>
<li><a href="./network-proxies.html"> Network proxies</a>, which are traditional protocol based proxies (primarily for HTTP access to remote repositories over a firewall)</li></ul>
<p>A proxy connector is used to link a managed repository (stored on the Archiva machine) to a remote repository (accessed via a URL). This will mean that when a request is received by the managed repository, the connector is consulted to decide whether it should request the resource from the remote repository (and potentially cache the result locally for future requests).</p>
<p>Each managed repository can proxy multiple remote repositories to allow grouping of repositories through a single interface inside the Archiva instance. For instance, it is common to proxy all remote releases through a single repository for Archiva, as well as a single snapshot repository for all remote snapshot repositories.</p>
<p>A basic proxy connector configuration simply links the remote repository to the managed repository (with an optional network proxy for access through a firewall). However, the behaviour of different types of artifacts and paths can be specifically managed by the proxy connectors to make access to remote repositories more flexibly controlled.</p>
<div class="section">
<h3><a name="Proxy_Connectors"></a>Proxy Connectors</h3>
<div class="section">
<h4><a name="List_of_proxy_connectors"></a>List of proxy connectors</h4><img src="../images/proxy-connectors-list.png" alt="" /></div>
<div class="section">
<h4><a name="Configuring_order"></a>Configuring order</h4>
<p>You can configured repositories order using drag&amp;drop</p><img src="../images/proxy-connectors-order.png" alt="" /></div></div>
<div class="section">
<h3><a name="Configuring_policies"></a>Configuring policies</h3>
<p>When an artifact is requested from the managed repository and a proxy connector is configured, the policies for the connector are first consulted to decide whether to retrieve and cache the remote artifact or not. Which policies are applied depends on the type of artifact.</p>
<p>By default, Archiva comes with the following policies:</p>
<ul>
<li><tt>Releases</tt> - how to behave for released artifact metadata (those not carrying a <tt>SNAPSHOT</tt> version). This can be set to <tt>always</tt> (default), <tt>hourly</tt>, <tt>daily</tt>, <tt>once</tt> and <tt>never</tt>.</li>
<li><tt>Snapshots</tt> - how to behave for snapshot artifact metadata (those carrying a <tt>SNAPSHOT</tt> version). This can be set to <tt>always</tt> (default), <tt>hourly</tt>, <tt>daily</tt>, <tt>once</tt> and <tt>never</tt>.</li>
<li><tt>Checksum</tt> - how to handle incorrect checksums when downloading an artifact from the remote repository (ie, the checksum of the artifact does not match the corresponding detached checksum file). The options are to fail the request for the remote artifact, fix the checksum on the fly (default), or simply ignore the incorrect checksum</li>
<li><tt>Cache failures</tt> - whether failures retrieving the remote artifact should be cached (to save network bandwidth for missing or bad artifacts), or uncached (default).</li>
<li><tt>Return error when</tt> - if a remote proxy causes an error, this option determines whether an existing artifact should be returned (error when <tt>artifact not already present</tt>), or the error passed on regardless (<tt>always</tt>).</li>
<li><tt>On remote error</tt> - if a remote error is encountered, <tt>stop</tt> causes the error to be returned immediately, <tt>queue error</tt> will return all errors after checking for other successful remote repositories first, and <tt>ignore</tt> will disregard ay errors.</li></ul><img src="../images/proxy-connectors-policies.png" alt="" /></div>
<div class="section">
<h3><a name="Configuring_whitelists_and_blacklists"></a>Configuring whitelists and blacklists</h3>
<p>By default, all artifact requests to the managed repository are proxied to the remote repository via the proxy connector if the policies pass. However, it can be more efficient to configure whitelists and blacklists for a given remote repository that match the expected artifacts to be retrieved.</p>
<p>If only a whitelist is configured, all requests not matching one of the whitelisted elements will be rejected. Conversely, if only a blacklist is configured, all requests not matching one of the blacklisted elements will be accepted (while those matching will be rejected). If both a whitelist and blacklist are defined, a path must be listed in the whitelist and not in the blacklist to be accepted - all other requests are rejected.</p>
<p>The path in the whitelist or blacklist is a repository path, and not an artifact path, and matches the request and format of the remote repository. The characters <tt>*</tt> and <tt>**</tt> are wildcards, with <tt>*</tt> matching anything in the current path, while <tt>**</tt> matches anything in the current path and deeper in the directory hierarchy.</p>
<p>For instance, to only retrieve artifacts in the Apache group ID from a repository, but no artifacts from the Maven group ID, you would configure the following:</p>
<ul>
<li>White list: <tt>org/apache/**</tt></li>
<li>Black list: <tt>org/apache/maven/**</tt></li></ul><img src="../images/proxy-connectors-lists.png" alt="" /></div></div>
</div>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
<div class="row span12">Apache Archiva :: Documentation, Archiva :: Documentation, Apache, the Apache feather logo, and the Apache Archiva :: Documentation project logos are trademarks of The Apache Software Foundation.</div>
<div class="row span12">
<a href="http://archiva.apache.org/docs/3.0.0-SNAPSHOT/privacy-policy.html">Privacy Policy</a>
</div>
</div>
<div id="ohloh" class="pull-right">
<script type="text/javascript" src="https://www.ohloh.net/p/6670/widgets/project_basic_stats.js"></script>
</div>
</div>
</footer>
</body>
</html>