]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_authnz_fcgi.html.en
86a50cb435f9f20d91be53b8c9fde665594166fe
[apache] / docs / manual / mod / mod_authnz_fcgi.html.en
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
4 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
5 <!--
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7               This file is generated from xml source: DO NOT EDIT
8         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
9       -->
10 <title>mod_authnz_fcgi - Apache HTTP Server Version 2.5</title>
11 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
12 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
13 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
14 <script src="../style/scripts/prettify.min.js" type="text/javascript">
15 </script>
16
17 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
18 <body>
19 <div id="page-header">
20 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
21 <p class="apache">Apache HTTP Server Version 2.5</p>
22 <img alt="" src="../images/feather.png" /></div>
23 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
24 <div id="path">
25 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.5</a> &gt; <a href="./">Modules</a></div>
26 <div id="page-content">
27 <div id="preamble"><h1>Apache Module mod_authnz_fcgi</h1>
28 <div class="toplang">
29 <p><span>Available Languages: </span><a href="../en/mod/mod_authnz_fcgi.html" title="English">&nbsp;en&nbsp;</a></p>
30 </div>
31 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Allows a FastCGI authorizer application to handle Apache
32 httpd authentication and authorization</td></tr>
33 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
34 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>authnz_fcgi_module</td></tr>
35 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_authnz_fcgi.c</td></tr>
36 <tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.4.10 and later</td></tr></table>
37 <h3>Summary</h3>
38
39     <p>This module allows FastCGI authorizer applications to
40     authenticate users and authorize access to resources.  It supports
41     generic FastCGI authorizers which participate in a single phase
42     for authentication and authorization as well as Apache httpd-specific
43     authenticators and authorizors which participate in one or both
44     phases.</p>
45
46     <p>FastCGI authorizers can authenticate using user id and password,
47     such as for Basic authentication, or can authenticate using arbitrary
48     mechanisms.</p>
49 </div>
50 <div id="quickview"><h3>Topics</h3>
51 <ul id="topics">
52 <li><img alt="" src="../images/down.gif" /> <a href="#invocations">Invocation modes</a></li>
53 <li><img alt="" src="../images/down.gif" /> <a href="#examples">Additional examples</a></li>
54 <li><img alt="" src="../images/down.gif" /> <a href="#limitations">Limitations</a></li>
55 <li><img alt="" src="../images/down.gif" /> <a href="#logging">Logging</a></li>
56 </ul><h3 class="directives">Directives</h3>
57 <ul id="toc">
58 <li><img alt="" src="../images/down.gif" /> <a href="#authnzfcgicheckauthnprovider">AuthnzFcgiCheckAuthnProvider</a></li>
59 <li><img alt="" src="../images/down.gif" /> <a href="#authnzfcgidefineprovider">AuthnzFcgiDefineProvider</a></li>
60 </ul>
61 <h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&amp;list_id=144532&amp;product=Apache%20httpd-2&amp;query_format=specific&amp;order=changeddate%20DESC%2Cpriority%2Cbug_severity&amp;component=mod_authnz_fcgi">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&amp;component=mod_authnz_fcgi">Report a bug</a></li></ul><h3>See also</h3>
62 <ul class="seealso">
63 <li><a href="../howto/auth.html">Authentication, Authorization,
64 and Access Control</a></li>
65 <li><code class="module"><a href="../mod/mod_auth_basic.html">mod_auth_basic</a></code></li>
66 <li><code class="program"><a href="../programs/fcgistarter.html">fcgistarter</a></code></li>
67 <li><code class="module"><a href="../mod/mod_proxy_fcgi.html">mod_proxy_fcgi</a></code></li>
68 <li><a href="#comments_section">Comments</a></li></ul></div>
69 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
70 <div class="section">
71 <h2><a name="invocations" id="invocations">Invocation modes</a></h2>
72
73     <p>The invocation modes for FastCGI authorizers supported by this
74     module are distinguished by two characteristics, <em>type</em> and
75     auth <em>mechanism</em>.</p>
76
77     <p><em>Type</em> is simply <code>authn</code> for authentication,
78     <code>authz</code> for authorization, or <code>authnz</code> for
79     combined authentication and authorization.</p>
80
81     <p>Auth <em>mechanism</em> refers to the Apache httpd configuration
82     mechanisms and processing phases, and can be <code>
83     AuthBasicProvider</code>, <code>Require</code>, or <code>
84     check_user_id</code>.  The first two of these
85     correspond to the directives used to enable participation in the
86     appropriate processing phase.</p>
87
88     <p>Descriptions of each mode:</p>
89
90     <dl>
91       <dt><em>Type</em> <code>authn</code>, <em>mechanism</em>
92       <code>AuthBasicProvider</code></dt>
93
94       <dd>In this mode,
95       <code>FCGI_ROLE</code> is set to <code>AUTHORIZER</code> and
96       <code>FCGI_APACHE_ROLE</code> is set to <code>AUTHENTICATOR</code>.
97       The application must be defined as provider type <em>authn</em>
98       using <code class="directive"><a href="#authnzfcgidefineprovider">
99       AuthnzFcgiDefineProvider</a></code> and enabled with
100       <code class="directive"><a href="../mod/mod_auth_basic.html#authbasicprovider">AuthBasicProvider</a></code>.
101       When invoked, the application is
102       expected to authenticate the client using the provided user id and
103       password.  Example application:
104
105 <pre class="prettyprint lang-perl">#!/usr/bin/perl
106 use FCGI;
107 my $request = FCGI::Request();
108 while ($request-&gt;Accept() &gt;= 0) {
109     die if $ENV{'FCGI_APACHE_ROLE'} ne "AUTHENTICATOR";
110     die if $ENV{'FCGI_ROLE'}        ne "AUTHORIZER";
111     die if !$ENV{'REMOTE_PASSWD'};
112     die if !$ENV{'REMOTE_USER'};
113
114     print STDERR "This text is written to the web server error log.\n";
115
116     if ( ($ENV{'REMOTE_USER' } eq "foo" || $ENV{'REMOTE_USER'} eq "foo1") &amp;&amp;
117         $ENV{'REMOTE_PASSWD'} eq "bar" ) {
118         print "Status: 200\n";
119         print "Variable-AUTHN_1: authn_01\n";
120         print "Variable-AUTHN_2: authn_02\n";
121         print "\n";
122     }
123     else {
124         print "Status: 401\n\n";
125     }
126 }</pre>
127
128
129       Example configuration:
130 <pre class="prettyprint lang-config">AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10102/
131 &lt;Location "/protected/"&gt;
132   AuthType Basic
133   AuthName "Restricted"
134   AuthBasicProvider FooAuthn
135   Require ...
136 &lt;/Location&gt;</pre>
137
138       </dd>
139
140       <dt><em>Type</em> <code>authz</code>, <em>mechanism</em>
141       <code>Require</code></dt>
142       <dd>In this mode, <code>FCGI_ROLE</code> is set to <code>
143       AUTHORIZER</code> and <code>FCGI_APACHE_ROLE</code> is set to
144       <code>AUTHORIZER</code>.  The application must be defined as
145       provider type <em>authz</em> using <code class="directive"><a href="#authnzfcgidefineprovider">
146       AuthnzFcgiDefineProvider</a></code>.  When invoked, the application
147       is expected to authorize the client using the provided user id and other
148       request data.  Example application:
149 <pre class="prettyprint lang-perl">#!/usr/bin/perl
150 use FCGI;
151 my $request = FCGI::Request();
152 while ($request-&gt;Accept() &gt;= 0) {
153     die if $ENV{'FCGI_APACHE_ROLE'} ne "AUTHORIZER";
154     die if $ENV{'FCGI_ROLE'}        ne "AUTHORIZER";
155     die if $ENV{'REMOTE_PASSWD'};
156
157     print STDERR "This text is written to the web server error log.\n";
158
159     if ($ENV{'REMOTE_USER'} eq "foo1") {
160         print "Status: 200\n";
161         print "Variable-AUTHZ_1: authz_01\n";
162         print "Variable-AUTHZ_2: authz_02\n";
163         print "\n";
164     }
165     else {
166         print "Status: 403\n\n";
167     }
168 }</pre>
169
170
171       Example configuration:
172 <pre class="prettyprint lang-config">AuthnzFcgiDefineProvider authz FooAuthz fcgi://localhost:10103/
173 &lt;Location "/protected/"&gt;
174   AuthType ...
175   AuthName ...
176   AuthBasicProvider ...
177   Require FooAuthz
178 &lt;/Location&gt;</pre>
179
180       </dd>
181
182       <dt><em>Type</em> <code>authnz</code>, <em>mechanism</em>
183       <code>AuthBasicProvider</code> <em>+</em> <code>Require</code></dt>
184
185       <dd>In this mode, which supports the web server-agnostic FastCGI
186       <code>AUTHORIZER</code> protocol, <code>FCGI_ROLE</code> is set to
187       <code>AUTHORIZER</code> and <code>FCGI_APACHE_ROLE</code> is not set.
188       The application must be defined as provider type <em>authnz</em>
189       using <code class="directive"><a href="#authnzfcgidefineprovider">
190       AuthnzFcgiDefineProvider</a></code>.  The application is expected to
191       handle both authentication and authorization in the same invocation
192       using the user id, password, and other request data.  The invocation
193       occurs during the Apache httpd API authentication phase.  If the
194       application returns 200 and the same provider is invoked during the
195       authorization phase (via <code class="directive">Require</code>), mod_authnz_fcgi
196       will return success for the authorization phase without invoking the
197       application.  Example application:
198 <pre class="prettyprint lang-perl">#!/usr/bin/perl
199 use FCGI;
200 my $request = FCGI::Request();
201 while ($request-&gt;Accept() &gt;= 0) {
202     die if $ENV{'FCGI_APACHE_ROLE'};
203     die if $ENV{'FCGI_ROLE'} ne "AUTHORIZER";
204     die if !$ENV{'REMOTE_PASSWD'};
205     die if !$ENV{'REMOTE_USER'};
206
207     print STDERR "This text is written to the web server error log.\n";
208
209     if ( ($ENV{'REMOTE_USER' } eq "foo" || $ENV{'REMOTE_USER'} eq "foo1") &amp;&amp;
210         $ENV{'REMOTE_PASSWD'} eq "bar" &amp;&amp;
211         $ENV{'REQUEST_URI'} =~ m%/bar/.*%) {
212         print "Status: 200\n";
213         print "Variable-AUTHNZ_1: authnz_01\n";
214         print "Variable-AUTHNZ_2: authnz_02\n";
215         print "\n";
216     }
217     else {
218         print "Status: 401\n\n";
219     }
220 }</pre>
221
222
223       Example configuration:
224 <pre class="prettyprint lang-config">AuthnzFcgiDefineProvider authnz FooAuthnz fcgi://localhost:10103/
225 &lt;Location "/protected/"&gt;
226   AuthType Basic
227   AuthName "Restricted"
228   AuthBasicProvider FooAuthnz
229   Require FooAuthnz
230 &lt;/Location&gt;</pre>
231
232       </dd>
233
234       <dt><em>Type</em> <code>authn</code>, <em>mechanism</em>
235       <code>check_user_id</code></dt>
236
237       <dd>In this mode, <code>FCGI_ROLE</code> is set to <code>
238       AUTHORIZER</code> and <code>FCGI_APACHE_ROLE</code> is set to
239       <code>AUTHENTICATOR</code>.  The application must be defined as
240       provider type <em>authn</em> using <code class="directive"><a href="#authnzfcgidefineprovider">
241       AuthnzFcgiDefineProvider</a></code>.  <code class="directive"><a href="#authnzfcgicheckauthnprovider">AuthnzFcgiCheckAuthnProvider</a></code>
242       specifies when it is called.  Example application:
243 <pre class="prettyprint lang-perl">#!/usr/bin/perl
244 use FCGI;
245 my $request = FCGI::Request();
246 while ($request-&gt;Accept() &gt;= 0) {
247     die if $ENV{'FCGI_APACHE_ROLE'} ne "AUTHENTICATOR";
248     die if $ENV{'FCGI_ROLE'} ne "AUTHORIZER";
249
250     # This authorizer assumes that the RequireBasicAuth option of
251     # AuthnzFcgiCheckAuthnProvider is On:
252     die if !$ENV{'REMOTE_PASSWD'};
253     die if !$ENV{'REMOTE_USER'};
254
255     print STDERR "This text is written to the web server error log.\n";
256
257     if ( ($ENV{'REMOTE_USER' } eq "foo" || $ENV{'REMOTE_USER'} eq "foo1") &amp;&amp;
258         $ENV{'REMOTE_PASSWD'} eq "bar" ) {
259         print "Status: 200\n";
260         print "Variable-AUTHNZ_1: authnz_01\n";
261         print "Variable-AUTHNZ_2: authnz_02\n";
262         print "\n";
263     }
264     else {
265         print "Status: 401\n\n";
266         # If a response body is written here, it will be returned to
267         # the client.
268     }
269 }</pre>
270
271
272       Example configuration:
273 <pre class="prettyprint lang-config">AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10103/
274 &lt;Location "/protected/"&gt;
275   AuthType ...
276   AuthName ...
277   AuthnzFcgiCheckAuthnProvider FooAuthn \
278                                Authoritative On \
279                                RequireBasicAuth Off \
280                                UserExpr "%{reqenv:REMOTE_USER}"
281   Require ...
282 &lt;/Location&gt;</pre>
283
284       </dd>
285
286     </dl>
287
288 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
289 <div class="section">
290 <h2><a name="examples" id="examples">Additional examples</a></h2>
291
292   <ol>
293     <li>If your application supports the separate authentication and
294     authorization roles (<code>AUTHENTICATOR</code> and <code>AUTHORIZER</code>), define
295     separate providers as follows, even if they map to the same
296     application:
297
298 <pre class="prettyprint lang-config">AuthnzFcgiDefineProvider authn  FooAuthn  fcgi://localhost:10102/
299 AuthnzFcgiDefineProvider authz  FooAuthz  fcgi://localhost:10102/</pre>
300
301
302     Specify the authn provider on
303     <code class="directive"><a href="../mod/mod_auth_basic.html#authbasicprovider">AuthBasicProvider</a></code>
304     and the authz provider on
305     <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code>:
306
307 <pre class="prettyprint lang-config">AuthType Basic
308 AuthName "Restricted"
309 AuthBasicProvider FooAuthn
310 Require FooAuthz</pre>
311
312     </li>
313
314     <li>If your application supports the generic <code>AUTHORIZER</code> role
315     (authentication and authorizer in one invocation), define a
316     single provider as follows:
317
318 <pre class="prettyprint lang-config">AuthnzFcgiDefineProvider authnz FooAuthnz fcgi://localhost:10103/</pre>
319
320
321     Specify the authnz provider on both <code class="directive">AuthBasicProvider</code>
322     and <code class="directive">Require</code>:
323
324 <pre class="prettyprint lang-config">AuthType Basic
325 AuthName "Restricted"
326 AuthBasicProvider FooAuthnz
327 Require FooAuthnz</pre>
328
329     </li>
330 </ol>
331 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
332 <div class="section">
333 <h2><a name="limitations" id="limitations">Limitations</a></h2>
334
335     <p>The following are potential features which are not currently
336     implemented:</p>
337
338     <dl>
339       <dt>Apache httpd access checker</dt>
340       <dd>The Apache httpd API <em>access check</em> phase is a separate
341       phase from authentication and authorization.  Some other FastCGI
342       implementations implement this phase, which is denoted by the
343       setting of <code>FCGI_APACHE_ROLE</code> to <code>ACCESS_CHECKER</code>.</dd>
344
345       <dt>Local (Unix) sockets or pipes</dt>
346       <dd>Only TCP sockets are currently supported.</dd>
347
348       <dt>Support for mod_authn_socache</dt>
349       <dd>mod_authn_socache interaction should be implemented for
350       applications which participate in Apache httpd-style
351       authentication.</dd>
352
353       <dt>Support for digest authentication using AuthDigestProvider</dt>
354       <dd>This is expected to be a permanent limitation as there is
355       no authorizer flow for retrieving a hash.</dd>
356
357       <dt>Application process management</dt>
358       <dd>This is expected to be permanently out of scope for
359       this module.  Application processes must be controlled by
360       other means.  For example, <code class="program"><a href="../programs/fcgistarter.html">fcgistarter</a></code> can be used to
361       start them.</dd>
362
363       <dt>AP_AUTH_INTERNAL_PER_URI</dt>
364       <dd>All providers are currently registered as
365       AP_AUTH_INTERNAL_PER_CONF, which means that checks are not
366       performed again for internal subrequests with the same
367       access control configuration as the initial request.</dd>
368
369       <dt>Protocol data charset conversion</dt>
370       <dd>If mod_authnz_fcgi runs in an EBCDIC compilation
371       environment, all FastCGI protocol data is written in EBCDIC
372       and expected to be received in EBCDIC.</dd>
373
374       <dt>Multiple requests per connection</dt>
375       <dd>Currently the connection to the FastCGI authorizer is
376       closed after every phase of processing.  For example, if the
377       authorizer handles separate <em>authn</em> and <em>authz</em>
378       phases then two connections will be used.</dd>
379
380       <dt>URI Mapping</dt>
381       <dd>URIs from clients can't be mapped, such as with the <code class="directive">
382       ProxyPass</code> used with FastCGI responders.</dd>
383
384     </dl>
385
386 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
387 <div class="section">
388 <h2><a name="logging" id="logging">Logging</a></h2>
389
390     <ol>
391         <li>Processing errors are logged at log level <code>error</code>
392         and higher.</li>
393         <li>Messages written by the application are logged at log
394         level <code>warn</code>.</li>
395         <li>General messages for debugging are logged at log level
396         <code>debug</code>.</li>
397         <li>Environment variables passed to the application are
398         logged at log level <code>trace2</code>. The value of the
399         <code>REMOTE_PASSWD</code> variable will be obscured,
400         but <strong>any other sensitive data will be visible in the
401         log</strong>.</li>
402         <li>All I/O between the module and the FastCGI application,
403         including all environment variables, will be logged in printable
404         and hex format at log level <code>trace5</code>.  <strong>All
405         sensitive data will be visible in the log.</strong></li>
406     </ol>
407
408     <p><code class="directive"><a href="../mod/core.html#loglevel">LogLevel</a></code> can be used
409     to configure a log level specific to mod_authnz_fcgi.  For
410     example:</p>
411
412 <pre class="prettyprint lang-config">LogLevel info authnz_fcgi:trace8</pre>
413
414
415 </div>
416 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
417 <div class="directive-section"><h2><a name="AuthnzFcgiCheckAuthnProvider" id="AuthnzFcgiCheckAuthnProvider">AuthnzFcgiCheckAuthnProvider</a> <a name="authnzfcgicheckauthnprovider" id="authnzfcgicheckauthnprovider">Directive</a></h2>
418 <table class="directive">
419 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables a FastCGI application to handle the check_authn
420 authentication hook.</td></tr>
421 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthnzFcgiCheckAuthnProvider <em>provider-name</em>|<code>None</code>
422 <em>option</em> ...</code></td></tr>
423 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
424 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
425 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
426 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
427 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_authnz_fcgi</td></tr>
428 </table>
429     <p>This directive is used to enable a FastCGI authorizer to
430     handle a specific processing phase of authentication or
431     authorization.</p>
432
433     <p>Some capabilities of FastCGI authorizers require enablement
434     using this directive instead of
435     <code class="directive">AuthBasicProvider</code>:</p>
436
437     <ul>
438       <li>Non-Basic authentication; generally, determining the user
439       id of the client and returning it from the authorizer; see the
440       <code>UserExpr</code> option below</li>
441       <li>Selecting a custom response code; for a non-200 response
442       from the authorizer, the code from the authorizer will be the
443       status of the response</li>
444       <li>Setting the body of a non-200 response; if the authorizer
445       provides a response body with a non-200 response, that body
446       will be returned to the client; up to 8192 bytes of text are
447       supported</li>
448     </ul>
449
450     <dl>
451       <dt><em>provider-name</em></dt>
452       <dd>This is the name of a provider defined with <code class="directive">
453       AuthnzFcgiDefineProvider</code>.</dd>
454
455       <dt><code>None</code></dt>
456       <dd>Specify <code>None</code> to disable a provider enabled
457       with this directive in an outer scope, such as in a parent
458       directory.</dd>
459
460       <dt><em>option</em></dt>
461       <dd>The following options are supported:
462
463       <dl>
464          <dt>Authoritative On|Off (default On)</dt>
465          <dd>This controls whether or not other modules are allowed
466          to run when this module has a FastCGI authorizer configured
467          and it fails the request.</dd>
468
469          <dt>DefaultUser <em>userid</em></dt>
470          <dd>When the authorizer returns success and <code>UserExpr</code>
471          is configured and evaluates to an empty string (e.g., authorizer
472          didn't return a variable), this value will be used as the user
473          id.  This is typically used when the authorizer has a concept of
474          guest, or unauthenticated, users and guest users are mapped to
475          some specific user id for logging and other purposes.</dd>
476
477          <dt>RequireBasicAuth On|Off (default Off)</dt>
478          <dd>This controls whether or not Basic auth is required
479          before passing the request to the authorizer.  If required,
480          the authorizer won't be invoked without a user id and
481          password; 401 will be returned for a request without that.</dd>
482
483          <dt>UserExpr <em>expr</em> (no default)</dt>
484          <dd>When Basic authentication isn't provided by the client
485          and the authorizer determines the user, this expression,
486          evaluated after calling the authorizer, determines the
487          user.  The expression follows <a href="../expr.html">
488          ap_expr syntax</a> and must resolve to a string.  A typical
489          use is to reference a <code>Variable-<em>XXX</em></code>
490          setting returned by the authorizer using an option like
491          <code>UserExpr "%{reqenv:<em>XXX</em>}"</code>.  If
492          this option is specified and the user id can't be retrieved
493          using the expression after a successful authentication, the
494          request will be rejected with a 500 error.</dd>
495
496        </dl>
497       </dd>
498      </dl>
499
500 </div>
501 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
502 <div class="directive-section"><h2><a name="AuthnzFcgiDefineProvider" id="AuthnzFcgiDefineProvider">AuthnzFcgiDefineProvider</a> <a name="authnzfcgidefineprovider" id="authnzfcgidefineprovider">Directive</a></h2>
503 <table class="directive">
504 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Defines a FastCGI application as a provider for
505 authentication and/or authorization</td></tr>
506 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthnzFcgiDefineProvider <em>type</em> <em>provider-name</em>
507 <em>backend-address</em></code></td></tr>
508 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
509 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
510 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
511 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_authnz_fcgi</td></tr>
512 </table>
513     <p>This directive is used to define a FastCGI application as
514     a provider for a particular phase of authentication or
515     authorization.</p>
516
517     <dl>
518       <dt><em>type</em></dt>
519       <dd>This must be set to <em>authn</em> for authentication,
520       <em>authz</em> for authorization, or <em>authnz</em> for
521       a generic FastCGI authorizer which performs both checks.</dd>
522
523       <dt><em>provider-name</em></dt>
524       <dd>This is used to assign a name to the provider which is
525       used in other directives such as
526       <code class="directive"><a href="../mod/mod_auth_basic.html#authbasicprovider">AuthBasicProvider</a></code>
527       and
528       <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code>.</dd>
529
530       <dt><em>backend-address</em></dt>
531       <dd>This specifies the address of the application, in the form
532       <em>fcgi://hostname:port/</em>.  The application process(es)
533       must be managed independently, such as with
534       <code class="program"><a href="../programs/fcgistarter.html">fcgistarter</a></code>.</dd>
535     </dl>
536
537 </div>
538 </div>
539 <div class="bottomlang">
540 <p><span>Available Languages: </span><a href="../en/mod/mod_authnz_fcgi.html" title="English">&nbsp;en&nbsp;</a></p>
541 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
542 <script type="text/javascript"><!--//--><![CDATA[//><!--
543 var comments_shortname = 'httpd';
544 var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_authnz_fcgi.html';
545 (function(w, d) {
546     if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
547         d.write('<div id="comments_thread"><\/div>');
548         var s = d.createElement('script');
549         s.type = 'text/javascript';
550         s.async = true;
551         s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
552         (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
553     }
554     else {
555         d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
556     }
557 })(window, document);
558 //--><!]]></script></div><div id="footer">
559 <p class="apache">Copyright 2017 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
560 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
561 if (typeof(prettyPrint) !== 'undefined') {
562     prettyPrint();
563 }
564 //--><!]]></script>
565 </body></html>