1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This file is generated from xml source: DO NOT EDIT
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-->
<title>mod_webauth - Apache HTTP Server Version 2.5</title>
<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
<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" />
<script src="../style/scripts/prettify.min.js" type="text/javascript">
</script>
<link href="../images/favicon.ico" rel="shortcut icon" /></head>
<body>
<div id="page-header">
<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>
<p class="apache">Apache HTTP Server Version 2.5</p>
<img alt="" src="../images/feather.gif" /></div>
<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
<div id="path">
<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.5</a> > <a href="./">Modules</a></div>
<div id="page-content">
<div id="preamble"><h1>Apache Module mod_webauth</h1>
<div class="toplang">
<p><span>Available Languages: </span><a href="../en/mod/mod_webauth.html" title="English"> en </a></p>
</div>
<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Support for the WebAuth protocol</td></tr>
<tr><th><a href="module-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>webauth_module</td></tr>
<tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_webauth.c</td></tr>
<tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Apache 2.0 and higher</td></tr></table>
<h3>Summary</h3>
<p>
This module implements the authentication component of a WebAuth
Application Server for Apache 2.x. It should be used on each
individual Apache server that wants to protect content with WebAuth.
</p>
<p>
Further details are provided in the
<a href="http://webauth.stanford.edu/">WebAuth documentation</a>.
</p>
</div>
<div id="quickview"><h3 class="directives">Directives</h3>
<ul id="toc">
<li><img alt="" src="../images/down.gif" /> <a href="#webauthapptokenlifetime">WebAuthAppTokenLifetime</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthauthtype">WebAuthAuthType</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthcookiepath">WebAuthCookiePath</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthcred">WebAuthCred</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthcredcachedir">WebAuthCredCacheDir</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthdebug">WebAuthDebug</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthdologout">WebAuthDoLogout</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthdontcache">WebAuthDontCache</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthextraredirect">WebAuthExtraRedirect</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthfailureurl">WebAuthFailureURL</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthforcelogin">WebAuthForceLogin</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthhttponly">WebAuthHttpOnly</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthinactiveexpire">WebAuthInactiveExpire</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthkeyring">WebAuthKeyring</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthkeyringautoupdate">WebAuthKeyringAutoUpdate</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthkeyringkeylifetime">WebAuthKeyringKeyLifetime</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthkeytab">WebAuthKeytab</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthlastuseupdateinterval">WebAuthLastUseUpdateInterval</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthlogincanceledurl">WebAuthLoginCanceledURL</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthloginurl">WebAuthLoginURL</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthoptional">WebAuthOptional</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthpostreturnurl">WebAuthPostReturnURL</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthrequireinitialfactor">WebAuthRequireInitialFactor</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthrequireloa">WebAuthRequireLOA</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthrequiresessionfactor">WebAuthRequireSessionFactor</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthrequiressl">WebAuthRequireSSL</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthreturnurl">WebAuthReturnURL</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthservicetokencache">WebAuthServiceTokenCache</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthsslredirect">WebAuthSSLRedirect</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthsslredirectport">WebAuthSSLRedirectPort</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthsslreturn">WebAuthSSLReturn</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthstripurl">WebAuthStripURL</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthsubjectauthtype">WebAuthSubjectAuthType</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthtokenmaxttl">WebAuthTokenMaxTTL</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthtrustauthzidentity">WebAuthTrustAuthzIdentity</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthusecreds">WebAuthUseCreds</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthvarprefix">WebAuthVarPrefix</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthwebkdcprincipal">WebAuthWebKdcPrincipal</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthwebkdcsslcertcheck">WebAuthWebKdcSSLCertCheck</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthwebkdcsslcertfile">WebAuthWebKdcSSLCertFile</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#webauthwebkdcurl">WebAuthWebKdcURL</a></li>
</ul>
<h3>Topics</h3>
<ul id="topics">
<li><img alt="" src="../images/down.gif" /> <a href="#config">Minimal Config File</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#basics">Using WebAuth Authentication</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#environment">Environment Variables</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#factors">Authentication Factors</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#proxy">Using WebAuth with Proxy Servers</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#perl">Perl Integration</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#php">PHP 4.x and 5.x Integration</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#java">Java/Tomcat/mod_jk Integration</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#credentials">Requesting Credentials</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#debugging">Debugging mod_webauth</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#loadbalance">Setting up load-balanced WebAuth servers</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#license">Manual License</a></li>
</ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="config" id="config">Minimal Config File</a></h2>
<p>
The following example shows the minimum config file required to
configure mod_webauth.
</p>
<div class="example"><h3>Example</h3><pre>LoadModule webauth_module modules/mod_webauth.so
WebAuthKeyring conf/webauth/keyring
WebAuthKeytab conf/webauth/keytab
WebAuthServiceTokenCache conf/webauth/service_token_cache
WebAuthLoginURL https://webkdc/login/
WebAuthWebKdcURL https://webkdc/webkdc-service/
WebAuthWebKdcPrincipal service/webkdc</pre></div>
<p>
This will enable the module, but not protect any pages. To do that,
you will need to add authentication and authorization directives to
individual <Location>, <Directory>, or <Files>
containers (or equivalents).
</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="basics" id="basics">Using WebAuth Authentication</a></h2>
<p>
Once configured, basic use of WebAuth is very simple. Simply set up
authentication normally, using <code>AuthType WebAuth</code> instead
of the normal <code>AuthType Basic</code>, plus a <code>require
valid-user</code> directive.
</p>
<div class="example"><h3>Example</h3><pre><Location /private/>
AuthType WebAuth
Require valid-user
</Location></pre></div>
<p>
This will allow anyone who can authenticate using your WebAuth
installation access to this content. You can instead require
specific users or require a group. All of the standard Apache
authorization directives are supported as normal. For more advanced
authorization decisions based on LDAP directory data, see the
<a href="mod_webauthldap.html">mod_webauthldap module</a>.
</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="environment" id="environment">Environment Variables</a></h2>
<p>
This module provides some information as additional environment
variables to the SSI and CGI namespace. The generated variables are
listed in the table below. For CGI apps that have expectations
about and/or restrictions on the names of environment variables they
can handle, you can use the
<a href="#webauthvarprefix"><code class="directive">WebAuthVarPrefix</code></a>
directive to have additional environment variables set.
</p>
<p>
Additionally, requesting credentials for a particular request may
cause environment variables to get set. For example, requesting
Kerberos credentials will result in the KRB5CCNAME environment
variable being set.
</p>
<table class="bordered">
<tr>
<th>Variable Name:</th>
<th>Description:</th>
</tr>
<tr>
<td><code>AUTH_TYPE</code></td>
<td>Will be set to <code>WebAuth</code></td>
</tr>
<tr>
<td><code>REMOTE_USER</code></td>
<td>
Name of the WebAuth authenticated user (or authorization
identity if trusted; see <a href="#webauthtrustauthzidentity"><code class="directive">WebAuthTrustAuthzIdentity</code></a>)
</td>
</tr>
<tr>
<td><code>WEBAUTH_AUTHZ_USER</code></td>
<td>Name of the WebAuth authorization identity if present</td>
</tr>
<tr>
<td><code>WEBAUTH_FACTORS_INITIAL</code></td>
<td>Authentication factors user authenticated with</td>
</tr>
<tr>
<td><code>WEBAUTH_FACTORS_SESSION</code></td>
<td>
Authentication factors user authenticated with for this
particular site
</td>
</tr>
<tr>
<td><code>WEBAUTH_LOA</code></td>
<td>Level of Assurance of the user authentication</td>
</tr>
<tr>
<td><code>WEBAUTH_TOKEN_CREATION</code></td>
<td>When the token was created</td>
</tr>
<tr>
<td><code>WEBAUTH_TOKEN_EXPIRATION</code></td>
<td>
When the token will expire. If <a href="#webauthinactiveexpire"><code class="directive">WebAuthInactiveExpire</code></a>
is set then the token may expire sooner due to inactivity.
</td>
</tr>
<tr>
<td><code>WEBAUTH_TOKEN_LASTUSED</code></td>
<td>
When the token was last used. Only available if <a href="#webauthlastuseupdateinterval"><code class="directive">WebAuthLastUseUpdateInterval</code></a>
is non-zero.
</td>
</tr>
<tr>
<td><code>WEBAUTH_USER</code></td>
<td>
Name of the WebAuth authenticated user regardless of
authorization identity
</td>
</tr>
</table>
<div class="example"><h3>Example Environment Variables</h3><pre>AUTH_TYPE=WebAuth
REMOTE_USER=roland
WEBAUTH_AUTHZ_USER=roland
WEBAUTH_FACTORS_INITIAL=p,o,o2,m
WEBAUTH_FACTORS_SESSION=c
WEBAUTH_LOA=2
WEBAUTH_TOKEN_CREATION=103872393
WEBAUTH_TOKEN_EXPIRATION=1038759389
WEBAUTH_TOKEN_LASTUSED=103872393
WEBAUTH_USER=schemers</pre></div>
<p>
WebAuth can support a separate authentication identity and an
authorization identity as seen in the above example. The
authentication identity is the identity for which the user presented
credentials (such as a password). The authorization identity is the
identity that should be used for authorization checks and
application access. Normally, these are the same, but the WebKDC
can be configured to allow users to assert an authorization identity
different than their authentication identity to certain sites. This
allows a privileged user to pretend to be another user when
accessing a WebAuth-protected resource (for testing purposes, for
example).
</p>
<p>
WEBAUTH_USER will always be set to the authenticated identity,
regardless of any authorization identity. WEBAUTH_AUTHZ_USER will
always be set to the authorization identity if one was asserted, and
will not be set otherwise.
</p>
<p>
The value of REMOTE_USER is normally the authenticated identity
(same as WEBAUTH_USER), but its value depends on whether there is an
authorization identity and on whether the <a href="#webauthtrustauthzidentity"><code class="directive">WebAuthTrustAuthzIdentity</code></a>
is set. If that directive is set, REMOTE_USER will instead be set
to the authorization identity if one is present. The value of
REMOTE_USER is also the identity used internally by Apache to check
authorization rules and group membership, do LDAP data lookups, and
so forth.
</p>
<p>
When checking for the authenticated username, one should normally
use REMOTE_USER, since this is the standard inside Apache and makes
the application independent of the authentication system used. This
will also work correctly with authorization identities. If you want
to use the authentication identity regardless of any authorization
identity, use WEBAUTH_USER instead. (You can also use WEBAUTH_USER
to ensure that the authentication happened via WebAuth, although
that can also be accomplished by checking AUTH_TYPE.) To retrieve
the authorization identity, even if it wasn't trusted and used for
REMOTE_USER, look at the value of WEBAUTH_AUTHZ_USER.
</p>
<p>
If this seems excessively confusing, use REMOTE_USER. That will do
the correct thing in most circumstances.
</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="factors" id="factors">Authentication Factors</a></h2>
<p>
Below are the authentication factors that can be required via
WebAuth directives or queried from the <a href="#environment">environmental variables</a>
WEBAUTH_FACTORS_INITIAL and WEBAUTH_FACTORS_SESSION.
</p>
<table class="bordered">
<tr>
<th>Code</th>
<th>Factor Name</th>
<th>Description</th>
</tr>
<tr>
<td><code>c</code></td><td>cookie</td>
<td>Session authentication via cookie</td>
</tr>
<tr>
<td><code>d</code></td><td>device</td>
<td>
Device or browser originating the authentication is known to the
local security infrastructure, has previously been part of a
successful strong authentication, or otherwise is a relatively
trusted device as defined by local site policy.
</td>
</tr>
<tr>
<td><code>h</code></td><td>human</td>
<td>
Off-line human verification of the user's identity. This factor
should not be required directly; rather, it is used by (for
example) local support staff to add a factor, and hence add the
multifactor factor, for a user who doesn't have access to their
normal authentication method but has established their identity
via some off-line process.
</td>
</tr>
<tr>
<td><code>k</code></td><td>Kerberos</td>
<td>Session authentication via Kerberos authentication</td>
</tr>
<tr>
<td><code>m</code></td><td>multifactor</td>
<td>
Session or initial authentication via multiple independent
authentication factors (site-defined)
</td>
</tr>
<tr>
<td><code>mp</code></td><td>mobile push</td>
<td>
User approved an out-of-band push notification to a mobile
device
</td>
</tr>
<tr>
<td><code>o</code></td><td>OTP</td>
<td>Session or initial authentication via one-time password</td>
</tr>
<tr>
<td><code>o#</code></td><td>OTP</td>
<td>
A more specific subset of <code>o</code>. Number indicates a
specific OTP mechanism as defined by the local site, with higher
numbers indicating stronger methods
</td>
</tr>
<tr>
<td><code>p</code></td><td>password</td>
<td>Session or initial authentication via traditional password</td>
</tr>
<tr>
<td><code>rm</code></td><td>random multifactor</td>
<td>
User has a random chance of being challenged for a second
factor; frequency of challenges is site-defined
</td>
</tr>
<tr>
<td><code>u</code></td><td>unknown</td>
<td>Session or initial authentication via an unknown method</td>
</tr>
<tr>
<td><code>v</code></td><td>voice</td>
<td>
User approved authentication via voice telephone call
</td>
</tr>
<tr>
<td><code>x</code></td><td>X.509</td>
<td>
Session or initial authentication via some form of X.509
authentication
</td>
</tr>
<tr>
<td><code>x#</code></td><td>X.509</td>
<td>
A more specific subset of <code>x</code>. Number indicates a
specific X.509 mechanism as defined by site, with higher numbers
indicating stronger methods
</td>
</tr>
</table>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="proxy" id="proxy">Using WebAuth with Proxy Servers</a></h2>
<p>
WebAuth authentication and authorization directives can be used in
<Proxy> blocks just as in any other configuration block, so to
protect a proxy where the remote proxy doesn't need to know about
the authenticated user, just protect that resource like any other
resource.
</p>
<p>
Sometimes, it's also useful to pass the authentication information
to the remote site. This option should only be used as a last
resort when the target server is unable to directly support WebAuth.
HTTP headers are not secure and can easily be forged. The target
server should only accept connections from the proxy server running
<code>mod_webauth</code>.
</p>
<p>
To do this with a ProxyPass proxy, it's easiest to use
<a href="http://httpd.apache.org/docs-2.2/mod/mod_headers.html">mod_headers</a>
to set extra headers based on the values of <code>WEBAUTH_</code>
environment variables. The remote web application then should pull
its authentication information from those headers.
</p>
<p>
For example, lets say you want to pass <code>WEBAUTH_USER</code>
through to a proxy server. Assuming you've loaded
<code>mod_headers</code> and can therefore use the
<code>RequestHeader</code> directive, you could do the following:
</p>
<div class="example"><h3>Example</h3><pre><Location /someplace>
AuthType WebAuth
require valid-user
ProxyPass http://otherhost.stanford.edu/
ProxyPassReverse http://otherhost.stanford.edu/
RequestHeader set "X-WEBAUTH-USER" "%{WEBAUTH_USER}e"
</Location></pre></div>
<p>
The <code>RequestHeader</code> directive causes the
<code>X-WEBAUTH-USER</code> header to get set with the value of the
<code>WEBAUTH_USER</code> environment variable. The value of this
header is then often available in the environment for the web
application running on the remote system.
</p>
<div class="note">
<h3>Note: WebAuth Cookies and Referer Header</h3>
<p>
<code>mod_webauth</code> strips out any cookies that start with
the prefix <code>webauth_</code>, so they do not get forwarded to
the target server, it also strips out any WebAuth-related
information in the Referer header.
</p>
</div>
<div class="note">
<h3>Note: WebAuthDoLogout</h3>
<p>
If you are planning on using WebAuthDoLogout with your proxied
server, you should be aware that once you tell Apache to proxy a
URL namespace (like <code>/someplace/</code>), then you can't have
local <code>Location</code> directives for URLs within that
namespace, like <code>/location/logout</code>. Instead, you'll
need to create a that script on the target server, and have it
remove any cookie that starts with <code>webauth_</code>.
(Unfortunately, it won't see those cookies due to the above cookie
stripping behavior, so you'll have to hard-code the cookie names
that will be used.)
</p>
</div>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="perl" id="perl">Perl Integration</a></h2>
<p>
In order to use mod_webauth with Perl, you need to first
WebAuth-protect the pages that are served by the CGI Perl scripts.
For example, lets assume that all pages under
http://yourserver/private/ are to be protected:
</p>
<div class="example"><h3>Apache Directives Example</h3><pre><Location /private/>
AuthType WebAuth
Require valid-user
</Location></pre></div>
<p>
Then, in order to determine the user's identity from the Perl
script, it is simply a matter of accessing the environment variables
set by mod_webauth within your Perl script:
</p>
<div class="example"><h3>Perl Example</h3><pre>my $REMOTE_USER = $ENV{'REMOTE_USER'};
print "Content-Type: text/plain\n\n";
print "The authenticated user is $REMOTE_USER\n";</pre></div>
<p>
Any of the environment variables described in the
<a href="#environment">environment variables</a> section may be
accessed this way.
</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="php" id="php">PHP 4.x and 5.x Integration</a></h2>
<p>
Using mod_webauth with PHP is very similar to using it from Perl.
You need to first WebAuth-protect the pages that are served by the
PHP scripts. For example:
</p>
<div class="example"><h3>Apache Directives Example</h3><pre><Location /private/>
AuthType WebAuth
Require valid-user
</Location></pre></div>
<p>
Then, in order to determine the user's identity from the PHP script,
you can either use the PHP getenv function, or access the special
<code>$_SERVER</code> array variable. For example:
</p>
<div class="example"><h3>PHP Example</h3><pre>$WEBAUTH_USER = getenv('WEBAUTH_USER');
# alternative, using the $_SERVER 'superglobal' array:
# $WEBAUTH_USER = $_SERVER['WEBAUTH_USER'];
print "The authenticated user is $WEBAUTH_USER\n";</pre></div>
<p>
In looking at the source for PHP 4.3, it appears that the
<code>getenv</code> is looking only in the <code>$_SERVER</code>
array, so there is a one-to-one mapping between the two. Oddly
enough, getenv isn't looking the <code>$_ENV</code> array. See the
PHP documentation for more information on
<a href="http://www.php.net/manual/en/reserved.variables.php">predefined
variables</a> in PHP.
</p>
<p>
Any of the environment variables described in the
<a href="#enivronment">environment variables</a> section may be
accessed this way.
</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="java" id="java">Java/Tomcat/mod_jk Integration</a></h2>
<p>
Using mod_webauth with mod_jk requires some additional configuration
of mod_jk in order to pass environment variables to the Java
servlet. So, in addition to WebAuth-protecting the pages served by
Tomcat, you also need to specify which environment variables you
want to pass. For example:
</p>
<div class="example"><h3>Apache Directives Example</h3><pre># WebAuth-protect /private/
<Location /private/>
AuthType WebAuth
Require valid-user
</Location>
# Send everything for /private/ to worker1
JkMount /private/* worker1
# WebAuth-related environment variables to pass
JkEnvVar WEBAUTH_USER "<UNSET>"
JkEnvVar REMOTE_USER "<UNSET>"
JkEnvVar AUTH_TYPE "<UNSET>"
JkEnvVar WEBAUTH_TOKEN_CREATION "<UNSET>"
JkEnvVar WEBAUTH_TOKEN_EXPIRATION "<UNSET>"</pre></div>
<p>
If all you are interested in is REMOTE_USER, then you don't need to
pass the other variables as well.
</p>
<p>
In order to determine the user's identity from the servlet, you need
to use the <code>getAttribute</code> method on the
<code>request</code> object.
</p>
<div class="example"><h3>JSP Example</h3><pre>WEBAUTH_USER is set to:
<% out.print (request.getAttribute("WEBAUTH_USER")); %></pre></div>
<p>
Any variables you configure mod_jk to pass via <code>JkEnvVar</code>
will end up as a request attribute as opposed to being accessible by
<code>java.lang.System.getenv</code>, which is
<strong>deprecated</strong>.
</p>
<div class="note">
<h3>Note</h3>
<p>
It appears that mod_jk requires you specify a default value for
the environment variables in the event that they are unset. A
value of <code>""</code> was not allowed, so I picked the special
value <code>"<UNSET>"</code> for this example. If all your
pages are WebAuth-protected, then this default value will never be
used.
</p>
</div>
<p>
You will also need to explicitly turn off Tomcat authentication in
the <code><Connector></code> definition in the Tomcat
<code>server.xml</code> file. For example:
</p>
<div class="example"><h3>Connector Example</h3><pre><Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
tomcatAuthentication="false"
acceptCount="10" debug="0"/></pre></div>
<p>
Be aware that Apache and Tomcat parse semicolons in URLs
differently. Without careful configuration, attackers can bypass
WebAuth protection when accessing a resource in Tomcat by exploiting
this difference. In Apache, the URLs <code>/srvlet/secret</code>
and <code>/srvlet/secret;hello</code> are different URLs, but Tomcat
considers the part after a semicolon to be a URI path parameter,
ignores it, and treats them both as the same URL. Therefore, if
only <code>/srvlet/secret</code> is protected in Apache (with a
<code><Location></code> directive, for example), an attacker
can bypass that protection but still access the same underlying URL
in Tomcat.
</p>
<p>
To protect against this, any <code><Location></code> directive
protecting a specific URL within a larger URL namespace proxied to
Tomcat should allow for any trailing URI path parameters, as in the
following example:
</p>
<div class="example"><h3>Access Control Example</h3><pre># DO NOT USE THIS -- insecure!
<Location "/srvlet/secret">
AuthType WebAuth
require valid-user
</Location>
# Instead, use this or some other regex that matches the path with URI
# path parameters inserted anywhere. Be aware that they can be in each
# path component! (But if JkMount refers to /srvlet, then /srvlet;hello
# won't be sent to Tomcat by Apache and therefore is safe.)
<Location ~ "/srvlet/secret(;.*)?$">
AuthType WebAuth
require valid-user
</Location></pre></div>
<p>
This problem applies to any Apache authentication mechanism applied
to URLs that are proxied to Tomcat. It is not specific to
WebAuth.
</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="credentials" id="credentials">Requesting Credentials</a></h2>
<p>
One of the features of WebAuth is the ability to request credentials
on behalf of the user for a particular request (or group of
requests). This allows authorized application servers to act on
behalf of the user.
</p>
<p>
Depending on the credential type (and always for Kerberos tickets,
which are currently the only supported credentials), temporary files
containing credentials may need to be created. These credentials
will be stored in the directory specified by the
<a href="#webauthcredcachedir"><code class="directive">WebAuthCredCacheDir</code></a>
directive.
</p>
<p>
The <a href="#webauthcred"><code class="directive">WebAuthCred</code></a>
directive is used to specify which credentials a particular request
may need. Credentials are not actually requested from the WebKDC
until a page with the
<a href="#webauthusecreds"><code class="directive">WebAuthUseCreds</code></a>
directive set to "on" is served. At that point, they will be cached
(encrypted) in cookies and used to satisfy future requests.
</p>
<p>
Saving credentials on every single request (for example, an image or
static page) is expensive, since it may involve decrypting
credentials stored in a cookie, processing them, and storing them in
a temporary file. The
<a href="#webauthusecreds"><code class="directive">WebAuthUseCreds</code></a>
directive is used to control which requests will actually go through
this process.
</p>
<p>
The following example shows one scenario where every page under
/myapp/ is WebAuth-protected, and every page under /myapp/commands/
requires the use of two Kerberos credentials.
</p>
<div class="example"><h3>Example</h3><pre># This first WebAuthCred directive will cause us to acquire a proxy token
# on the initial redirect when determining the user's identity. It saves
# an extra redirect later on when we actually use/acquire credentials.
<Location /myapp/>
AuthType WebAuth
require valid-user
WebAuthCred krb5
</Location>
# These next WebAuthCred directives will cause us to acquire two
# credentials from the WebKDC, since WebAuthUseCreds is on.
<Location /myapp/commands/>
WebAuthUseCreds on
WebAuthCred krb5 host/slapshot.stanford.edu@stanford.edu
WebAuthCred krb5 host/lichen.stanford.edu@stanford.edu
</Location></pre></div>
<div class="note">
<h3>Warning for Load-Balanced Pools</h3>
<p>
If you are using delegated credentials with a pool of servers
behind a load balancer (see <a href="#loadbalance">the section on
load balancing</a>), each system in the pool must use the same
Kerberos identity when requesting credentials. Otherwise, the
delegated credentials will be locked to the one principal that
requested them and the other hosts will not be able to use them,
which will cause problems if a given client moves from one pool
member to another.
</p>
</div>
<div class="note">
<h3>Warning for Active Directory</h3>
<p>
If you are using Active Directory as your KDC, be aware that
Active Directory Kerberos tickets can be relatively large because
they contain extra authorization information. This means the
corresponding cookies set by WebAuth that hold delegated
credentials can also be large, and in combination with other
cookies may exceed the maximum cookie size allowed for by the HTTP
protocol. If you run into problems, you can work around this by
suppressing the PAC authorization information for the services
that don't need it in your Active Directory.
</p>
</div>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="debugging" id="debugging">Debugging mod_webauth</a></h2>
<p>
If you are having trouble getting <code>mod_webauth</code>
configured, you can enable the <code>webauth</code> handler and
point your browser at the configured URL to get some information on
whether or not mod_webauth is configured correctly.
</p>
<div class="note">
<h3>Note</h3>
<p>
Just to be safe, you should probably disable the
<code>webauth</code> handler after you have
<code>mod_webauth</code> configured correctly.
</p>
</div>
<div class="example"><h3>Example</h3><pre># WebAuthDebug must be on
WebAuthDebug on
<Location /webauth-status>
SetHandler webauth
Order allow,deny
Allow from all
</Location></pre></div>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="loadbalance" id="loadbalance">Setting up load-balanced WebAuth servers</a></h2>
<p>
WebAuth was designed so that it would be fairly easy to setup
multiple WebAuth servers for load balancing and redundancy. In
order to achieve this, the WebAuth keyring has to be shared between
the WebAuth servers. The Kerberos keytab file does not have to be
shared; each system can use a separate keytab file. (There is one
exception to this last rule: credential delegation. If you are
using credential delegation with a load-balanced pool, all servers
in the pool must share the same Kerberos keytab file as well as the
keyring. See <a href="#credentials">the warning under requesting
credentials</a> for more information.)
</p>
<div class="note">
<h3>Note</h3>
<p>
The keyring file should be securely transferred from the master to
the slave(s) using a program like <code>scp</code> or kerberized
<code>rcp</code>.
</p>
</div>
<p>
By convention, one of the WebAuth servers should be designated as
the master and other servers should be designated as slaves. The
keyring should only be updated on the master and pushed manually to
the slaves.
</p>
<p>
The WebAuth keyring file is specified using the
<a href="#webauthkeyring"><code class="directive">WebAuthKeyring</code></a>
directive. This file contains the WebAuth server's private AES
key(s). If you are running multiple WebAuth servers, you must turn
off automatic updating of the keyring file on restarts. This is done
using the
<a href="#webauthkeyringautoupdate"><code class="directive">WebAuthKeyringAutoUpdate</code></a>
directive:
</p>
<div class="example"><h3>Turning off auto update</h3><p><code>
WebAuthKeyringAutoUpdate off
</code></p></div>
<p>
Once auto update is turned off, the keyring file will not get
automatically updated and can manually be copied across all the
servers. The keys in the keyring file still need to be changed
periodically, and the <code>wa_keyring</code> command can be used to
do this. This command would be run on the keyring file on the
master, at which point it would be copied to the slaves. For
example, to generate a new post-dated key in the file called
<code>keyring</code> you should do the following:
</p>
<div class="example"><h3>Generating a post-dated key</h3><p><code>
wa_keyring -f ./keyring add 7d
</code></p></div>
<p>
That example generates a new key that will be valid in seven days.
Any existing keys in the keyring file are left as-is so outstanding
tokens continue to work. The new keyring file can then safely be
distributed to the slave servers. Old keys in the keyring file
should also periodically be removed. This can manually be done with
<code>wa_keyring</code> using the <code>list</code> and
<code>remove</code> commands. For example:
</p>
<div class="example"><h3>Manually remove old keys</h3><pre>$ wa_keyring -f ./keyring list
Path: ./keyring
id Created Valid after Fingerprint
0 2003-02-13 12:43:25 2003-02-13 12:43:25 664b48642f741ae343ef5ea46a8768e8
1 2003-03-12 16:21:57 2003-03-12 16:21:57 7c4971e760f75525bba277a308c092c0
$ wa_keyring -f ./keyring remove 0</pre></div>
<p>
Or it can be done automatically, using the <code>gc</code> command:
</p>
<div class="example"><h3>Automatically removing old keys</h3><pre># Remove any keys with a valid after date older then 90 days
$ wa_keyring -f ./keyring gc -90d</pre></div>
<p>
To summarize, for each WebAuth (master and slaves), you'd want the
following directives:
</p>
<div class="example"><h3>Example</h3><pre>WebAuthKeyring conf/webauth/keyring
WebAuthKeytab conf/webauth/keytab
WebAuthKeyringAutoUpdate off</pre></div>
<p>
Periodically (once a month should be reasonable), you'd want to
generate a new key, remove old keys, and then update the keyring
file on the slaves. For example:
</p>
<div class="example"><h3>Monthly Key maintenance</h3><pre># Generate a new key that will be valid in 2 days.
wa_keyring -f conf/webauth/keyring add 2d
# Remove keys that have been around for more then 60 days.
wa_keyring -f conf/webauth/keyring gc 60d
# Copy the new keyring to all of the slaves.
for slave in $slaves ; do
scp conf/weauth/keyring $slave:{path-on-slave}
done
# Restart the master and all the slaves at any point before the new key is
# valid.</pre></div>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="license" id="license">Manual License</a></h2>
<p>
Copyright 2002, 2003, 2004, 2005, 2006, 2009, 2010, 2011, 2012,
2013, 2014 The Board of Trustees of the Leland Stanford Junior
University
</p>
<p>
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without any warranty.
</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthAppTokenLifetime" id="WebAuthAppTokenLifetime">WebAuthAppTokenLifetime</a> <a name="webauthapptokenlifetime" id="webauthapptokenlifetime">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Lifetime of app-tokens we create.</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthAppTokenLifetime <em>nnnn[s|m|h|d|w]</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(lifetime of id-token returned from WebKDC)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This directive controls how long the app-token (the main cookie
containing a user's authenticated identity) is valid for. If not
specified, the expiration time in the id-token returned from the
WebKDC is used, which is the recommended configuration.
</p>
<p>
To be effective, this directive should be used with the
<a href="#webauthforcelogin"><code class="directive">WebAuthForceLogin</code></a>
directive, otherwise single-sign-on will automatically log the
user back in when the token expires.
</p>
<p>
The units for the time are specified by appending a single letter,
which can either be s, m, h, d, or w, which correspond to seconds,
minutes, hours, days, and weeks respectively.
</p>
<div class="example"><h3>Example</h3><pre># create an app-token valid for 2 hours
WebAuthAppTokenLifetime 2h</pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthAuthType" id="WebAuthAuthType">WebAuthAuthType</a> <a name="webauthauthtype" id="webauthauthtype">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Additional AuthType name to support</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthAuthType <em>StanfordAuth</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(none)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This sets an additional <code>AuthType</code> name that will be
treated the same as <code>WebAuth</code> when used with the
<code>AuthType</code> directive. The only interesting value to
use is <code>StanfordAuth</code>, which enables some backward
compatibility code for transitioning from WebAuth 2.x.
</p>
<p>
Setting this directive to <code>StanfordAuth</code> and then using
<code>StanfordAuth</code> in an <code>AuthType</code> directive
will also cause two additional environment variables to get set:
<code>SU_AUTH_USER</code> and <code>SU_AUTH_AGE</code>.
</p>
<div class="note">
<h3>Warning</h3>
<p>
This directive is deprecated and will be removed in a future
version of WebAuth.
</p>
</div>
<div class="example"><h3>Example</h3><p><code>
WebAuthAuthType StanfordAuth
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthCookiePath" id="WebAuthCookiePath">WebAuthCookiePath</a> <a name="webauthcookiepath" id="webauthcookiepath">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
Path scope of cookies set by the module
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthCookiePath <em>scope</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>/</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
Normally, all WebAuth cookies use a path of "/" and will be sent
by the browser for all requests to that server or virtual host.
This setting can be used to restrict the scope of cookies (which
include app, proxy, and cred cookies) to a particular URL path
prefix. This may be useful if different sections of a virtual
host must be handled differently by user information service
policy and therefore must use separate credential sets. It allows
different portions of the same virtual host to be treated as
separate destination "sites" from the perspective of single
sign-on and browser authentication credential management.
</p>
<p>
The <em>scope</em> argument should be the URL or a prefix of the
URL by which the resource affected by this directive is accessed.
The module has no way of checking this, so use care in setting the
scope. An incorrect scope may result in cookies being set but not
returned by the browser, which can cause a redirect loop between
the WebAuth-protected site and the WebLogin service.
</p>
<p>
The <em>scope</em> argument follows the normal rules for
path-based scope for cookies using the "path=" cookie parameter as
described in <a href="http://tools.ietf.org/search/rfc6265">RFC
6265</a>.
</p>
<div class="note">
<h3>Warning</h3>
<p>
Currently, the mod_webauth module does not deal properly with
requests containing multiple cookies of the same name. The
first cookie will be used and the rest ignored, which results in
undefined behavior since the order of cookies is not
deterministic. Therefore, if the
<code class="directive">WebAuthCookiePath</code> directive is used
within a virtual host, all WebAuth-protected URLs in that
virtual host should use this directive and all protected URLs
should be within one and only one path scope. In other words,
ensure that the browser will know that only one set of cookies
could apply to any given URL so that it will never send more than
one cookie with the same name.
</p>
<p>
This restriction will hopefully be lifted in future versions of
WebAuth.
</p>
</div>
<div class="example"><h3>Example</h3><pre># In the following example, no other URLs in this virtual host should be
# protected by WebAuth to avoid creating potentially conflicting cookies
# with a path scope of /.
<Location "/content">
AuthType WebAuth
Require vald-user
WebAuthCookiePath /content
</Location>
<Location "/manage">
AuthType WebAuth
Require user admin1 admin2
WebAuthCookiePath /manage
</Location></pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthCred" id="WebAuthCred">WebAuthCred</a> <a name="webauthcred" id="webauthcred">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Which credentials to acquire</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthCred <em>type</em> [<em>service</em>]</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(none)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This directive specifies which credentials a particular request
may need. It should be used should be used in conjunction with
the
<a href="#webauthusecreds"><code class="directive">WebAuthUseCreds</code></a>
directive.
</p>
<p>
Note that service is optional. If service is not present, then
this is used to indicate that a page further down in the hierarchy
will eventually acquire credentials of the specified type by
specifying credentials with a service name and setting
<a href="#webauthusecreds"><code class="directive">WebAuthUseCreds</code></a>
to "on".
</p>
<p>
This directive may be used multiple times in the same location to
specify that multiple credentials are required.
</p>
<div class="example"><h3>Example</h3><pre># get and use the following krb5 credential on every
# request under /myapp/.
<Location /myapp/>
AuthType WebAuth
require valid-user
WebAuthCred krb5 host/slapshot.stanford.edu@stanford.edu
</Location></pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthCredCacheDir" id="WebAuthCredCacheDir">WebAuthCredCacheDir</a> <a name="webauthcredcachedir" id="webauthcredcachedir">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
Name of the directory containing cached credentials
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthCredCacheDir <em>path</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(none)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This is the name of the directory where credentials are cached for
the duration of a single request.
</p>
<p>
If the path is not absolute, then it will be treated as being
relative to <code class="directive">ServerRoot</code>.
</p>
<div class="note">
<h3>Note</h3>
<p>
This directive must be set if the
<a href="#webauthcred"><code class="directive">WebAuthCred</code></a> and
<a href="#webauthusecreds"><code class="directive">WebAuthUseCreds</code></a>
directives are used.
</p>
</div>
<div class="example"><h3>Example</h3><p><code>
WebAuthCredCacheDir conf/webauth/credcache
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthDebug" id="WebAuthDebug">WebAuthDebug</a> <a name="webauthdebug" id="webauthdebug">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Turn on extra debugging in Apache error log</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthDebug on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthDebug off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
Whether or not to do extra debugging in the Apache error log. You
should also set Apache's <code>LogLevel</code> to
<code>debug</code> as well.
</p>
<div class="example"><h3>Example</h3><pre>WebAuthDebug on
LogLevel debug</pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthDoLogout" id="WebAuthDoLogout">WebAuthDoLogout</a> <a name="webauthdologout" id="webauthdologout">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Destroy all WebAuth-related cookies</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthDoLogout on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthDoLogout off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This directive controls whether or not all WebAuth-related cookies
are removed if the user accesses this URL. This directive also enables
the
<a href="#webauthdontcache"><code class="directive">WebAuthDontCache</code></a>
directive for the given location.
</p>
<div class="example"><h3>Example</h3><pre><Location /myapp/logout>
WebAuthDoLogout on
</Location></pre></div>
<div class="note">
<h3>Note</h3>
<p>
WebAuth-related cookies are all cookies that start with the
prefix "webauth_", except for those beginning with "webauth_wpt"
or "webauth_wft". The latter are single sign-on or persistent
factor cookies used with the WebLogin server and aren't removed
by this directive.
</p>
</div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthDontCache" id="WebAuthDontCache">WebAuthDontCache</a> <a name="webauthdontcache" id="webauthdontcache">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Turn on expire header</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthDontCache on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthDontCache off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
Setting this to <code>on</code> will cause the following headers
to be included in the response to tell browsers not to cache the
returned document.
</p>
<table class="bordered">
<tr>
<th>Header Name</th>
<th>Header Value</th>
</tr>
<tr>
<td><code>Expires</code></td>
<td>(current time)</td>
</tr>
<tr>
<td><code>Pragma</code></td>
<td>no-cache</td>
</tr>
<tr>
<td><code>Cache-Control</code></td>
<td>no-cache</td>
</tr>
</table>
<p>
It is recommended this only be turned on for sensitive documents
and not all documents (and images) on the server.
</p>
<div class="example"><h3>Example</h3><p><code>
WebAuthDontCache on
</code></p></div>
<h3>See also</h3>
<ul>
<li><a href="mod_expires.html.en">mod_expires</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthExtraRedirect" id="WebAuthExtraRedirect">WebAuthExtraRedirect</a> <a name="webauthextraredirect" id="webauthextraredirect">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
Whether or not to do an extra redirect upon return from the WebKDC
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthExtraRedirect on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthExtraRedirect on</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
When browsers get redirected back from the WebKDC, tokens will be
returned in the URL, by appending the string
"<code>?WEBAUTHR=...;;WEBAUTHS=...;</code>" to the URL.
</p>
<p>
This directive controls whether or not an extra redirect will be
sent to the browser, with this information removed from the URL
after the user has been authenticated. The benefit of performing
the extra redirect is the user's won't see the extra WebAuth
information in the URL, and won't be able to bookmark it, etc.
Note that bookmarking a URL with the extra information shouldn't
really cause any problems, as the tokens in the extra information
will only be valid for a limited amount of time (see
<a href="#webauthtokenmaxttl"><code class="directive">WebAuthTokenMaxTTL</code></a>),
after which they will be ignored.
</p>
<p>
The downside to enabling this directive is the extra redirect will
require another round-trip from the server to the user's browser,
and under certain circumstances maybe also trigger a caching bug
in the user's browser (though hopefully this should never happen).
</p>
<div class="example"><h3>Example</h3><pre><Location /myapp/>
WebAuthExtraRedirect off
...
</Location></pre></div>
<div class="note">
<h3>Compatibility</h3>
<p>
In versions of WebAuth prior to 3.5.0, the default for
<code class="directive">WebAuthExtraRedirect</code> was off. Also,
prior to 3.5.0, this directive was only accepted in directory
and .htaccess configuration contexts, not in the server
configuration or virtual host configurations.
</p>
</div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthFailureURL" id="WebAuthFailureURL">WebAuthFailureURL</a> <a name="webauthfailureurl" id="webauthfailureurl">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
The URL browsers get redirected to when a fatal mod_webauth error
occurs
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthFaliureURL <em>url</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(none)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This is the URL browsers get redirected to when mod_webauth
encounters a fatal error. If it is not set, then the server will
return a "500 Internal Server Error" when a fatal error occurs.
</p>
<div class="example"><h3>Example</h3><p><code>
WebAuthFailureURL /app/sorry.html
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthForceLogin" id="WebAuthForceLogin">WebAuthForceLogin</a> <a name="webauthforcelogin" id="webauthforcelogin">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
Forces interactive authentication when user is not authenticated
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthForceLogin on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthForceLogin off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This directive controls whether or not interactive authentication
will be forced if the user needs to be redirected to the WebLogin
server for authentication.
</p>
<p>
By default, the WebLogin server may set cookies for the user after
their first authentication and use those cookies for any
subsequent authentication until the user's credentials expire.
The user may therefore not have to present credentials again,
which poses some risk if the user walked away from a system
without destroying browser cookies. This directive can be used to
force an interactive authentication if the user needs to go to
WebLogin.
</p>
<p>
Interactive is defined as involving a login token, which in
practice means either a password or an OTP authentication via
WebLogin. The normal expected behavior is that that the local
WebLogin server will re-prompt the user for their password, but
some other authentication mechanism may be possible depending on
local WebLogin and WebKDC configuration.
</p>
<p>
Compare this directive to <a href="#webauthrequiresessionfactor"><code class="directive">WebAuthRequireSessionFactor</code></a>
to determine which is the most appropriate for your use case.
Note that <code class="directive">WebAuthRequireSessionfactor</code> only
requires that the authentication be very recent (as controlled by
a WebKDC configuration option), not that it be repeated for each
separate site.
</p>
<p>
Be aware that setting this directive to true will make asserting
an authorization identity (see <a href="#webauthtrustauthzidentity"><code class="directive">WebAuthTrustAuthzIdentity</code></a>)
impossible unless the user is prompted for the authorization
identity as part of the initial authentication, since this
directive will not allow the user to select a different
authorization identity without reauthenticating.
</p>
<div class="example"><h3>Example</h3><pre># force the user to login, and create an app-token
# that only lasts for 20 minutes
<Location /myapp/>
AuthType WebAuth
Require valid-user
WebAuthForceLogin on
WebAuthAppTokenLifetime 20m
</Location></pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthHttpOnly" id="WebAuthHttpOnly">WebAuthHttpOnly</a> <a name="webauthhttponly" id="webauthhttponly">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Whether or not to set WebAuth cookies HttpOnly</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthHttpOnly on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>on</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This directive controls whether the HttpOnly flag is set on WebAuth
session cookies. It is turned on by default. In the unusual event
that Javascript needs to be able to read these cookies, this
directive can be used to turn off the flag.
</p>
<p>
Be aware that the structure and format of the WebAuth cookies are
an internal implementation detail and decoding them or modifying
them outside of the WebAuth code itself is not recommended. If
you need to turn this directive off, that normally indicates that
you are doing something unsupported with the WebAuth cookies.
</p>
<div class="example"><h3>Example</h3><p><code>
WebAuthHttpOnly off
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthInactiveExpire" id="WebAuthInactiveExpire">WebAuthInactiveExpire</a> <a name="webauthinactiveexpire" id="webauthinactiveexpire">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
Expiration period for app tokens that haven't been used recently
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthInactiveExpire <em>nnnn[s|m|h|d|w]</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(disabled)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
Duration of inactivity allowed before an app token (webauth_at
cookie) is considered expired and re-auth occurs. Setting this
requires mod_webauth to periodically update the webauth_at cookie,
based on the setting of the
<a href="#webauthlastuseupdateinterval"><code class="directive">WebAuthLastUseUpdateInterval</code></a>
directive.
</p>
<p>
To be effective, this directive should be used with either <a href="#webauthforcelogin"><code class="directive">WebAuthForceLogin</code></a>
or <a href="#webauthrequiresessionfactor"><code class="directive">WebAuthRequireSessionFactor</code></a>.
Otherwise, single-sign-on will automatically log the user back in
when the token expires due to inactivity. Additionally, this
value should be higher then the value of <a href="#webauthlastuseupdateinterval"><code class="directive">WebAuthLastUseUpdateInterval</code></a>.
Otherwise, the cookie will expire before the last-used time is
updated.
</p>
<p>
The units for the time are specified by appending a single letter,
which can either be s, m, h, d, or w, which correspond to seconds,
minutes, hours, days, and weeks respectively.
</p>
<div class="example"><h3>Example</h3><pre># timeout an app-token if it isn't used for more
# then 20 minutes
WebAuthInactiveExpire 20m
# update the last-used-time in the cookie if it's older
# then 10 minutes
WebAuthLastUseUpdateInterval 10m</pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthKeyring" id="WebAuthKeyring">WebAuthKeyring</a> <a name="webauthkeyring" id="webauthkeyring">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the file containing the WebAuth keyring
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthKeyring <em>path</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(none)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This is the name of the file containing the WebAuth keyring, which
is a file that contains the server's private AES key(s). It must
be readable by the Apache user.
</p>
<p>
The keyring file is read when the first request for a virtual host
is received. Each child maintains an in-memory cached keyring for
each virtual host. These keyrings are only reloaded from disk
when Apache refreshes its configuration. If the keyring is
changed by an external process (<code>wa_keyring</code>, for
instance), Apache must be told to reload configuration files in
order to pick up the change.
</p>
<p>
When using the ITK Apache MPM, there should be a separate keyring
for each unique virtual host user that will be doing WebAuth. This
maintains proper privilege separation by assigning each user a
separate keyring.
</p>
<p>
If the path is not absolute, then it will be treated as being
relative to <code>ServerRoot</code>.
</p>
<div class="note">
<h3>Note</h3>
<p>This directive must be set.</p>
</div>
<div class="example"><h3>Example</h3><p><code>
WebAuthKeyRing conf/webauth/keyring
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthKeyringAutoUpdate" id="WebAuthKeyringAutoUpdate">WebAuthKeyringAutoUpdate</a> <a name="webauthkeyringautoupdate" id="webauthkeyringautoupdate">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Whether or not we auto-update the keyring file</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthKeyringAutoUpdate on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthKeyringAutoUpdate on</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This directive controls whether or not we auto-update the keyring
file. This includes creating it if it doesn't exist, generating a
new key before the old key expires, and periodically
garbage-collecting old keys. Updating only occurs on server
startup and restarts.
</p>
<p>
If auto-update is enabled, Apache must have write access to the
directory containing the keyring, since keyrings are updated by
writing out the new file to a separate name and then atomically
replacing the file.
</p>
<p>
Ownership (user and group) of the existing keyring file will be
preserved if possible without overwriting the existing file.
Permissions will also be preserved, with the exception that
permissions will not be copied to the new file if the old file was
group-readable or group-writable and setting the group ownership
failed.
</p>
<div class="note">
<h3>Note</h3>
<p>
This directive should be turned off if multiple servers are
sharing the same keyring file so the keyring file can be
manually updated.
</p>
</div>
<div class="example"><h3>Example</h3><p><code>
WebAuthKeyringAutoUdpate off
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthKeyringKeyLifetime" id="WebAuthKeyringKeyLifetime">WebAuthKeyringKeyLifetime</a> <a name="webauthkeyringkeylifetime" id="webauthkeyringkeylifetime">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
Lifetime of keys in the keyring if we auto-update
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthAKeyringKeyLifetime <em>nnnn[s|m|h|d|w]</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthKeyringKeyLifetime 30d</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This directive controls how long keys we automatically create for
the keyring are valid. Keys will be valid from the time they are
created until the lifetime is reached. Note that key lifetime is
only checked on server startup and restarts.
</p>
<p>
This directive is only consulted if
<code class="directive">WebKdcKeyringAutoUpdate</code> is enabled.
</p>
<p>
The units for the time are specified by appending a single letter,
which can either be s, m, h, d, or w, which correspond to seconds,
minutes, hours, days, and weeks respectively.
</p>
<div class="example"><h3>Example</h3><p><code>
WebAuthKeyringKeyLifetime 60d
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthKeytab" id="WebAuthKeytab">WebAuthKeytab</a> <a name="webauthkeytab" id="webauthkeytab">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the Kerberos keytab file</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthKeytab <em>path</em> [<em>principal</em>]</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(none)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This is the name of the Kerberos keytab file. If principal is not
specified, then the first principal in the keytab file be used.
</p>
<p>
If the path is not absolute, then it will be treated as being
relative to <code>ServerRoot</code>.
</p>
<div class="note">
<h3>Note</h3>
<p>This directive must be set.</p>
</div>
<div class="example"><h3>Example</h3><p><code>
WebAuthKeytab conf/webauth/keytab webauth/slapshot.stanford.edu
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthLastUseUpdateInterval" id="WebAuthLastUseUpdateInterval">WebAuthLastUseUpdateInterval</a> <a name="webauthlastuseupdateinterval" id="webauthlastuseupdateinterval">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>How often to update the main webauth cookie</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthLastUseUpdateInterval <em>nnnn[s|m|h|d|w]</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthLastUsedUpdateInterval 0</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This value determines how often we update the webauth_at cookie to
indicate when the token was last used. Setting this too small will
cause too many cookie updates. A value of 0 will disable updating
of the cookie.
</p>
<p>
This directive is normally only used with
<a href="#webauthinactiveexpire"><code class="directive">WebAuthInactiveExpire</code></a>,
though it can be used independently if you just need the
<code>WEBAUTH_TOKEN_LASTUSED</code> environment variable updated.
</p>
<p>
The units for the time are specified by appending a single letter,
which can either be s, m, h, d, or w, which correspond to seconds,
minutes, hours, days, and weeks respectively.
</p>
<div class="example"><h3>Example</h3><pre># timeout an app-token if it isn't used for
# more then 20 minutes
WebAuthInactiveExpire 20m
# update the last-used-time in the cookie if it's older
# then 10 minutes
WebAuthLastUseUpdateInterval 10m</pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthLoginCanceledURL" id="WebAuthLoginCanceledURL">WebAuthLoginCanceledURL</a> <a name="webauthlogincanceledurl" id="webauthlogincanceledurl">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>URL to return to if user cancels out of login</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthLoginCanceledURL <em>url</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(none)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This directive controls which URL the user is returned to if they
have to login, but hit the cancel button while logging in.
Normally, the cancel option will not be displayed, but if this
directive is set, the user will be shown an option to cancel
logging in on the WebLogin screen.
</p>
<div class="example"><h3>Example</h3><p><code>
WebAuthLoginCanceledURL /nonwebauth/info.html
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthLoginURL" id="WebAuthLoginURL">WebAuthLoginURL</a> <a name="webauthloginurl" id="webauthloginurl">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
The URL browsers get redirected to when the user is unauthenticated
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthLoginURL <em>url</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(none)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This is the URL browsers get redirected to when the user is
unauthenticated and needs to either login or reuse an existing
single-sign-on credential. This should alway use SSL.
</p>
<div class="note">
<h3>Note</h3>
<p>This directive must be set.</p>
</div>
<div class="example"><h3>Example</h3><p><code>
WebAuthLoginURL https://weblogin.stanford.edu/login
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthOptional" id="WebAuthOptional">WebAuthOptional</a> <a name="webauthoptional" id="webauthoptional">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
Whether or not to require the use to authenticate
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthOptional on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
Normally, if an unauthenticated user attempts to access a
directory protected by WebAuth, they will be redirected to the
WebLogin server to authenticate. This directive allows that
authentication to be deferred. If this option is set to on, an
unauthenticated user will still be permitted access to the
protected resource (even with <code>require valid-user</code> in
effect), unless they're prohibited by some other authorization
rule. Unauthenticated users will not have the REMOTE_USER,
WEBAUTH_USER, or AUTH_TYPE environment variables set. If the user
has already authenticated, then all the environment variables will
be set as normal.
</p>
<p>
This directive is normally used to protect CGI scripts or other
dynamic content that will then inspect the REMOTE_USER environment
variable and show different content based on whether the user has
authenticated or not. Generally, such content will include a
login link to a page protected by WebAuth with
<code class="directive">WebAuthOptional</code> set to off, so that the
user can authenticate if they wish. After that authentication,
subsequent visits to content with
<code class="directive">WebAuthOptional</code> set to on will have
authentication information available in the environment.
</p>
<div class="example"><h3>Example</h3><p><code>
WebAuthOptional on
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthPostReturnURL" id="WebAuthPostReturnURL">WebAuthPostReturnURL</a> <a name="webauthpostreturnurl" id="webauthpostreturnurl">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
URL to return to after authenticating during a POST
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthPostReturnURL <em>url</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(none)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This directive controls which URL the user is returned to after
authenticating with the WebKDC when the HTTP method was a POST.
By default, mod_webauth will return 401 (UNAUTHORIZED), as it is
impractical to try and recover from a POST that failed due to no
authentication.
</p>
<div class="example"><h3>Example</h3><pre># if unauthenticated when accessing a URL via a POST,
# authenticate and return to front-page
WebAuthPostReturnURL /myapp/</pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthRequireInitialFactor" id="WebAuthRequireInitialFactor">WebAuthRequireInitialFactor</a> <a name="webauthrequireinitialfactor" id="webauthrequireinitialfactor">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Required factors for initial authentication</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>
WebAuthRequireInitialFactor <em>factor</em> [<em>factor</em> ...]
</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(none)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
Normally, WebAuth will accept any authentication method and allow
access to the protected resource. This directive is used to
require that the user's initial authentication be done with a
particular factor. The value is a space-separated list of
factors, all of which are required. If any of those factors were
not used for the initial authentication, the user will be sent
back to the WebLogin server to reauthenticate.
</p>
<p>
The initial authentication is the authentication used to obtain
single sign-on cookies (if any). That authentication may have
been done immediately before going to this web site, or earlier to
obtain single sign-on credentials. See
<a href="#webauthrequiresessionfactor"><code class="directive">WebAuthRequireSessionFactor</code></a>
to control the factors used to authenticate to this specific
resource, or
<a href="#webauthrequireloa"><code class="directive">WebAuthRequireLOA</code></a>
for a different approach to these sorts of restrictions.
</p>
<div class="example"><h3>Example</h3><p><code>
WebAuthRequireInitialFactor p o
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthRequireLOA" id="WebAuthRequireLOA">WebAuthRequireLOA</a> <a name="webauthrequireloa" id="webauthrequireloa">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Required level of assurance for authentication</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthRequireLOA <em>loa</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>0</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
Normally, WebAuth will accept any authentication method and allow
access to the protected resource. This directive is used to
require that the user's authentication meet a particular level of
assurance.
</p>
<p>
A level of assurance is an integer number whose definition varies
from site to site, except that larger numbers indicate a stronger
assurance of the user's authentication and identity than smaller
numbers. Level of assurance may combine multiple factors, such as
binding of identity (whether the user presented identification
when obtaining their account credentials), method of
authentication, and other site-defined information. This
directive should be used in conjunction with site-specific
supplemental documentation of what the level of assurance numbers
mean for that site.
</p>
<div class="example"><h3>Example</h3><p><code>
WebAuthRequireLOA 2
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthRequireSessionFactor" id="WebAuthRequireSessionFactor">WebAuthRequireSessionFactor</a> <a name="webauthrequiresessionfactor" id="webauthrequiresessionfactor">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Required factors for session authentication</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>
WebAuthRequireSessionFactor <em>factor</em> [<em>factor</em> ...]
</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(none)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
Normally, WebAuth will accept any authentication method and allow
access to the protected resource. This directive is used to
require that the user's session authentication be done with a
particular factor. The value is a space-separated list of
factors, all of which are required. If any of those factors were
not used for the session authentication, the user will be sent
back to the WebLogin server to reauthenticate.
</p>
<p>
The session authentication is the authentication used to access
this particular resource (or, more specifically, to obtain an
application authentication cookie scoped to include this
resource). This will match the initial authentication if the user
did not use any single sign-on method, if <a href="#webauthforcelogin"><code class="directive">WebAuthForceLogin</code></a>
is set), or if the user has authenticated very recently, but may
be different if single sign-on is in use. In most situations, one
should instead use <a href="#webauthrequireinitialfactor"><code class="directive">WebAuthRequireInitialFactor</code></a>
to control the initial authentication factors and allow single
sign-on to work normally. See <a href="#webauthrequireloa"><code class="directive">WebAuthRequireLOA</code></a>
for a different approach to these sorts of restrictions.
</p>
<div class="example"><h3>Example</h3><p><code>
WebAuthRequireSessionFactor m
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthRequireSSL" id="WebAuthRequireSSL">WebAuthRequireSSL</a> <a name="webauthrequiressl" id="webauthrequiressl">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
Whether SSL is required to access a WebAuth-protected resource
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthRequireSSL on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthRequireSSL on</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
Normally, all WebAuth-protected resources must be accessed via
SSL. Attempts to access a WebAuth-protected resources without SSL
will either be rejected with an authorization denied error (the
default) or will be redirected to the equivalent SSL URL (if
<a href="#webauthsslredirect"><code class="directive">WebAuthSSLRedirect</code></a>
is set to <code>on</code>).
</p>
<p>
If this directive is set to <code>on</code>, access to a
WebAuth-protected resource is permitted without the protection of
SSL.
</p>
<div class="note">
<h3>Warning</h3>
<p>
Turning off this directive can create a significant security
vulnerability. Without required use of SSL, there is no
protection for the WebAuth app token. Anyone in the network
path from the client to the server can trivially steal the token
and then authenticate to that server as that user. Under normal
circumstances, this directive should never be turned off.
</p>
<p>
There are, however, two circumstances in which turning off this
directive might make sense.
</p>
<p>
One is if the WebAuth-protected resource is behind a separate
SSL accelerator and connected to it via a trusted network link.
In this case, by the time Apache sees the request, it appears to
not be using SSL, but the request has SSL protection on all
untrusted network connections. In this case, it may be
necessary to turn off this directive and to turn on <a href="#webauthsslreturn"><code class="directive">WebAuthSSLReturn</code></a>
so that the client is returned to the correct URL after
authentication.
</p>
<p>
The other case where turning this directive off may make sense
is if WebAuth is being used to protect a proxy for low-value,
low-security content where theft of the authentication
credentials for that site is not a concern. This may be the
case if, for example, WebAuth is being used to protect a
subscription service that's not of sufficiently high value that
theft of authentication credentials is an expected risk. Even
in this case, requiring SSL is strongly preferred, but some
PAC-based proxy configurations may not permit forcing SSL to the
proxy server.
</p>
</div>
<div class="example"><h3>Example</h3><pre># This server is behind an SSL accelerator, so Apache only sees
# non-SSL traffic. Permit non-SSL WebAuth access, but ensure the
# return URL for authentication tells the client to use SSL.
WebAuthRequireSSL off
<Location />
WebAuthSSLReturn on
</Location></pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthReturnURL" id="WebAuthReturnURL">WebAuthReturnURL</a> <a name="webauthreturnurl" id="webauthreturnurl">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>URL to return to after authenticating</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthReturnURL <em>url</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(url user originally requested)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This directive controls which URL the user is returned to after
authenticating with the WebKDC. By default, they will return the
URL they originally requested.
</p>
<div class="example"><h3>Example</h3><pre># if unauthenticated when accessing a URL, authenticate
# and return to front-page
WebAuthReturnURL /myapp/</pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthServiceTokenCache" id="WebAuthServiceTokenCache">WebAuthServiceTokenCache</a> <a name="webauthservicetokencache" id="webauthservicetokencache">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the service-token cache file.
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthServiceTokenCache <em>path</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(none)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This is the name of the service-token cache file. This file is
used to maintain a cached copy of the service-token that gets
shared between all the web server's child processes. It will get
generated and maintained automatically.
</p>
<p>
If the path is not absolute, then it will be treated as being
relative to <code>ServerRoot</code>.
</p>
<div class="note">
<h3>Note</h3>
<p>This directive must be set.</p>
</div>
<div class="example"><h3>Example</h3><p><code>
WebAuthServiceTokenCache conf/webauth/service_token_cache
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthSSLRedirect" id="WebAuthSSLRedirect">WebAuthSSLRedirect</a> <a name="webauthsslredirect" id="webauthsslredirect">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
Redirect to https when accessing a WebAuth-protected page via http
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthSSLRedirect on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthSSLRedirect off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
If a user attempts to access a WebAuth-protected page via
<code>http</code> instead of <code>https</code> and this directive
is turned off, then access will be denied. If this directive is
tuned on, then the user will be redirected to the same URL using
<code>https</code> instead of <code>http</code>. Once accessing
pages using <code>https</code>, they will remain accessing pages
via <code>https</code> unless the application redirects the user
back to <code>http</code>.
</p>
<div class="note">
<h3>Note</h3>
<p>
If the server is not configured to run SSL on the default port,
then the
<a href="#webauthsslredirectport"><code class="directive">WebAuthSSLRedirectPort</code></a>
directive must be used to specify which port to redirect the
user to.
</p>
</div>
<div class="example"><h3>Example</h3><p><code>
WebAuthSSLRedirect on
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthSSLRedirectPort" id="WebAuthSSLRedirectPort">WebAuthSSLRedirectPort</a> <a name="webauthsslredirectport" id="webauthsslredirectport">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>port to use when redirecting the user to https </td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthSSLRedirectPort <em>port</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthSSLRedirectPort 443</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This is used in conjunction with the
<a href="#webauthsslredirect"><code class="directive">WebAuthSSLRedirect</code></a>
directive and controls which port the user is redirected to when
redirecting them to the <code>https</code> version of the URL.
This is useful during development if you run the Apache server on
ports 8080 and 8443, for example.
</p>
<div class="example"><h3>Example</h3><pre>WebAuthSSLRedirect on
WebAuthSSLRedirectPort 8443</pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthSSLReturn" id="WebAuthSSLReturn">WebAuthSSLReturn</a> <a name="webauthsslreturn" id="webauthsslreturn">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the return URL to be https</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthSSLReturn on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthSSLReturn off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
If a user connects to a WebAuth-protected page via http, and needs
to be authenticated, then this directive will cause the return URL
to be converted to https. For this directive to have any meaning,
usually <a href="#webauthrequiressl"><code class="directive">WebAuthRequireSSL</code></a>
must also be off; otherwise, the access will either be denied or
redirected to https anyway before this directive can have any
effect.
</p>
<p>
This directive should be set, in conjunction with
<code class="directive">WebAuthRequireSSL</code>, when the page is
actually protected by SSL from the perspective of the browser but
not from the perspective of Apache. This is common when the Apache
server is behind a load balancer that decrypts SSL, or is otherwise
behind an SSL offload proxy.
</p>
<div class="example"><h3>Example</h3><pre><Location /myapp/>
AuthType WebAuth
Require valid-user
WebAuthRequireSSL off
WebAuthSSLReturn on
</Location></pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthStripURL" id="WebAuthStripURL">WebAuthStripURL</a> <a name="webauthstripurl" id="webauthstripurl">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
Whether or not to strip WebAuth information from the internal URL
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthStripURL on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>on</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This directive controls whether the WebAuth module strips WebAuth
information from the URL before processing it. If set to on (the
default), the WEBAUTHR and WEBAUTHS strings are stripped from
Apache's internal knowledge of the URL before <Directory>
and <File> blocks are processed and other modules, CGI
scripts, and similar applications will not see the WebAuth data.
</p>
<p>
Normally, you should always leave this directive on. The only
reason to turn it off is if you have an application that wants to
do its own WebAuth handling, running on a server that also has
mod_webauth enabled. If you do turn this directive, you should
also enable
<a href="#webauthextraredirect"><code class="directive">WebAuthExtraRedirect</code></a>
or your web applications will see unexpected data in their URLs
that they won't know what to do with.
</p>
<p>
This unfortunately can only be set usefully at the server or
virtual host level due to the way that Apache processes requests.
</p>
<div class="example"><h3>Example</h3><p><code>
WebAuthStripURL off
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthSubjectAuthType" id="WebAuthSubjectAuthType">WebAuthSubjectAuthType</a> <a name="webauthsubjectauthtype" id="webauthsubjectauthtype">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
Type of subject authenticator the WebKDC will use in the returned
id-token
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthSubjectAuthType <em>type</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthSubjectAuthType webkdc</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
When mod_webauth needs to make a request for an id-token, it needs
to specify what type of subject authenticator that it expects
returned. This directive configures which type of subject
authenticator is requested by <em>type</em>:
</p>
<dl>
<dt><code>webkdc</code></dt>
<dd>
<p>
This is the default.
</p>
<p>
When this type of subject authenticator is used, the WebKDC
will place the already verified username in the returned
id-token (encrypted, of course). When mod_webauth gets back
the id-token, it will trust that the WebKDC as sufficiently
authenticated the user, and use the returned username.
</p>
</dd>
<dt><code>krb5</code></dt>
<dd>
<p>
When this type of subject authenticator is used, the WebKDC
will use the user's Kerberos credentials to make a
<code>krb5_mk_req</code> call, using the requesting web
server's Kerberos principal. When mod_webauth gets back the
id-token, it will then use it's keytab to verify the subject
authenticator using <code>krb5_rd_req</code>.
</p>
<p>
This means that, even if the WebKDC is compromised, a user's
identity cannot be forged unless that user happens to be
logged in and using the WebKDC.
</p>
<p>
Setting this subject auth type will make all id tokens about
500 bytes longer then when using a type of
<code>webkdc</code>. This may cause problems with the HTTP
header limit if the site uses other large cookies, or uses
Active Directory as the Kerberos KDC (which may make Kerberos
tickets significantly longer).
</p>
<p>
This setting will also cause mod_webauth to ignore all
authorization identities (since they cannot be independently
verified), meaning that <a href="#webauthtrustauthzidentity"><code class="directive">WebAuthTrustAuthzIdentity</code></a>
directives will be ignored.
</p>
<p>
Also be aware that using this option means that the WebAuth
server will not get the benefit of any identity
canonicalization or mapping that is done by the WebLogin
server. Instead, it will authenticate the user as the
principal present in the Kerberos authenticator, converted to
a local name through the normal Kerberos local name mapping
mechanism. This may be a feature or a drawback depending on
the situation.
</p>
</dd>
</dl>
<div class="example"><h3>Example</h3><p><code>
WebAuthSubjectAuthType krb5
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthTokenMaxTTL" id="WebAuthTokenMaxTTL">WebAuthTokenMaxTTL</a> <a name="webauthtokenmaxttl" id="webauthtokenmaxttl">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
How old a token that was should be recently created is valid for.
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthTokenMaxTTL <em>nnnn[s|m|h|d|w]</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthTokenMaxTTL 300s</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This directive sets how old tokens that must be considered recent
can be before they are considered stale. It is used to help
prevent tokens from being replayed, and to ignore those token if
they occur in cookies, URLs, etc. This requires clocks between
the web server and the WebKDC to be synchronized.
</p>
<p>
The units for the TTL are specified by appending a single letter,
which can either be s, m, h, d, or w, which correspond to seconds,
minutes, hours, days, and weeks respectively.
</p>
<div class="example"><h3>Example</h3><pre># ten minute TTL
WebAuthTokenMaxTTL 10m</pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthTrustAuthzIdentity" id="WebAuthTrustAuthzIdentity">WebAuthTrustAuthzIdentity</a> <a name="webauthtrustauthzidentity" id="webauthtrustauthzidentity">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
Whether to use the authorization identity as the authenticated user
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthTrustAuthzIdentity on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthTrustAuthzIdentity off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
By default, WebAuth ignores any authorization identity sent by the
WebKDC and uses the user's authenticated identity as the Apache
identity (for authorization checks and logging) and for the
REMOTE_USER environment variable. To allow the user (with the
WebKDC's permission and vetting) to assert a different
authorization identity than their authenticated identity, set this
directive to <code>on</code>. This can be set or changed at any
scope, including .htaccess files if AuthConfig overrides are
allowed.
</p>
<p>
Even if this directive is left off (the default), the
authorization identity (if present) is available in the
WEBAUTH_AUTHZ_USER environment variable. However, if this
directive is not turned on, the authorization identity won't be
used for any purpose other than populating that environment
variable.
</p>
<p>
If this directive is enabled, the authorization identity will be
passed to Apache as the user's identity, just as if they'd
authenticated as that user. That will affect any further
authorization checks, group membership checks, or other modules
that retrieve information based on the authenticated identity,
such as LDAP modules.
</p>
<p>
Even if this directive is enabled, the WEBAUTH_USER environment
variable will always be set to the authenticated identity,
ignoring any authorization identity.
</p>
<div class="note">
<h3>Warning for WebAuthSubjectAuthType</h3>
<p>
The interaction between this directive and either <a href="#webauthsubjectauthtype"><code class="directive">WebAuthSubjectAuthType</code></a>
or <a href="#webauthcred"><code class="directive">WebAuthCred</code></a>
may be unexpected.
</p>
<p>
Setting <code class="directive">WebAuthSubjectAuthType</code> to
<code>krb5</code> indicates that mod_webauth should not solely
trust the WebKDC's assertion of identity and instead
independently verify the authentication credentials of the user.
However, there is no way to independently verify the
authorization identity. Therefore, setting
<code class="directive">WebAuthSubjectAuthType</code> to
<code>krb5</code> tells mod_webauth to ignore the authorization
identity. The <code>webkdc</code> subject auth type (the
default) must be used to use this feature.
</p>
<p>
<code class="directive">WebAuthCred</code> can be used in combination
with this directive, but all obtained credentials will be for
the authentication identity, not for the authorization identity.
There is currently no way to obtain credentials for the
authorization identity.
</p>
</div>
<div class="note">
<h3>Warning for WebAuthForceLogin</h3>
<p>
Be aware that, with the typical WebLogin configuration, setting
<a href="#webauthforcelogin"><code class="directive">WebAuthForceLogin</code></a>
will make asserting an authorization identity impossible.
Normally, WebLogin lets the user change the authorization
identity after authentication, since only then does it know what
possible authorization identities are permitted. But when
<code class="directive">WebAuthForceLogin</code> is in effect, the
authorization identity cannot be changed without repeating the
authentication, which may effectively disable the option. If
you are using authorization identities, consider using <a href="#webauthrequiresessionfactor"><code class="directive">WebAuthRequireSessionFactor</code></a>
instead.
</p>
</div>
<div class="example"><h3>Example</h3><p><code>
WebAuthTrustAuthzIdentity on
</code></p></div>
<div class="note">
<h3>Note on Logging</h3>
<p>
By default, the Apache access log includes, in the third field,
the identity of the user accessing a page that requires
authentication. This is the authorization identity: the
identity stored in the REMOTE_USER environment variable and used
for authorization checks.
</p>
<p>
When the <code class="directive">WebAuthTrustAuthzIdentity</code>
directive is enabled, it may be useful to also log the
authentication identity. The WebAuth module will log to the
error log the authentication and authorization identities after
the initial authentication to that server, but it can be hard to
correlate that with access log entries.
</p>
<p>
There is a field in the access log that can be used for this
purpose, although it requires a change to the default Apache log
format. The second field in a standard access log entry is
normally the remote connection identity as determined by the
ident protocol. However, this protocol is obsolete and
insecure, and this check is disabled by default, so in a typical
Apache installation, this field is always empty
(<code>-</code>). Existing log parsers understand this field,
so it can be reused to store the authentication identity so that
both identities can be logged.
</p>
<p>
To do this, change the second field of the Apache access log
format from <code>%l</code> to <code>%{WEBAUTH_USER}e</code>.
This will log the WebAuth authentication identity, if any, in
the second field, and leave the second field as <code>-</code>
if no authentication identity is established.
</p>
</div>
<div class="example"><h3>Logging Example</h3><pre># Replace ident field with WebAuth authentication identity.
LogFormat \
"%h %{WEBAUTH_USER}e %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" \
webauth_combined
CustomLog /var/log/apache2/access.log webauth_combined</pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthUseCreds" id="WebAuthUseCreds">WebAuthUseCreds</a> <a name="webauthusecreds" id="webauthusecreds">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Whether or not save credentials to the cache</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthUseCreds on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthUseCreds off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This directive controls whether or not any acquired credentials
will actually be saved to the credential cache directory and made
available as part of the current request. It should be used in
conjunction with the
<a href="#webauthcred"><code class="directive">WebAuthCred</code></a>
directive.
</p>
<div class="example"><h3>Example</h3><pre><Location /myapp/command>
WebAuthUseCreds on
</Location></pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthVarPrefix" id="WebAuthVarPrefix">WebAuthVarPrefix</a> <a name="webauthvarprefix" id="webauthvarprefix">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Additional WebAuth-related environment variables to set
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthVarPrefix <em>string</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>WebAuthVarPrefix ""</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
The WebAuth module sets various environment variables that are
made available at the time of document or application serving.
They are all prefixed by "WEBAUTH" (for instance WEBAUTH_USER),
but some CGI apps (specifically the Oracle WRB) have expectations
about and/or restrictions on the names of environment variables
they can handle. Set this to a string you want prepended to the
environment variables this module defines, and they will be set in
addition to the standard "WEBAUTH" ones.
</p>
<div class="example"><h3>Example</h3><pre><Location /myapp/>
# this will cause both WEBAUTH_USER and HTTP_WEBAUTH_USER
# environment variables to get set.
WebAuthVarPrefix HTTP_
</Location></pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthWebKdcPrincipal" id="WebAuthWebKdcPrincipal">WebAuthWebKdcPrincipal</a> <a name="webauthwebkdcprincipal" id="webauthwebkdcprincipal">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The Kerberos principal name of the WebKDC
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthWebKdcPrincipal <em>principal</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(none)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This is the name of the Kerberos principal to use when
communicating with the WebKDC. It used to request a service-token
from the WebKDC.
</p>
<div class="note">
<h3>Note</h3>
<p>This directive must be set.</p>
</div>
<div class="example"><h3>Example</h3><pre># if realm isn't specified, the default realm will be used
WebAuthWebKdcPrincipal service/webkdc@stanford.edu</pre></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthWebKdcSSLCertCheck" id="WebAuthWebKdcSSLCertCheck">WebAuthWebKdcSSLCertCheck</a> <a name="webauthwebkdcsslcertcheck" id="webauthwebkdcsslcertcheck">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
Whether or not to perform SSL certificate checking on the WebKDC's
certificate
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthWebkdcSSLCertCheck on|off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>on</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This directive controls whether or not SSL certificate checking is
performed on the certificate used by the WebKDC when mod_webauth
communicates directly with the WebKDC.
</p>
<div class="note">
<h3>Note</h3>
<p>
Setting this directive to <code>off</code> opens a security hole
and should only be used in development when the
<a href="#webauthwebkdcsslcertfile"><code class="directive">WebAuthWebKdcSSLCertFile</code></a>
directive cannot be used.
</p>
</div>
<div class="example"><h3>Example</h3><p><code>
WebAuthWebKdcSSLCertCheck off
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthWebKdcSSLCertFile" id="WebAuthWebKdcSSLCertFile">WebAuthWebKdcSSLCertFile</a> <a name="webauthwebkdcsslcertfile" id="webauthwebkdcsslcertfile">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the WebKDC's certificate file.
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthWebkdcSSLCertFile <em>path</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(none)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This is the name of a file holding one or more certificates to
verify the WebKDC's SSL Certificate with. This directive is only
needed if you are using a self-signed certificate with your
WebKDC, or a certificate signed by a certificate authority that
isn't recognized. If you are using a self-signed certificate, you
should copy that certificate (the file mentioned in the WebKDC's
Apache SSLCertificateFile directive) to a local file, and point to
that file with this directive.
</p>
<p>
If the path is not absolute, then it will be treated as being
relative to <code>ServerRoot</code>.
</p>
<div class="note">
<h3>Note</h3>
<p>
This directive is only needed when the <strong>WebKDC</strong>
is using a self-signed certificate . It is not needed if your
WebAuth server is using a self-signed certificate.
</p>
</div>
<div class="example"><h3>Example</h3><p><code>
WebAuthWebKdcSSLCertFile conf/webauth/webkdc.cert
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="WebAuthWebKdcURL" id="WebAuthWebKdcURL">WebAuthWebKdcURL</a> <a name="webauthwebkdcurl" id="webauthwebkdcurl">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>
The URL used to contact the WebKDC when posting XML
</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>WebAuthWebKdcURL <em>url</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>(none)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_webauth</td></tr>
</table>
<p>
This is the URL used to post XML requests to the WebKDC, and
should use always SSL.
</p>
<div class="note">
<h3>Note</h3>
<p>This directive must be set.</p>
</div>
<div class="example"><h3>Example</h3><p><code>
WebAuthWebKdcURL https://webkdc.stanford.edu/webkdc-service/
</code></p></div>
</div>
</div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="../en/mod/mod_webauth.html" title="English"> en </a></p>
</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div>
<div id="footer">
<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[//><!--
if (typeof(prettyPrint) !== 'undefined') {
prettyPrint();
}
//--><!]]></script>
</body></html>
|