2008-05-07 08:33:00 -05:00
|
|
|
#
|
2013-08-29 08:19:02 -05:00
|
|
|
# VERSION 14 - DO NOT REMOVE THIS LINE
|
2012-06-06 21:54:16 -05:00
|
|
|
#
|
|
|
|
# This file may be overwritten on upgrades.
|
2008-05-07 08:33:00 -05:00
|
|
|
#
|
0000-12-31 18:09:24 -05:50
|
|
|
# LoadModule auth_kerb_module modules/mod_auth_kerb.so
|
|
|
|
|
2007-09-25 07:37:45 -05:00
|
|
|
ProxyRequests Off
|
0000-12-31 18:09:24 -05:50
|
|
|
|
2010-08-03 18:42:03 -05:00
|
|
|
|
|
|
|
#We use xhtml, a file format that the browser validates
|
2010-11-18 20:17:14 -06:00
|
|
|
DirectoryIndex index.html
|
2010-08-03 18:42:03 -05:00
|
|
|
|
|
|
|
|
2012-06-14 10:15:30 -05:00
|
|
|
# Substantially increase the request field size to support MS-PAC
|
|
|
|
# requests, ticket #2767. This should easily support a 64KiB PAC.
|
|
|
|
LimitRequestFieldSize 100000
|
2010-08-03 18:42:03 -05:00
|
|
|
|
2008-02-21 15:25:09 -06:00
|
|
|
# ipa-rewrite.conf is loaded separately
|
2007-10-19 09:14:30 -05:00
|
|
|
|
2007-12-12 08:36:32 -06:00
|
|
|
# This is required so the auto-configuration works with Firefox 2+
|
|
|
|
AddType application/java-archive jar
|
2012-10-09 03:17:16 -05:00
|
|
|
AddType application/x-xpinstall xpi
|
2007-12-12 08:36:32 -06:00
|
|
|
|
2012-12-04 06:24:58 -06:00
|
|
|
# Proper header for .woff fonts
|
|
|
|
AddType application/x-font-woff woff
|
|
|
|
|
|
|
|
# Enable compression
|
|
|
|
AddOutputFilterByType DEFLATE text/html text/plain text/xml \
|
|
|
|
application/javascript application/json text/css
|
|
|
|
|
|
|
|
# Disable etag http header. Doesn't work well with mod_deflate
|
|
|
|
# https://issues.apache.org/bugzilla/show_bug.cgi?id=45023
|
|
|
|
# Usage of last-modified header and modified-since validator is sufficient.
|
|
|
|
Header unset ETag
|
|
|
|
FileETag None
|
2009-08-24 12:42:48 -05:00
|
|
|
|
2010-02-24 12:29:23 -06:00
|
|
|
# FIXME: WSGISocketPrefix is a server-scope directive. The mod_wsgi package
|
|
|
|
# should really be fixed by adding this its /etc/httpd/conf.d/wsgi.conf:
|
2013-03-20 10:40:53 -05:00
|
|
|
WSGISocketPrefix /run/httpd/wsgi
|
2009-10-26 06:16:18 -05:00
|
|
|
|
2007-09-10 15:33:01 -05:00
|
|
|
|
2010-02-24 12:29:23 -06:00
|
|
|
# Configure mod_wsgi handler for /ipa
|
|
|
|
WSGIDaemonProcess ipa processes=2 threads=1 maximum-requests=500
|
|
|
|
WSGIProcessGroup ipa
|
|
|
|
WSGIApplicationGroup ipa
|
|
|
|
WSGIImportScript /usr/share/ipa/wsgi.py process-group=ipa application-group=ipa
|
|
|
|
WSGIScriptAlias /ipa /usr/share/ipa/wsgi.py
|
|
|
|
WSGIScriptReloading Off
|
2009-11-02 15:16:27 -06:00
|
|
|
|
2009-10-26 06:16:18 -05:00
|
|
|
|
2010-02-24 12:29:23 -06:00
|
|
|
# Turn off mod_msgi handler for errors, config, crl:
|
2010-02-23 11:53:47 -06:00
|
|
|
<Location "/ipa/errors">
|
|
|
|
SetHandler None
|
|
|
|
</Location>
|
|
|
|
<Location "/ipa/config">
|
|
|
|
SetHandler None
|
|
|
|
</Location>
|
|
|
|
<Location "/ipa/crl">
|
|
|
|
SetHandler None
|
|
|
|
</Location>
|
|
|
|
|
2012-01-10 21:39:26 -06:00
|
|
|
KrbConstrainedDelegationLock ipa
|
2010-02-23 11:53:47 -06:00
|
|
|
|
2012-02-15 09:26:42 -06:00
|
|
|
# Protect /ipa and everything below it in webspace with Apache Kerberos auth
|
|
|
|
<Location "/ipa">
|
add session manager and cache krb auth
This patch adds a session manager and support for caching
authentication in the session. Major elements of the patch are:
* Add a session manager to support cookie based sessions which
stores session data in a memcached entry.
* Add ipalib/krb_utils.py which contains functions to parse ccache
names, format principals, format KRB timestamps, and a KRB_CCache
class which reads ccache entry and allows one to extract information
such as the principal, credentials, credential timestamps, etc.
* Move krb constants defined in ipalib/rpc.py to ipa_krb_utils.py so
that all kerberos items are co-located.
* Modify javascript in ipa.js so that the IPA.command() RPC call
checks for authentication needed error response and if it receives
it sends a GET request to /ipa/login URL to refresh credentials.
* Add session_auth_duration config item to constants.py, used to
configure how long a session remains valid.
* Add parse_time_duration utility to ipalib/util.py. Used to parse the
session_auth_duration config item.
* Update the default.conf.5 man page to document session_auth_duration
config item (also added documentation for log_manager config items
which had been inadvertantly omitted from a previous commit).
* Add SessionError object to ipalib/errors.py
* Move Kerberos protection in Apache config from /ipa to /ipa/xml and
/ipa/login
* Add SessionCCache class to session.py to manage temporary Kerberos
ccache file in effect for the duration of an RPC command.
* Adds a krblogin plugin used to implement the /ipa/login
handler. login handler sets the session expiration time, currently
60 minutes or the expiration of the TGT, whichever is shorter. It
also copies the ccache provied by mod_auth_kerb into the session
data. The json handler will later extract and validate the ccache
belonging to the session.
* Refactored the WSGI handlers so that json and xlmrpc could have
independent behavior, this also moves where create and destroy
context occurs, now done in the individual handler rather than the
parent class.
* The json handler now looks up the session data, validates the ccache
bound to the session, if it's expired replies with authenicated
needed error.
* Add documentation to session.py. Fully documents the entire process,
got questions, read the doc.
* Add exclusions to make-lint as needed.
2012-02-06 12:29:56 -06:00
|
|
|
AuthType Kerberos
|
|
|
|
AuthName "Kerberos Login"
|
|
|
|
KrbMethodNegotiate on
|
|
|
|
KrbMethodK5Passwd off
|
|
|
|
KrbServiceName HTTP
|
|
|
|
KrbAuthRealms $REALM
|
|
|
|
Krb5KeyTab /etc/httpd/conf/ipa.keytab
|
|
|
|
KrbSaveCredentials on
|
|
|
|
KrbConstrainedDelegation on
|
|
|
|
Require valid-user
|
|
|
|
ErrorDocument 401 /ipa/errors/unauthorized.html
|
|
|
|
</Location>
|
|
|
|
|
2012-02-15 09:26:42 -06:00
|
|
|
# Turn off Apache authentication for sessions
|
2012-02-25 12:39:19 -06:00
|
|
|
<Location "/ipa/session/json">
|
|
|
|
Satisfy Any
|
|
|
|
Order Deny,Allow
|
|
|
|
Allow from all
|
|
|
|
</Location>
|
|
|
|
|
2012-06-06 21:54:16 -05:00
|
|
|
<Location "/ipa/session/xml">
|
|
|
|
Satisfy Any
|
|
|
|
Order Deny,Allow
|
|
|
|
Allow from all
|
|
|
|
</Location>
|
|
|
|
|
2012-02-25 12:39:19 -06:00
|
|
|
<Location "/ipa/session/login_password">
|
2012-02-15 09:26:42 -06:00
|
|
|
Satisfy Any
|
|
|
|
Order Deny,Allow
|
|
|
|
Allow from all
|
2010-02-24 12:29:23 -06:00
|
|
|
</Location>
|
|
|
|
|
2012-06-06 07:38:08 -05:00
|
|
|
<Location "/ipa/session/change_password">
|
|
|
|
Satisfy Any
|
|
|
|
Order Deny,Allow
|
|
|
|
Allow from all
|
|
|
|
</Location>
|
|
|
|
|
2010-02-23 11:53:47 -06:00
|
|
|
# This is where we redirect on failed auth
|
|
|
|
Alias /ipa/errors "/usr/share/ipa/html"
|
|
|
|
|
|
|
|
# For the MIT Windows config files
|
|
|
|
Alias /ipa/config "/usr/share/ipa/html"
|
|
|
|
|
2007-09-25 07:37:45 -05:00
|
|
|
# Do no authentication on the directory that contains error messages
|
2007-09-24 14:20:34 -05:00
|
|
|
<Directory "/usr/share/ipa/html">
|
2010-02-23 11:53:47 -06:00
|
|
|
SetHandler None
|
2007-09-24 14:20:34 -05:00
|
|
|
AllowOverride None
|
|
|
|
Satisfy Any
|
|
|
|
Allow from all
|
2013-08-29 08:19:02 -05:00
|
|
|
ExpiresActive On
|
|
|
|
ExpiresDefault "access plus 0 seconds"
|
2007-09-24 14:20:34 -05:00
|
|
|
</Directory>
|
2007-09-25 07:37:45 -05:00
|
|
|
|
2010-02-23 11:53:47 -06:00
|
|
|
|
|
|
|
# For CRL publishing
|
2012-08-23 11:38:45 -05:00
|
|
|
Alias /ipa/crl "$CRL_PUBLISH_PATH"
|
|
|
|
<Directory "$CRL_PUBLISH_PATH">
|
2010-02-23 11:53:47 -06:00
|
|
|
SetHandler None
|
2009-08-24 12:42:48 -05:00
|
|
|
AllowOverride None
|
|
|
|
Options Indexes FollowSymLinks
|
|
|
|
Satisfy Any
|
|
|
|
Allow from all
|
|
|
|
</Directory>
|
|
|
|
|
2010-02-24 12:29:23 -06:00
|
|
|
|
2010-08-06 14:43:27 -05:00
|
|
|
# webUI is now completely static, and served out of that directory
|
2011-01-19 11:26:14 -06:00
|
|
|
Alias /ipa/ui "/usr/share/ipa/ui"
|
|
|
|
<Directory "/usr/share/ipa/ui">
|
2010-08-03 18:42:03 -05:00
|
|
|
SetHandler None
|
|
|
|
AllowOverride None
|
2010-11-05 18:48:42 -05:00
|
|
|
Satisfy Any
|
2010-08-03 18:42:03 -05:00
|
|
|
Allow from all
|
2013-08-29 08:19:02 -05:00
|
|
|
ExpiresActive On
|
|
|
|
ExpiresDefault "access plus 1 year"
|
|
|
|
<FilesMatch "(index.html|loader.js|login.html|reset_password.html)">
|
|
|
|
ExpiresDefault "access plus 0 seconds"
|
|
|
|
</FilesMatch>
|
2010-08-03 18:42:03 -05:00
|
|
|
</Directory>
|
|
|
|
|
2013-04-23 12:54:21 -05:00
|
|
|
# Simple wsgi scripts required by ui
|
|
|
|
Alias /ipa/wsgi "/usr/share/ipa/wsgi"
|
|
|
|
<Directory "/usr/share/ipa/wsgi">
|
|
|
|
AllowOverride None
|
|
|
|
Satisfy Any
|
|
|
|
Allow from all
|
|
|
|
Options ExecCGI
|
|
|
|
AddHandler wsgi-script .py
|
|
|
|
</Directory>
|
2010-02-24 12:29:23 -06:00
|
|
|
|
2007-09-25 07:37:45 -05:00
|
|
|
# Protect our CGIs
|
|
|
|
<Directory /var/www/cgi-bin>
|
|
|
|
AuthType Kerberos
|
|
|
|
AuthName "Kerberos Login"
|
|
|
|
KrbMethodNegotiate on
|
|
|
|
KrbMethodK5Passwd off
|
|
|
|
KrbServiceName HTTP
|
|
|
|
KrbAuthRealms $REALM
|
|
|
|
Krb5KeyTab /etc/httpd/conf/ipa.keytab
|
|
|
|
KrbSaveCredentials on
|
|
|
|
Require valid-user
|
2008-05-07 08:33:00 -05:00
|
|
|
ErrorDocument 401 /ipa/errors/unauthorized.html
|
2007-09-25 07:37:45 -05:00
|
|
|
</Directory>
|
|
|
|
|
2010-02-24 12:29:23 -06:00
|
|
|
|
2010-01-12 09:40:09 -06:00
|
|
|
# migration related pages
|
|
|
|
Alias /ipa/migration "/usr/share/ipa/migration"
|
|
|
|
<Directory "/usr/share/ipa/migration">
|
|
|
|
AllowOverride None
|
|
|
|
Satisfy Any
|
|
|
|
Allow from all
|
2010-10-29 08:38:17 -05:00
|
|
|
Options ExecCGI
|
|
|
|
AddHandler wsgi-script .py
|
2010-01-12 09:40:09 -06:00
|
|
|
</Directory>
|