Configuration file for the openstack-swift proxy server
proxy-server.conf
This is the configuration file used by the proxy server and other proxy middlewares.
The configuration file follows the python-pastedeploy syntax. The file is divided into sections, which are enclosed by square brackets. Each section will contain a certain number of key/value parameters which are described later.
Any line that begins with a '#' symbol is ignored.
You can find more information about python-pastedeploy configuration format at http://pythonpaste.org/deploy/#config-format
This is indicated by section named [DEFAULT]. Below are the parameters that are acceptable within this section.
IP address the proxy server should bind to. The default is 0.0.0.0 which will make it bind to all available addresses.
TCP port the proxy server should bind to. The default is 80.
TCP backlog. Maximum number of allowed pending connections. The default value is 4096.
The number of pre-forked processes that will accept connections. Zero means no fork. The default is auto which will make the server try to match the number of effective cpu cores if python multiprocessing is available (included with most python distributions >= 2.6) or fallback to one. It's worth noting that individual workers will use many eventlet co-routines to service multiple concurrent requests.
Maximum number of clients one worker can process simultaneously (it will actually accept(2) N + 1). Setting this to one (1) will only handle one request at a time, without accepting another request concurrently. The default is 1024.
The system user that the proxy server will run as. The default is swift.
Swift configuration directory. The default is /etc/swift.
Location of the SSL certificate file. The default path is /etc/swift/proxy.crt. This is disabled by default.
Location of the SSL certificate key file. The default path is /etc/swift/proxy.key. This is disabled by default.
Label used when logging. The default is swift.
Syslog log facility. The default is LOG_LOCAL0.
Logging level. The default is INFO.
Logging address. The default is /dev/log.
This optional suffix (default is empty) that would be appended to the swift transaction id allows one to easily figure out from which cluster that X-Trans-Id belongs to. This is very useful when one is managing more than one swift cluster.
This is indicated by section name [pipeline:main]. Below are the parameters that are acceptable within this section.
It is used when you need apply a number of filters. It is a list of filters ended by an application. The normal pipeline is "catch_errors healthcheck cache ratelimit tempauth proxy-logging proxy-server".
Any section that has its name prefixed by "filter:" indicates a filter section. Filters are used to specify configuration parameters for specific swift middlewares. Below are the filters available and respective acceptable parameters.
Entry point for paste.deploy for the healthcheck middleware. This is the reference to the installed python egg. This is normally egg:swift#healthcheck.
An optional filesystem path which, if present, will cause the healthcheck URL to return "503 Service Unavailable" with a body of "DISABLED BY FILE".
Entry point for paste.deploy for the tempauth middleware. This is the reference to the installed python egg. This is normally egg:swift#tempauth.
Label used when logging. The default is tempauth.
Syslog log facility. The default is LOG_LOCAL0.
Logging level. The default is INFO.
Logging address. The default is /dev/log.
Enables the ability to log request headers. The default is False.
The reseller prefix will verify a token begins with this prefix before even attempting to validate it. Also, with authorization, only Swift storage accounts with this prefix will be authorized by this middleware. Useful if multiple auth systems are in use for one Swift cluster. The default is AUTH.
The auth prefix will cause requests beginning with this prefix to be routed to the auth subsystem, for granting tokens, etc. The default is /auth/.
This is the time in seconds before the token expires. The default is 86400.
Lastly, you need to list all the accounts/users you want here. The format is: user_<account>_<user> = <key> [group] [group] [...] [storage_url]
There are special groups of: .reseller_admin who can do anything to any account for this auth and also .admin who can do anything within the account.
If neither of these groups are specified, the user can only access containers that have been explicitly allowed for them by a .admin or .reseller_admin. The trailing optional storage_url allows you to specify an alternate url to hand back to the user upon authentication. If not specified, this defaults to http[s]://<ip>:<port>/v1/<reseller_prefix>_<account> where http or https depends on whether cert_file is specified in the [DEFAULT] section, <ip> and <port> are based on the [DEFAULT] section's bind_ip and bind_port (falling back to 127.0.0.1 and 8080), <reseller_prefix> is from this section, and <account> is from the user_<account>_<user> name.
Here are example entries, required for running the tests:
Caching middleware that manages caching in swift.
Entry point for paste.deploy for the memcache middleware. This is the reference to the installed python egg. This is normally egg:swift#memcache.
Label used when logging. The default is memcache.
Syslog log facility. The default is LOG_LOCAL0.
Logging level. The default is INFO.
Logging address. The default is /dev/log.
Enables the ability to log request headers. The default is False.
If not set in the configuration file, the value for memcache_servers will be read from /etc/swift/memcache.conf (see memcache.conf-sample) or lacking that file, it will default to 127.0.0.1:11211. You can specify multiple servers separated with commas, as in: 10.1.2.3:11211,10.1.2.4:11211.
This sets how memcache values are serialized and deserialized:
To avoid an instant full cache flush, existing installations should upgrade with 0, then set to 1 and reload, then after some time (24 hours) set to 2 and reload. In the future, the ability to use pickle serialization will be removed.
If not set in the configuration file, the value for memcache_serialization_support will be read from /etc/swift/memcache.conf if it exists (see memcache.conf-sample). Otherwise, the default value as indicated above will be used.
Rate limits requests on both an Account and Container level. Limits are configurable.
Entry point for paste.deploy for the ratelimit middleware. This is the reference to the installed python egg. This is normally egg:swift#ratelimit.
Label used when logging. The default is ratelimit.
Syslog log facility. The default is LOG_LOCAL0.
Logging level. The default is INFO.
Logging address. The default is /dev/log.
Enables the ability to log request headers. The default is False.
This should represent how accurate the proxy servers' system clocks are with each other. 1000 means that all the proxies' clock are accurate to each other within 1 millisecond. No ratelimit should be higher than the clock accuracy. The default is 1000.
App will immediately return a 498 response if the necessary sleep time ever exceeds the given max_sleep_time_seconds. The default is 60 seconds.
To allow visibility into rate limiting set this value > 0 and all sleeps greater than the number will be logged. If set to 0 means disabled. The default is 0.
Number of seconds the rate counter can drop and be allowed to catch up (at a faster than listed rate). A larger number will result in larger spikes in rate but better average accuracy. The default is 5.
If set, will limit PUT and DELETE requests to /account_name/container_name. Number is in requests per second. If set to 0 means disabled. The default is 0.
Comma separated lists of account names that will not be rate limited. The default is ''.
Comma separated lists of account names that will not be allowed. Returns a 497 response. The default is ''.
When set with container_limit_x = r: for containers of size x, limit requests per second to r. Will limit PUT, DELETE, and POST requests to /a/c/o. The default is ''.
Middleware that translates container and account parts of a domain to path parameters that the proxy server understands. The container.account.storageurl/object gets translated to container.account.storageurl/path_root/account/container/object and account.storageurl/path_root/container/object gets translated to account.storageurl/path_root/account/container/object
Entry point for paste.deploy for the domain_remap middleware. This is the reference to the installed python egg. This is normally egg:swift#domain_remap.
Label used when logging. The default is domain_remap.
Logging address. The default is /dev/log.
Enables the ability to log request headers. The default is False.
The domain to be used by the middleware.
The path root value for the storage URL. The default is v1.
Browsers can convert a host header to lowercase, so check that reseller prefix on the account is the correct case. This is done by comparing the items in the reseller_prefixes config option to the found prefix. If they match except for case, the item from reseller_prefixes will be used instead of the found reseller prefix. The reseller_prefixes list is exclusive. If defined, any request with an account prefix not in that list will be ignored by this middleware. Defaults to 'AUTH'.
Entry point for paste.deploy for the catch_errors middleware. This is the reference to the installed python egg. This is normally egg:swift#catch_errors.
Label used when logging. The default is catch_errors.
Syslog log facility. The default is LOG_LOCAL0.
Logging level. The default is INFO.
Logging address. The default is /dev/log.
Enables the ability to log request headers. The default is False.
Note: this middleware requires python-dnspython
Entry point for paste.deploy for the cname_lookup middleware. This is the reference to the installed python egg. This is normally egg:swift#cname_lookup.
Label used when logging. The default is cname_lookup.
Syslog log facility. The default is LOG_LOCAL0.
Logging level. The default is INFO.
Logging address. The default is /dev/log.
Enables the ability to log request headers. The default is False.
The domain to be used by the middleware.
How deep in the CNAME chain to look for something that matches the storage domain. The default is 1.
Note: Put staticweb just after your auth filter(s) in the pipeline
Entry point for paste.deploy for the staticweb middleware. This is the reference to the installed python egg. This is normally egg:swift#staticweb.
Seconds to cache container x-container-meta-web-* header values. The default is 300 seconds.
Label used when logging. The default is staticweb.
Syslog log facility. The default is LOG_LOCAL0.
Logging level. The default is INFO.
Logging address. The default is /dev/log.
Enables the ability to log request headers. The default is False.
Label used when logging. The default is staticweb.
Syslog log facility. The default is LOG_LOCAL0.
Logging level. The default is INFO.
Note: Put tempurl before slo, dlo, and your auth filter(s) in the pipeline
The headers to remove from incoming requests. Simply a whitespace delimited list of header names and names can optionally end with '*' to indicate a prefix match. incoming_allow_headers is a list of exceptions to these removals.
The headers allowed as exceptions to incoming_remove_headers. Simply a whitespace delimited list of header names and names can optionally end with '*' to indicate a prefix match.
The headers to remove from outgoing responses. Simply a whitespace delimited list of header names and names can optionally end with '*' to indicate a prefix match. outgoing_allow_headers is a list of exceptions to these removals.
The headers allowed as exceptions to outgoing_remove_headers. Simply a whitespace delimited list of header names and names can optionally end with '*' to indicate a prefix match.
Note: Put formpost just before your auth filter(s) in the pipeline
Entry point for paste.deploy for the formpost middleware. This is the reference to the installed python egg. This is normally egg:swift#formpost.
Note: Just needs to be placed before the proxy-server in the pipeline.
Entry point for paste.deploy for the name_check middleware. This is the reference to the installed python egg. This is normally egg:swift#name_check.
Characters that will not be allowed in a name.
Maximum number of characters that can be in the name.
Python regular expressions of substrings that will not be allowed in a name.
Logging for the proxy server now lives in this middleware. If the access_* variables are not set, logging directives from [DEFAULT] without "access_" will be used.
Entry point for paste.deploy for the proxy_logging middleware. This is the reference to the installed python egg. This is normally egg:swift#proxy_logging.
Label used when logging. The default is proxy-server.
Syslog log facility. The default is LOG_LOCAL0.
Logging level. The default is INFO.
Default is /dev/log.
If set, access_log_udp_host will override access_log_address. Default is unset.
Default is 514.
You can use log_statsd_* from [DEFAULT], or override them here. Default is localhost.
Default is 8125.
Default is 1.
Default is "" (empty-string)
Default is False.
What HTTP methods are allowed for StatsD logging (comma-sep); request methods not in this list will have "BAD_METHOD" for the <verb> portion of the metric. Default is "GET,HEAD,POST,PUT,DELETE,COPY,OPTIONS".
This is indicated by section name [app:proxy-server]. Below are the parameters that are acceptable within this section.
Entry point for paste.deploy for the proxy server. This is the reference to the installed python egg. This is normally egg:swift#proxy.
Label used when logging. The default is proxy-server.
Syslog log facility. The default is LOG_LOCAL0.
Logging level. The default is INFO.
Logging address. The default is /dev/log.
Log when handoff locations are used. Default is True.
Cache timeout in seconds to send memcached for account existence. The default is 60 seconds.
Cache timeout in seconds to send memcached for container existence. The default is 60 seconds.
Chunk size to read from object servers. The default is 8192.
Chunk size to read from clients. The default is 8192.
Request timeout to external services. The default is 10 seconds.
Timeout to read one chunk from a client. The default is 60 seconds.
Connection timeout to external services. The default is 0.5 seconds.
Time in seconds that must elapse since the last error for a node to be considered no longer error limited. The default is 60 seconds.
Error count to consider a node error limited. The default is 10.
Whether account PUTs and DELETEs are even callable. If set to 'true' any authorized user may create and delete accounts; if 'false' no one, even authorized, can. The default is false.
Set object_post_as_copy = false to turn on fast posts where only the metadata changes are stored as new and the original data file is kept in place. This makes for quicker posts; but since the container metadata isn't updated in this mode, features like container sync won't be able to sync posts. The default is True.
If set to 'true' authorized accounts that do not yet exist within the Swift cluster will be automatically created. The default is set to false.
Start rate-limiting object segments after the Nth segment of a segmented object. The default is 10 segments.
Once segment rate-limiting kicks in for an object, limit segments served to N per second. The default is 1.
More in depth documentation about the swift-proxy-server and also Openstack-Swift as a whole can be found at http://swift.openstack.org/admin_guide.html and http://swift.openstack.org