13 Commits

Author SHA1 Message Date
Alistair Coles
cc27780042 docs: add discussion of content-type metadata
Change-Id: I2aa13e2b23bda86c51ef6aaa69ea3fd0075bb9ad
2024-03-06 11:02:15 +00:00
Clay Gerrard
5af7719ef3 Support swift.proxy_logging_status in request env
When logging a request, if the request environ has a
swift.proxy_logging_status item then use its value for the log
message status int.

The swift.proxy_logging_status hint may be used by other middlewares
when the desired logged status is different from the wire_status_int.

If the proxy_logging middleware detects a client disconnect then any
swift.proxy_logging_status item is ignored and a 499 status int is
logged, as per current behaviour. i.e.:

  * client disconnect overrides swift.proxy_logging_status and the
    response status
  * swift.proxy_logging_status overrides the response status

If the proxy_logging middleware catches an exception then the logged
status int will be 500 regardless of any swift.proxy_logging_status
item.

Co-Authored-By: Alistair Coles <alistairncoles@gmail.com>
Change-Id: I9b5cc6d5fb69a2957b8c4846ce1feed8c115e6b6
2023-12-20 17:31:06 +00:00
Tim Burke
716ae48eb8 docs: Fix broken paste/pastedeploy links
Closes-Bug: #2016463
Change-Id: Id500a2429b7412823970a06e3e82b1d1646c70b8
2023-04-27 13:52:55 -07:00
Wei LingFei
5032b42b10 Update url
The OpenStack project is currently maintained on opendev.org, with github.com serving as a mirror repository.

Replace the source code repository address for the python-swiftclient project from github.com to opendev.org.

Change-Id: I650a80cb45febc457c42360061faf3a9799e6131
2023-03-24 14:44:18 +08:00
Matthew Oliver
f2c279bae9 Trim sensitive information in the logs (CVE-2017-8761)
Several headers and query params were previously revealed in logs but
are now redacted:

  * X-Auth-Token header (previously redacted in the {auth_token} field,
    but not the {headers} field)
  * temp_url_sig query param (used by tempurl middleware)
  * Authorization header and X-Amz-Signature and Signature query
    parameters (used by s3api middleware)

This patch adds some new middleware helper methods to track headers and
query parameters that should be redacted by proxy-logging. While
instantiating the middleware, authors can call either:

   register_sensitive_header('case-insensitive-header-name')
   register_sensitive_param('case-sensitive-query-param-name')

to add items that should be redacted. The redaction uses proxy-logging's
existing reveal_sensitive_prefix config option to determine how much to
reveal.

Note that query params will still be logged in their entirety if
eventlet_debug is enabled.

UpgradeImpact
=============
The reveal_sensitive_prefix config option now applies to more items;
operators should review their currently-configured value to ensure it
is appropriate for these new contexts. In particular, operators should
consider reducing the value if it is more than 20 or so, even if that
previously offered sufficient protection for auth tokens.

Co-Authored-By: Tim Burke <tim.burke@gmail.com>
Closes-Bug: #1685798
Change-Id: I88b8cfd30292325e0870029058da6fb38026ae1a
2022-02-09 10:53:46 +00:00
Alistair Coles
554c07aa5f Fix the example webhook middleware
Change-Id: I242dc8bc655a1d1243c2d4bd51fc62e4dcadc67b
2018-06-20 10:49:30 +01:00
Jenkins
6daa382c34 Merge "Revises 'url' to 'URL' and 'json' to 'JSON'" 2016-10-06 00:23:41 +00:00
Yushiro FURUKAWA
9b98c89983 Revises 'url' to 'URL' and 'json' to 'JSON'
Change-Id: I44743fbb9bcbce3a50ed6770264ba0f4b17803d7
2016-09-30 22:21:03 +09:00
Lokesh S
eea574a78a Py3: Fixes eventlet ImportError: No module named urllib2
Python3:
from eventlet.green.urllib import request
Python2:
from eventlet.green import urllib2

Change-Id: Ib38865e0b6a8f076b8a54de4fae221d49f315c91
2016-09-07 09:04:30 +00:00
Nandini Tata
6f230c7ea0 Fixed inconsistent naming conventions
Fixed naming conventions of Keystone, Swift and proxy servers in
the docs.

Change-Id: I294afd8d7bffa8c1fc299f5812effacb9ad08910
2016-07-07 21:40:21 +00:00
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
2016-06-30 23:31:20 -07:00
Alistair Coles
3ad003cf51 Enable middleware to set metadata on object POST
Adds a new form of system metadata for objects.

Sysmeta cannot be updated by an object POST because
that would cause all existing sysmeta to be deleted.
Crypto middleware will want to add 'system' metadata
to object metadata on PUTs and POSTs, but it is ok
for this metadata to be replaced en-masse on every
POST.

This patch introduces x-object-transient-sysmeta-*
that is persisted by object servers and returned
in GET and HEAD responses, just like user metadata,
without polluting the x-object-meta-* namespace.
All headers in this namespace will be filtered
inbound and outbound by the gatekeeper, so cannot
be set or read by clients.

Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>
Co-Authored-By: Janie Richling <jrichli@us.ibm.com>

Change-Id: I5075493329935ba6790543fc82ea6e039704811d
2016-06-28 11:00:33 +01:00
Clay Gerrard
63f8c2284a Add documentation for GateKeeper
The purpose of GateKeeper mostly relates to the development of new swift code,
so I threw together a guide for development_middleware that covers some basics
with a eye towards metadata handling in-particular.

I also fixed up some missing autodoc's, split out middleware autodoc and added
some ref's here and about so I could link to them from the
development_middleware guide.

DocImpact
Change-Id: I20dd942ea8df9e33c3e794cb49669ffa1332c63e
2014-01-23 15:04:23 -05:00