tripleo-common/tripleo_common
Alex Schultz d3af314147 Handle redirects for blobs better
This patch adds a new function that checks if a response was a redirect
for an a request and removes the Authorization header that we usually
send if it is not one of our trusted hosts. This prevents authorization
keys from going to insecure places. This is similar logic that exists in
the moby registry code[0].

Additionally improves the cachability of blobs from docker.io because
they are redirects to files that exist on a CDN that doesn't actually
require authentication. The upstream CI registry caching system doesn't
cache any requests with the Authorization header per the apache cache
documentation[1].

[0] a072d726c7/registry/registry.go (L140-L174)
[1] https://httpd.apache.org/docs/2.4/caching.html

Change-Id: I415eec5d307ac73456aa556db9d61ceac1eaa565
Partial-Bug: #1889122
2020-07-30 13:30:51 -06:00
..
actions ansible: limit_hosts now takes precedence over blacklisted_hostnames 2020-07-15 14:11:20 -04:00
filters Add logging to capabilities filter 2017-09-20 17:50:42 +00:00
image Handle redirects for blobs better 2020-07-30 13:30:51 -06:00
releasenotes/notes Wire in parameters.convert_docker_params 2019-04-10 13:25:39 -04:00
templates Switch 55-heat-config to async 2020-07-28 14:02:53 -06:00
tests Handle redirects for blobs better 2020-07-30 13:30:51 -06:00
utils Generate a play per step for external_deploy_tasks 2020-07-23 14:38:30 -04:00
__init__.py Add ReNo support 2017-01-12 12:06:02 +00:00
arch.py Default to host CPU architecture if none is supplied 2017-08-05 09:11:20 +10:00
constants.py Generate a play per step for external_deploy_tasks 2020-07-23 14:38:30 -04:00
exception.py Fail config-download when group:os-apply-config used 2018-01-05 15:58:14 -05:00
i18n.py Update the documentation link for doc migration 2017-07-25 15:00:27 +08:00
inventories.py Include uc plan var when TripleoInventories contains a single plan 2020-04-09 21:21:13 +01:00
inventory.py Set undercloud ansible_connection to local 2020-06-22 15:07:49 +00:00
update.py Handle failed neutron-plugin-ml2.yaml lookup 2019-05-13 09:58:28 -04:00