<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=WebExternalAuth</id>
	<title>WebExternalAuth - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=WebExternalAuth"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=WebExternalAuth&amp;action=history"/>
	<updated>2026-08-22T17:43:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=WebExternalAuth&amp;diff=4190&amp;oldid=prev</id>
		<title>Admin: 3 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=WebExternalAuth&amp;diff=4190&amp;oldid=prev"/>
		<updated>2016-04-06T20:39:41Z</updated>

		<summary type="html">&lt;p&gt;3 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Template:Outdated}}&lt;br /&gt;
&lt;br /&gt;
From the [[RT Config|RT_Config]].pm file:&lt;br /&gt;
&lt;br /&gt;
If $[[WebExternalAuth]] is defined, RT will defer to the environment&amp;#039;s REMOTE_USER variable.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
Just add the following lines to your [[RT SiteConfig|RT_SiteConfig]].pm file:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;# tells RT to use the REMOTE_USER provided by the web server&lt;br /&gt;
 Set($WebExternalAuth , 1);&lt;br /&gt;
 &lt;br /&gt;
 # tells RT to display its normal login screen if REMOTE_USER fails&lt;br /&gt;
 Set($WebFallbackToInternalAuth , 1);&lt;br /&gt;
 &lt;br /&gt;
 # tells RT to create users automatically if no user matching REMOTE_USER is found&lt;br /&gt;
 Set($WebExternalAuto , 1);&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then configure Apache to not authenticate the /[[NoAuth]] directory, so the rt-mailgate program can submit tickets.&lt;br /&gt;
&lt;br /&gt;
For example (using pwauth and mod_perl):&lt;br /&gt;
&lt;br /&gt;
 AddExternalAuth pwauth /usr/local/sbin/pwauth&lt;br /&gt;
 SetExternalAuthMethod pwauth pipe&lt;br /&gt;
 &lt;br /&gt;
 &amp;amp;lt;Location /&amp;amp;gt;&lt;br /&gt;
   SetHandler perl-script&lt;br /&gt;
   PerlHandler RT::Mason&lt;br /&gt;
 &lt;br /&gt;
   AuthType Basic&lt;br /&gt;
   AuthName rtauth&lt;br /&gt;
   AuthExternal pwauth&lt;br /&gt;
   require valid-user&lt;br /&gt;
 &amp;amp;lt;/Location&amp;amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;amp;lt;LocationMatch &amp;quot;/NoAuth&amp;quot;&amp;amp;gt;&lt;br /&gt;
     Satisfy Any&lt;br /&gt;
     Allow from all&lt;br /&gt;
 &amp;amp;lt;/LocationMatch&amp;amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Adjust for your particular authentication method and webserver configuration.&lt;br /&gt;
&lt;br /&gt;
= Notes that has been added to the [FAQ] where they don&amp;#039;t belong =&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TODO:&amp;#039;&amp;#039;&amp;#039; refactor me into good looking combined text&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: I use [[WebExternalAuth]] to authenticate my users. When I turn it on E-Mail to queues stop working with a &amp;quot;401 Authorization Required&amp;quot; error. How can I make the mail gateway authenticate to the web server?&lt;br /&gt;
&lt;br /&gt;
A: Turn off the authentication requirement for all &amp;quot;[[NoAuth]]&amp;quot; directories. For Apache edit the server-wide httpd.conf file and add the following in RT&amp;#039;s [[VirtualHost]] section (change the &amp;quot;/opt/rt3&amp;quot; to point to your installation):&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;Directory /opt/rt3/share/html/REST/1.0/NoAuth&amp;amp;gt;&lt;br /&gt;
     SetHandler perl-script&lt;br /&gt;
     PerlHandler RT::Mason&lt;br /&gt;
     satisfy any&lt;br /&gt;
     allow from all&lt;br /&gt;
 &amp;amp;lt;/Directory&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;Directory /opt/rt3/share/html/NoAuth&amp;amp;gt;&lt;br /&gt;
     SetHandler perl-script&lt;br /&gt;
     PerlHandler RT::Mason&lt;br /&gt;
     satisfy any&lt;br /&gt;
     allow from all&lt;br /&gt;
 &amp;amp;lt;/Directory&amp;amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
A2: You may find that you need to use Location directives within the virtual host instead. This worked for me whereas Directory did not. (using fastcgi, obviously, on apache 2.0.x, under mod_auth_kerberos.)&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;Location /REST/1.0/NoAuth&amp;amp;gt;&lt;br /&gt;
     SetHandler fastcgi-script&lt;br /&gt;
     allow from all&lt;br /&gt;
     satisfy any&lt;br /&gt;
 &amp;amp;lt;/Location&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;Location /NoAuth&amp;amp;gt;&lt;br /&gt;
     SetHandler fastcgi-script&lt;br /&gt;
     allow from all&lt;br /&gt;
     satisfy any&lt;br /&gt;
 &amp;amp;lt;/Location&amp;amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>