9b47de3095e5afacf70106c1e3a3f265d64c7822
222 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
Romain LE DISEZ
|
9b47de3095 |
Enable cluster-wide CORS Expose-Headers setting
An operator proposing a web UX to its customers might want to allow web browser to access some headers by default (eg: X-Storage-Policy, X-Container-Read, ...). This commit adds a new setting to the proxy-server to allow some headers to be added cluster-wide to the CORS header Access-Control-Expose-Headers. Change-Id: I5ca90a052f27c98a514a96ee2299bfa1b6d46334 |
||
|
Tim Burke
|
4ee20dba48 |
Default object_post_as_copy to False
Additionally, emit deprecation warnings when running POST-as-COPY Change-Id: I11324e711057f7332577fd38f9bff82bdc6aac90 |
||
|
Tim Burke
|
f850ff065e |
SLO: Concurrently HEAD segments
Before creating a static large object, we must verify that all of the referenced segments exist. Previously, this was done sequentially; due to latency between proxy and object nodes, clients must be careful to either keep their segment count low or use very long (minute+) timeouts. We mitigate this somewhat by enforcing a hard limit on segment count, but even then, HEADing a thousand segments (the default limit) with an average latency of (say) 100ms will require more than a minute and a half. Further, the nested-SLO approach requires multiple requests from the client -- as a result, Swift3 is in the position of enforcing a lower limit than S3's 10,000 (which will break some clients) or requiring that clients have timeouts on the order of 15-20 minutes (!). Now, we'll perform the segment HEADs in parallel, with a concurrency factor set by the operator. This is very similar to (and builds upon) the parallel-bulk-delete work. By default, two HEAD requests will be allowed at a time. As a side-effect, we'll also only ever HEAD a path once per manifest. Previously, if a manifest alternated between two paths repeatedly (for instance, because the user wanted to splice together various ranges from two sub-SLOs), then each entry in the manifest would trigger a fresh HEAD request. Upgrade Consideration ===================== If operators would like to preserve the prior (single-threaded) SLO creation behavior, they must add the following line to their [filter:slo] proxy config section: concurrency = 1 This may be done prior to upgrading Swift. UpgradeImpact Closes-Bug: #1637133 Related-Change: I128374d74a4cef7a479b221fd15eec785cc4694a Change-Id: I567949567ecdbd94fa06d1dd5d3cdab0d97207b6 |
||
|
Pete Zaitcev
|
f62df7b80c |
Add a configurable URL base to staticweb
This came to light because someone ran Tempest against a standard installation of RDO, which helpfuly terminates SSL for Swift in a pre-configured load-balancer. In such a case, staticweb has no way to know what scheme to use and guesses wrong, causing Tempest to fail. Related upstream bug: https://bugs.launchpad.net/mos/+bug/1537071 Change-Id: Ie15cf2aff4f7e6bcf68b67ae733c77bb9353587a Closes-Bug: 1572011 |
||
|
Jenkins
|
23c2d69ee1 | Merge "Add more comment to authtoken sample options" | ||
|
gecong1973
|
a09e42732a |
Fix a typo in proxy-server.conf-sample
TrivialFix Change-Id: If650e25979a9488c93fe93621c905003946c27e5 |
||
|
Alistair Coles
|
18bb99971f |
Add more comment to authtoken sample options
Prior to the Mitaka release the install guides showed services (including Swift) being in a default Keystone domain which existed by default and has id=default. This domain id is reflected in the proxy-server.conf-sample authtoken options and also shown in man page and auth docs. The Mitaka install guide shows a domain with *name* default being created, and having a random UUID assigned, in which services are created. This has caused confusion (see discussion on linked bug report). This patch does not change the sample options but does add to the comments in order to emphasize that a user may need to alter the options to match their Keystone configuration. Change-Id: I17bfcdbd983402eeb561bb704b8b1f1e27547c7d Partial-Bug: #1604674 |
||
|
Peter Lisák
|
ed772236c7 |
Change schedule priority of daemon/server in config
The goal is to modify schedule priority and I/O scheduling class and priority of daemon/server via configuration. Setting is optional, default keeps current behaviour. Use case: Prioritize object-server to object-auditor, because all user's requests needed to be served in peak hours and audit could wait. Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com> DocImpact Change-Id: I1018a18f4706daabdb84574ffd9a58d831e68396 |
||
|
Tim Burke
|
6740a7badd |
Add keymaster_config_path option to keymaster
Also, tighten up the format checks on root secrets. Change-Id: I1cd9a97c4e8d87d7c065866e7ad3a9e748ff19ab |
||
|
Alistair Coles
|
f36bc513c5 |
Add encryption overview doc
Include a note in container-sync docs pointing to specific configuration needed to be compatible with encryption. Also remove the sample encryption root secret from proxy-server.conf-sample and in-process test setup. Remove encryption middleware from the default proxy pipeline. Change-Id: Ibceac485813f3ac819a53e644995749735592a55 |
||
|
Janie Richling
|
96a0e07753 |
Enable object body and metadata encryption
Adds encryption middlewares. All object servers and proxy servers should be upgraded before introducing encryption middleware. Encryption middleware should be first introduced with the encryption middleware disable_encryption option set to True. Once all proxies have encryption middleware installed this option may be set to False (the default). Increases constraints.py:MAX_HEADER_COUNT by 4 to allow for headers generated by encryption-related middleware. Co-Authored-By: Tim Burke <tim.burke@gmail.com> Co-Authored-By: Christian Cachin <cca@zurich.ibm.com> Co-Authored-By: Mahati Chamarthy <mahati.chamarthy@gmail.com> Co-Authored-By: Peter Chng <pchng@ca.ibm.com> Co-Authored-By: Alistair Coles <alistair.coles@hpe.com> Co-Authored-By: Jonathan Hinson <jlhinson@us.ibm.com> Co-Authored-By: Hamdi Roumani <roumani@ca.ibm.com> UpgradeImpact Change-Id: Ie6db22697ceb1021baaa6bddcf8e41ae3acb5376 |
||
|
Tim Burke
|
e09c4ee780 |
Allow concurrent bulk deletes
Before, server-side deletes of static large objects could take a long time to complete since the proxy would wait for a response to each segment DELETE before starting the next DELETE request. Now, operators can configure a concurrency factor for the slo and bulk middlewares to allow up to N concurrent DELETE requests. By default, two DELETE requests will be allowed at a time. Note that objects and containers are now deleted in separate passes, to reduce the likelihood of 409 Conflict responses when deleting containers. Upgrade Consideration ===================== If operators have enabled the bulk or slo middlewares and would like to preserve the prior (single-threaded) DELETE behavior, they must add the following line to their [filter:slo] and [filter:bulk] proxy config sections: delete_concurrency = 1 This may be done prior to upgrading Swift. UpgradeImpact Closes-Bug: 1524454 Change-Id: I128374d74a4cef7a479b221fd15eec785cc4694a |
||
|
Prashanth Pai
|
46d61a4dcd |
Refactor server side copy as middleware
Rewrite server side copy and 'object post as copy' feature as middleware to simplify the PUT method in the object controller code. COPY is no longer a verb implemented as public method in Proxy application. The server side copy middleware is inserted to the left of dlo, slo and versioned_writes middlewares in the proxy server pipeline. As a result, dlo and slo copy_hooks are no longer required. SLO manifests are now validated when copied so when copying a manifest to another account the referenced segments must be readable in that account for the manifest copy to succeed (previously this validation was not made, meaning the manifest was copied but could be unusable if the segments were not readable). With this change, there should be no change in functionality or existing behavior. This is asserted with (almost) no changes required to existing functional tests. Some notes (for operators): * Middleware required to be auto-inserted before slo and dlo and versioned_writes * Turning off server side copy is not configurable. * object_post_as_copy is no longer a configurable option of proxy server but of this middleware. However, for smooth upgrade, config option set in proxy server app is also read. DocImpact: Introducing server side copy as middleware Co-Authored-By: Alistair Coles <alistair.coles@hpe.com> Co-Authored-By: Thiago da Silva <thiago@redhat.com> Change-Id: Ic96a92e938589a2f6add35a40741fd062f1c29eb Signed-off-by: Prashanth Pai <ppai@redhat.com> Signed-off-by: Thiago da Silva <thiago@redhat.com> |
||
|
Jenkins
|
32847d2f48 | Merge "Docs: Container sync does not require POST-as-COPY" | ||
|
Alistair Coles
|
736de613f1 |
Docs: Container sync does not require POST-as-COPY
Updates docs to remove warnings that container sync only
works with object_post_as_copy=True. Since commit
|
||
|
Jenkins
|
4eb57e971d | Merge "Add concurrent reads option to proxy" | ||
|
Jenkins
|
7cc2c783a4 | Merge "Keystone middleware deprecated option is_admin removed" | ||
|
Matthew Oliver
|
f595a7e704 |
Add concurrent reads option to proxy
This change adds 2 new parameters to enable and control concurrent GETs in swift, these are 'concurrent_gets' and 'concurrency_timeout'. 'concurrent_gets' allows you to turn on or off concurrent GETs, when on it will set the GET/HEAD concurrency to replica count. And in the case of EC HEADs it will set it to ndata. The proxy will then serve only the first valid source to respond. This applies to all account, container and object GETs except for EC. For EC only HEAD requests are effected. It achieves this by changing the request sending mechanism to using GreenAsyncPile and green threads with a time out between each request. 'concurrency_timeout' is related to concurrent_gets. And is the amount of time to wait before firing the next thread. A value of 0 will fire at the same time (fully concurrent), setting another value will stagger the firing allowing you the ability to give a node a shorter chance to respond before firing the next. This value is a float and should be somewhere between 0 and node_timeout. The default is conn_timeout. Meaning by default it will stagger the firing. DocImpact Implements: blueprint concurrent-reads Change-Id: I789d39472ec48b22415ff9d9821b1eefab7da867 |
||
|
Tim Burke
|
f581fccf71 |
By default, disallow inbound X-Timestamp headers
With the X-Timestamp validation added in commit
|
||
|
Jenkins
|
f57b4c94bf | Merge "Update parameters about authtoken middleware in proxy-server.conf.sample" | ||
|
Takashi Kajinami
|
9dda1c9526 |
Update parameters about authtoken middleware in proxy-server.conf.sample
This patch replaces some configration parameters about authtoken middleware in proxy-server.conf, which will be deprecated. The following parameters are to be deprecated. auth_admin_prefix, auth_host, auth_port, auth_protocol, identity_uri, admin_token, admin_user, admin_password, admin_tenant_name Change-Id: I373734933189c87c4094203b0752dd3762689034 |
||
|
Jenkins
|
02fb983dc6 | Merge "Removed unused parameter in server.py" | ||
|
Ondřej Nový
|
335d58611d |
Keystone middleware deprecated option is_admin removed
It has been deprecated from Swift 1.8.0 (Grizzly) Change-Id: Id6bc10c3e84262c0a9e6160a76af03c0ad363e9c |
||
|
root
|
bcada66b90 |
Removed unused parameter in server.py
The variable max_large_object_get_time is no longer used and was removed to reflect the change. Change-Id: I43051181dcb38245de6d13fab63876e83f46fc39 Closes-Bug: #1538834 |
||
|
gh159m
|
b5311f63db |
Removed default value for log_statsd_host
Multiple files and documents showed that log_statsd_host had a default value, usually localhost. This was incorrect, instead setting a value for log_statsd_host enables statsd logging. Removed any reference of log_statsd_host having a default value. Also changed descriptions to show setting a value enables logging. Change-Id: I3ca5c0e8b8e4981de3aa6db0c476072b5a59723d Closes-Bug: #1542227 |
||
|
Jenkins
|
222649de45 | Merge "Allow smaller segments in static large objects" | ||
|
Clay Gerrard
|
3347646023 |
fixups for ipv6 memcache_servers docs
Change-Id: I20d91c1e276014eaf210fa9eb43788bc17f4e8df |
||
|
Jenkins
|
500f7e8d34 | Merge "Unification of manpages and conf-samples (default values, etc)" | ||
|
Samuel Merritt
|
7f636a5572 |
Allow smaller segments in static large objects
The addition of range support for SLO segments (commit
|
||
|
John Dickinson
|
5eaa5543c7 |
add sample proxy pipeline for keystone integration
Change-Id: I4b4fd9179d0234f001940e215c97d40a2a6204cd |
||
|
Peter Lisák
|
28c4b7310f |
Unification of manpages and conf-samples (default values, etc)
Change-Id: I47a3127ef698b4bd1537b1562901ee9c2b5924d4 |
||
|
Thiago da Silva
|
035a411660 |
versioned writes middleware
Rewrite object versioning as middleware to simplify the PUT method in the object controller. The functionality remains basically the same with the only major difference being the ability to now version slo manifest files. dlo manifests are still not supported as part of this patch. Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com> DocImpact Change-Id: Ie899290b3312e201979eafefb253d1a60b65b837 Signed-off-by: Thiago da Silva <thiago@redhat.com> Signed-off-by: Prashanth Pai <ppai@redhat.com> |
||
|
Koert van der Veer
|
11e5c4adf0 |
Allow default reseller prefix in domain_remap middleware
Previously, the reseller prefix needed to be provided in the host name even when the domain was unique to that reseller. With the default_reseller_prefix, any domain which matches in this middleware, will will be passed on with a reseller prefix, whether or not it was provided. Change-Id: I5aa5ce78ad1ee2e3660cce4c3e07306f8999f02a Implements: blueprint domainremap-reseller-domains |
||
|
Clay Gerrard
|
4aba2fbb25 |
Check if REST API version is valid
Swift doesn't check if the used API version is valid. Currently there is only one valid REST API version, but that might change in the future. This patch enforces "v1" or "v1.0" as the version string when accessing account, containers and objects. The list of accepted version strings can be manually overridden using a comma-separated list in swift.conf to make this backward-compatible. The constraint loader has been modified slightly to accept strings as well as integers. Any request to an account, container, and object which does not provide the correct version string will get a 400 BadRequest response. The allowed api versions are by default excluded from /info. Co-Authored-By: Christian Schwede <christian.schwede@enovance.com> Co-Authored-By: John Dickinson <me@not.mn> Closes Bug #1437442 Change-Id: I5ab6e236544378abf2eab562ab759513d09bc256 |
||
|
Jenkins
|
d6467d3385 | Merge "Add multiple reseller prefixes and composite tokens" | ||
|
Donagh McCabe
|
89397c5b67 |
Add multiple reseller prefixes and composite tokens
This change is in support of Composite Tokens and Service Accounts (see http://specs.openstack.org/openstack/swift-specs/specs/in_progress/ service_token.html) During coding, minor changes were made compared to the original specification. See https://review.openstack.org/138771 for these changes. DocImpact Change-Id: I6072b4efb3a479a8e0cc2d9c11ffda5764b55e30 |
||
|
Richard Hawkins
|
489dd5ff5d |
Add support for container TempURL Keys
Change-Id: Ic22b0b84b657e6cac7e0062fa410eefb09bc0f4d Co-Authored-By: Christian Schwede <christian.schwede@enovance.com> |
||
|
John Dickinson
|
b45b83fb00 |
Correct the config default for delay_auth_decision
Updated proxy-server.conf-sample with the correct default. Also updated the note on the overview-auth doc page. Change-Id: I5cd62a7a118a28f7b58f47b8d8d4d963f6bc7347 |
||
|
Jenkins
|
9621c861c4 | Merge "Make more memcache options configurable" | ||
|
Bob Ball
|
cec00660cb |
Remove deprecated config variables
I1f8f5064ea8028af60f167df9b97e215cdadba44 deprecated auth_host etc but the default config still used them. Ieac26806bd420aa08fc79bbc6a11eb6a1c15c7df then switched devstack to using the new variables, but if the old variables still existed in the default config, some installations were broken (e.g. XenServer CI) Partial-bug: 1415795 Change-Id: I7076fa03ab531cbb1114918f75113620b65590dc |
||
|
Clay Gerrard
|
2012339982 |
Make more memcache options configurable
More memcache options can be set in the memcache.conf or proxy-server.conf * connect_timeout * pool_timeout * tries * io_timeout Options set in proxy-server.conf are considered more specific to the memcache middleware. DocImpact Change-Id: I194d0f4d88c6cb8c797a37dcab48f2d8473e7a4e |
||
|
Jenkins
|
0e660fade3 | Merge "Change black/white-listing to use sysmeta." | ||
|
David Goetz
|
172a9b369f |
Change black/white-listing to use sysmeta.
The way we do this now involves a conf change and a proxy reload which is a pain. You can now just set these: X-Account-Sysmeta-Global-Write-Ratelimit: WHITELIST or X-Account-Sysmeta-Global-Write-Ratelimit: BLACKLIST NOTE: The existing proxy config settings: account_whitelist and account_blacklist will continue to work. Change-Id: I532663f1d2c75d03170c5fdb9b330416822fbc88 |
||
|
Alistair Coles
|
fd8eb6b280 |
Add undocumented options to keystoneauth sample config
Adds is_admin and allow_overrides to the keystoneauth section of proxy-server.conf.sample and also adds related comments to the keystoneauth docstring. DocImpact Change-Id: I7c751880cb6742db7347f31c4d32b523e33da75b |
||
|
Alistair Coles
|
c9f8246378 |
Make in process functional tests use sample proxy-server.conf
This patch was first motivated by noticing that the proxy server pipeline used for in process functional tests was out of date with respect to the pipeline in /etc/proxy-server.conf.sample. Rather than cut and paste the current pipeline into the in process setup, it seems like a better idea would be to have the in process tests always use the sample config. A further benefit is that in process functional tests will pick up changes to the sample config introduced by patches - previously test/functional/__init__.py would need to be manually modified to run in process functional tests on new middleware for example. Note: because the pipeline is now loaded using entry points, 'python setup.py [develop|install]' will now be needed before running the tests. Obvious next steps would be to do the same for the backend servers, and to allow alternative config files and dir's to be specified, but this patch is the first step. Also drive-by fixes some typos in proxy-server.conf.sample Change-Id: If442bd7c2b1721ec92839c4490924ba33e1545d8 |
||
|
Clay Gerrard
|
f9bed74d1b |
Return 403 on unauthorized upload when over account quota
If you try an unauthorized upload into a container that is over quota you get a 403 instead of a 413, but if you try to unauthorized upload when an *account* is over quota you can see the 413 even though the upload would have been rejected by the authorize callback. By wrapping the authorize callback associated with the incoming request we can make sure to only return our 413 when the request would have been authorized otherwise. Drive by doc fixes thanks to acoles: * State that container_quotas should be after auth middleware in the class doc string. * Add note to proxy-server.conf.sample that account_quotas should be after auth middleware. The equivalent statements are already in place for each quota middleware. Doc-Impact Closes-Bug: #1387415 Change-Id: I2a88b3ec79d35bfdd73ea6ad64e376b7c7af4ea6 |
||
|
Jenkins
|
034fae630c | Merge "Restrict keystone cross-tenant ACLs to IDs" | ||
|
John Dickinson
|
b7281cf2c5 |
make the bind_port config setting required
In a long-term effort to change the recommended ports for Swift, the first step is to require the bind_port in config files. Later, we can change the recommended setting. Anyone currently explicitly setting the ports will not be affected. Anyone not setting the ports will need to specify them to match their rings. DocImpact Change-Id: Icca83a263acdd0afc9016424a3e9f8c15e944789 |
||
|
anc
|
a4f634bd89 |
Restrict keystone cross-tenant ACLs to IDs
The keystoneauth middleware supports cross-tenant access control using the syntax <tenant>:<user> in container ACLs, where <tenant> and <user> may currently be either a unique id or a name. As a result of the keystone v3 API introducing domains, names are no longer globally unique and are only unique within a domain. The use of unqualified tenant and user names in this ACL syntax is therefore not 'safe' in a keystone v3 environment. This patch modifies keystoneauth to restrict cross-tenant ACL matching to use only ids for accounts that are not in the default domain. For backwards compatibility, names will still be matched in ACLs when both the requesting user and tenant are known to be in the default domain AND the account's tenant is also in the default domain (the default domain being the domain to which existing tenants are migrated). Accounts existing prior to this patch are assumed to be for tenants in the default domain. New accounts created using a v2 token scoped on the tenant are also assumed to be in the default domain. New accounts created using a v3 token scoped on the tenant will learn their domain membership from the token info. New accounts created using any unscoped token, (i.e. with a reselleradmin role) will have unknown domain membership and therefore be assumed to NOT be in the default domain. Despite this provision for backwards compatibility, names must no longer be used when setting new ACLs in any account, including new accounts in the default domain. This change obviously impacts users accustomed to specifying cross-tenant ACLs in terms of names, and further work will be necessary to restore those use cases. Some ideas are discussed under the bug report. With that caveat, this patch removes the reported vulnerability when using swift/keystoneauth with a keystone v3 API. Note: to observe the new 'restricted' behaviour you will need to setup keystone user(s) and tenant(s) in a non-default domain and set auth_version = v3.0 in the auth_token middleware config section of proxy-server.conf. You may also benefit from the keystone v3 enabled swiftclient patch under review here: https://review.openstack.org/#/c/91788/ DocImpact blueprint keystone-v3-support Closes-Bug: #1299146 Change-Id: Ib32df093f7450f704127da77ff06b595f57615cb |
||
|
Samuel Merritt
|
134e864fa1 |
Add POST and DELETE to tempurl default methods
The tempurl middleware supports any configured HTTP methods, but the default set was only GET, PUT, and HEAD, so cluster operators had to take action to enable POST and DELETE. This commit changes the defaults to include POST and DELETE. Note that this doesn't affect any existing temporary URLs at all; the method is baked into the signature (temp_url_sig query param), so no new access is granted to a holder of a temporary URL by this change. It simply gives more flexibility to creators of temporary URLs. Change-Id: I5bc15bbd2968ab7bedcd7c0df10f2ec825537191 |