Module Expr Str Assign NameStore ListLoad Str Str Str Str Str Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias alias alias alias alias Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults body Expr Str Return ListComp Call NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr CompareIn Call AttributeLoad NameLoad attr TupleLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad Call NameLoad NameLoad keyword Str Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam defaults body TryExcept body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Num Num NameLoad handlers ExceptHandler type NameLoad body Return Call NameLoad keyword NameLoad If CompareEq NameLoad NameLoad body Return NameLoad orelse Return Call NameLoad keyword NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body FunctionDef arguments args NameParam defaults body TryExcept body Assign TupleStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Num Num NameLoad handlers ExceptHandler type NameLoad body Return Call NameLoad keyword NameLoad If BoolOpAnd CompareEq NameLoad NameLoad CompareEq NameLoad NameLoad body Return NameLoad orelse Return Call NameLoad keyword NameLoad decorator_list Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad GeneratorExp Call NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr ListComp SubscriptLoad NameLoad Slice Num comprehension NameStore NameLoad Call AttributeLoad NameLoad attr Str Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr ListComp SubscriptLoad NameLoad Slice Num comprehension NameStore NameLoad Call AttributeLoad NameLoad attr Str Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr ListComp SubscriptLoad NameLoad Slice Num comprehension NameStore NameLoad Call AttributeLoad NameLoad attr Str Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr ListComp SubscriptLoad NameLoad Slice Num comprehension NameStore NameLoad Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareEq SubscriptLoad NameLoad Index Str Str body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameLoad If BoolOpAnd CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpOr UnaryOpNot NameLoad UnaryOpNot NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareEq SubscriptLoad NameLoad Index Str Str body Assign NameStore BinOpAdd BinOpAdd BinOpAdd Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword Str Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword Str Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword Str orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore NameLoad Assign NameStore NameLoad For TupleStore NameStore NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad Break If UnaryOpNot NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Return NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Str Assign NameStore Dict Str Str NameLoad NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd CompareIn SubscriptLoad NameLoad Index Str TupleLoad Str Str CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore ListLoad Assign NameStore NameLoad For TupleStore NameStore NameStore NameLoad body If CompareNotEq Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad orelse Assign NameStore NameLoad If NameLoad body Assign NameStore Str orelse If NameLoad body Assign NameStore Call NameLoad NameLoad orelse If NameLoad body Assign NameStore NameLoad orelse Assign NameStore Call NameLoad Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr TupleLoad Str NameLoad Assign NameStore NameLoad Return Call NameLoad NameLoad NameLoad NameLoad decorator_list Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn SubscriptLoad NameLoad Index Str SubscriptLoad AttributeLoad NameLoad attr Index Str body TryExcept body Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad SubscriptLoad NameLoad Index Str Num Num NameLoad handlers ExceptHandler type NameLoad body Return TupleLoad NameLoad NameLoad If BoolOpAnd CompareEq NameLoad Str Call AttributeLoad NameLoad attr Str body Return TupleLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore NameStore NameStore NameStore NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Str keyword NameLoad If CompareIn Str NameLoad body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Num If CompareIn Str NameLoad body TryExcept body Assign NameStore Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Num handlers ExceptHandler type NameLoad body Assign NameStore Num If CompareLt NameLoad Call NameLoad body Assign NameStore Num If CompareIn Str NameLoad body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Num If CompareIn Str NameLoad body Assign NameStore NameLoad Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr keyword Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr keyword Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str ListLoad Return BinOpAdd ListComp TupleLoad NameLoad NameLoad comprehension NameStore NameLoad ListComp TupleLoad NameLoad NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str If UnaryOpNot NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Return ListComp TupleLoad Call NameLoad NameLoad SubscriptLoad NameLoad Index Str NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareEq SubscriptLoad NameLoad Index Str Str body Assign NameStore NameLoad orelse Assign NameStore Str Return Call Call NameLoad keyword NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareIn SubscriptLoad NameLoad Index Str TupleLoad Str Str Str body Return For NameStore NameLoad body If CompareIn NameLoad AttributeLoad NameLoad attr body Return Call Call NameLoad keyword BinOpMod Str Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Slice Call NameLoad Str attr attr Str Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore Call AttributeLoad NameLoad attr body If CompareIn NameLoad AttributeLoad NameLoad attr body Continue For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr NameLoad body Break orelse If CompareIn NameLoad AttributeLoad NameLoad attr body Delete SubscriptDel NameLoad Index NameLoad Continue For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr NameLoad body Delete SubscriptDel NameLoad Index NameLoad Break decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr body If CompareIn NameLoad AttributeLoad NameLoad attr body Continue For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr NameLoad body Break orelse If CompareIn NameLoad AttributeLoad NameLoad attr body Delete SubscriptDel NameLoad Index NameLoad Continue For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr NameLoad body Delete SubscriptDel NameLoad Index NameLoad Break Return Call AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad Assign NameStore DictComp NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad attr comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return Lambda arguments args NameParam defaults Call NameLoad NameLoad NameLoad decorator_list
N/A N/A 
TempURL Middleware

Allows the creation of URLs to provide temporary access to objects.

For example, a website may wish to provide a link to download a large
object in Swift, but the Swift account has no public access. The
website can generate a URL that will provide GET access for a limited
time to the resource. When the web browser user clicks on the link,
the browser will download the object directly from Swift, obviating
the need for the website to act as a proxy for the request.

If the user were to share the link with all his friends, or
accidentally post it on a forum, etc. the direct access would be
limited to the expiration time set when the website created the link.

------------
Client Usage
------------

To create such temporary URLs, first an ``X-Account-Meta-Temp-URL-Key``
header must be set on the Swift account. Then, an HMAC-SHA1 (RFC 2104)
signature is generated using the HTTP method to allow (``GET``, ``PUT``,
``DELETE``, etc.), the Unix timestamp the access should be allowed until,
the full path to the object, and the key set on the account.

For example, here is code generating the signature for a ``GET`` for 60
seconds on ``/v1/AUTH_account/container/object``::

    import hmac
    from hashlib import sha1
    from time import time
    method = 'GET'
    expires = int(time() + 60)
    path = '/v1/AUTH_account/container/object'
    key = 'mykey'
    hmac_body = '%s\n%s\n%s' % (method, expires, path)
    sig = hmac.new(key, hmac_body, sha1).hexdigest()

Be certain to use the full path, from the ``/v1/`` onward.

Let's say ``sig`` ends up equaling
``da39a3ee5e6b4b0d3255bfef95601890afd80709`` and ``expires`` ends up
``1323479485``. Then, for example, the website could provide a link to::

    https://swift-cluster.example.com/v1/AUTH_account/container/object?
    temp_url_sig=da39a3ee5e6b4b0d3255bfef95601890afd80709&
    temp_url_expires=1323479485

Any alteration of the resource path or query arguments would result in
``401 Unauthorized``. Similarly, a ``PUT`` where ``GET`` was the allowed method
would be rejected with ``401 Unauthorized``. However, ``HEAD`` is allowed if
``GET``, ``PUT``, or ``POST`` is allowed.

Using this in combination with browser form post translation
middleware could also allow direct-from-browser uploads to specific
locations in Swift.

TempURL supports both account and container level keys.  Each allows up to two
keys to be set, allowing key rotation without invalidating all existing
temporary URLs.  Account keys are specified by ``X-Account-Meta-Temp-URL-Key``
and ``X-Account-Meta-Temp-URL-Key-2``, while container keys are specified by
``X-Container-Meta-Temp-URL-Key`` and ``X-Container-Meta-Temp-URL-Key-2``.
Signatures are checked against account and container keys, if
present.

With ``GET`` TempURLs, a ``Content-Disposition`` header will be set on the
response so that browsers will interpret this as a file attachment to
be saved. The filename chosen is based on the object name, but you
can override this with a filename query parameter. Modifying the
above example::

    https://swift-cluster.example.com/v1/AUTH_account/container/object?
    temp_url_sig=da39a3ee5e6b4b0d3255bfef95601890afd80709&
    temp_url_expires=1323479485&filename=My+Test+File.pdf

If you do not want the object to be downloaded, you can cause
``Content-Disposition: inline`` to be set on the response by adding the
``inline`` parameter to the query string, like so::

    https://swift-cluster.example.com/v1/AUTH_account/container/object?
    temp_url_sig=da39a3ee5e6b4b0d3255bfef95601890afd80709&
    temp_url_expires=1323479485&inline

---------------------
Cluster Configuration
---------------------

This middleware understands the following configuration settings:

``incoming_remove_headers``
    A whitespace-delimited list of the headers to remove from
    incoming requests. Names may optionally end with ``*`` to
    indicate a prefix match. ``incoming_allow_headers`` is a
    list of exceptions to these removals.
    Default: ``x-timestamp``

``incoming_allow_headers``
    A whitespace-delimited list of the headers allowed as
    exceptions to ``incoming_remove_headers``. Names may
    optionally end with ``*`` to indicate a prefix match.

    Default: None

``outgoing_remove_headers``
    A whitespace-delimited list of the headers to remove from
    outgoing responses. Names may optionally end with ``*`` to
    indicate a prefix match. ``outgoing_allow_headers`` is a
    list of exceptions to these removals.

    Default: ``x-object-meta-*``

``outgoing_allow_headers``
    A whitespace-delimited list of the headers allowed as
    exceptions to ``outgoing_remove_headers``. Names may
    optionally end with ``*`` to indicate a prefix match.

    Default: ``x-object-meta-public-*``

``methods``
    A whitespace delimited list of request methods that are
    allowed to be used with a temporary URL.

    Default: ``GET HEAD PUT POST DELETE``

 N/A __all__ N/A TempURL filter_factory DEFAULT_INCOMING_REMOVE_HEADERS DEFAULT_INCOMING_ALLOW_HEADERS DEFAULT_OUTGOING_REMOVE_HEADERS DEFAULT_OUTGOING_ALLOW_HEADERS os.path basename time time six.moves.urllib.parse parse_qs six.moves.urllib.parse urlencode swift.proxy.controllers.base get_account_info get_container_info swift.common.header_key_dict HeaderKeyDict swift.common.swob header_to_environ_key HTTPUnauthorized HTTPBadRequest swift.common.utils split_path get_valid_utf8_str register_swift_info get_hmac streq_const_time quote N/A DISALLOWED_INCOMING_HEADERS x-object-manifest N/A DEFAULT_INCOMING_REMOVE_HEADERS x-timestamp N/A DEFAULT_INCOMING_ALLOW_HEADERS N/A DEFAULT_OUTGOING_REMOVE_HEADERS x-object-meta-* N/A DEFAULT_OUTGOING_ALLOW_HEADERS x-object-meta-public-* N/A CONTAINER_SCOPE container N/A ACCOUNT_SCOPE account get_tempurl_keys_from_metadata N/A N/A meta N/A N/A N/A 
    Extracts the tempurl keys from metadata.

    :param meta: account metadata
    :returns: list of keys found (possibly empty if no keys set)

    Example:
      meta = get_account_info(...)['meta']
      keys = get_tempurl_keys_from_metadata(meta)
     N/A N/A N/A get_valid_utf8_str value N/A N/A key value N/A N/A meta items N/A N/A N/A key lower N/A temp-url-key temp-url-key-2 N/A disposition_format N/A N/A filename N/A N/A N/A N/A attachment; filename="%s"; filename*=UTF-8''%s N/A N/A quote filename safe  / N/A quote filename N/A authorize_same_account N/A N/A account_to_match N/A N/A auth_callback_same_account N/A N/A req N/A N/A N/A N/A N/A N/A _ver acc _rest N/A N/A req split_path 2 3 True N/A N/A N/A ValueError N/A N/A N/A HTTPUnauthorized request req N/A N/A acc account_to_match N/A N/A None N/A N/A N/A HTTPUnauthorized request req N/A N/A auth_callback_same_account N/A authorize_same_container N/A N/A account_to_match container_to_match N/A N/A auth_callback_same_container N/A N/A req N/A N/A N/A N/A N/A N/A _ver acc con _rest N/A N/A req split_path 3 4 True N/A N/A N/A ValueError N/A N/A N/A HTTPUnauthorized request req N/A N/A N/A acc account_to_match N/A con container_to_match N/A N/A None N/A N/A N/A HTTPUnauthorized request req N/A N/A auth_callback_same_container N/A TempURL N/A object N/A N/A 
    WSGI Middleware to grant temporary URLs specific access to Swift
    resources. See the overview for more information.

    The proxy logs created for any subrequests made will have swift.source set
    to "TU".

    :param app: The next WSGI filter or app in the paste.deploy
                chain.
    :param conf: The configuration dict for the middleware.
     __init__ N/A N/A self app conf N/A N/A N/A N/A self app app N/A N/A self conf conf N/A N/A self disallowed_headers N/A set N/A N/A header_to_environ_key h N/A h N/A N/A DISALLOWED_INCOMING_HEADERS split N/A headers N/A N/A header_to_environ_key h N/A h N/A N/A conf get incoming_remove_headers N/A N/A DEFAULT_INCOMING_REMOVE_HEADERS split N/A N/A self incoming_remove_headers N/A h N/A h headers N/A N/A N/A h endswith * N/A N/A self incoming_remove_headers_startswith N/A N/A h N/A -1 N/A h headers N/A N/A h endswith * N/A headers N/A N/A header_to_environ_key h N/A h N/A N/A conf get incoming_allow_headers N/A N/A DEFAULT_INCOMING_ALLOW_HEADERS split N/A N/A self incoming_allow_headers N/A h N/A h headers N/A N/A N/A h endswith * N/A N/A self incoming_allow_headers_startswith N/A N/A h N/A -1 N/A h headers N/A N/A h endswith * N/A headers N/A N/A N/A h title N/A h N/A N/A conf get outgoing_remove_headers N/A N/A DEFAULT_OUTGOING_REMOVE_HEADERS split N/A N/A self outgoing_remove_headers N/A h N/A h headers N/A N/A N/A h endswith * N/A N/A self outgoing_remove_headers_startswith N/A N/A h N/A -1 N/A h headers N/A N/A h endswith * N/A headers N/A N/A N/A h title N/A h N/A N/A conf get outgoing_allow_headers N/A N/A DEFAULT_OUTGOING_ALLOW_HEADERS split N/A N/A self outgoing_allow_headers N/A h N/A h headers N/A N/A N/A h endswith * N/A N/A self outgoing_allow_headers_startswith N/A N/A h N/A -1 N/A h headers N/A N/A h endswith * N/A N/A self agent %(orig)s TempURL N/A __call__ N/A N/A self env start_response N/A N/A N/A 
        Main hook into the WSGI paste.deploy filter/app pipeline.

        :param env: The WSGI environment dict.
        :param start_response: The WSGI start_response hook.
        :returns: Response as per WSGI.
         N/A N/A N/A env N/A REQUEST_METHOD OPTIONS N/A N/A N/A N/A self app env start_response N/A info N/A N/A self _get_temp_url_info env N/A N/A temp_url_sig temp_url_expires filename inline_disposition info N/A N/A N/A temp_url_sig None N/A temp_url_expires None N/A N/A N/A N/A self app env start_response N/A N/A N/A temp_url_sig N/A temp_url_expires N/A N/A N/A N/A self _invalid env start_response N/A N/A account container N/A N/A self _get_account_and_container env N/A N/A account N/A N/A N/A N/A self _invalid env start_response N/A keys N/A N/A self _get_keys env N/A N/A keys N/A N/A N/A N/A self _invalid env start_response N/A N/A N/A env N/A REQUEST_METHOD HEAD N/A N/A hmac_vals N/A N/A N/A N/A N/A self _get_hmacs env temp_url_expires keys N/A N/A self _get_hmacs env temp_url_expires keys request_method GET N/A N/A self _get_hmacs env temp_url_expires keys request_method POST N/A N/A self _get_hmacs env temp_url_expires keys request_method PUT N/A N/A hmac_vals N/A N/A self _get_hmacs env temp_url_expires keys N/A is_valid_hmac False N/A hmac_scope None N/A N/A hmac scope hmac_vals N/A N/A N/A streq_const_time temp_url_sig hmac N/A N/A is_valid_hmac True N/A hmac_scope scope N/A N/A N/A is_valid_hmac N/A N/A N/A N/A self _invalid env start_response N/A resp N/A N/A self _clean_disallowed_headers env start_response N/A resp N/A N/A resp N/A N/A N/A self _clean_incoming_headers env N/A N/A hmac_scope ACCOUNT_SCOPE N/A N/A N/A env N/A swift.authorize N/A authorize_same_account account N/A N/A N/A env N/A swift.authorize N/A authorize_same_container account container N/A N/A env N/A swift.authorize_override True N/A N/A env N/A REMOTE_USER .wsgi.tempurl N/A qs N/A temp_url_sig temp_url_expires temp_url_sig temp_url_expires N/A filename N/A N/A N/A qs N/A filename filename N/A N/A env N/A QUERY_STRING N/A urlencode qs _start_response N/A N/A status headers exc_info N/A None N/A N/A headers N/A N/A self _clean_outgoing_headers headers N/A N/A N/A N/A env N/A REQUEST_METHOD N/A GET HEAD N/A N/A status N/A 0 2 N/A N/A out_headers N/A N/A existing_disposition None N/A N/A h v headers N/A N/A N/A N/A N/A h lower content-disposition N/A N/A N/A N/A out_headers append N/A h v N/A N/A existing_disposition v N/A inline_disposition N/A N/A disposition_value inline N/A N/A filename N/A N/A disposition_value N/A disposition_format filename N/A N/A existing_disposition N/A N/A disposition_value existing_disposition N/A N/A name N/A basename N/A N/A N/A env N/A PATH_INFO rstrip / N/A disposition_value N/A disposition_format name N/A value N/A N/A disposition_value replace %0A N/A N/A N/A out_headers append N/A Content-Disposition value N/A headers out_headers N/A N/A start_response status headers exc_info N/A N/A N/A N/A self app env _start_response N/A _get_account_and_container N/A N/A self env N/A N/A N/A 
        Returns just the account and container for the request, if it's an
        object request and one of the configured methods; otherwise, None is
        returned.

        :param env: The WSGI environment for the request.
        :returns: (Account str, container str) or (None, None).
         N/A N/A N/A env N/A REQUEST_METHOD N/A N/A self conf N/A methods N/A N/A N/A N/A N/A ver acc cont obj N/A split_path N/A env N/A PATH_INFO 4 4 True N/A N/A N/A ValueError N/A N/A N/A None None N/A N/A N/A ver v1 N/A N/A obj strip / N/A N/A N/A acc cont N/A N/A None None N/A _get_temp_url_info N/A N/A self env N/A N/A N/A 
        Returns the provided temporary URL parameters (sig, expires),
        if given and syntactically valid. Either sig or expires could
        be None if not provided. If provided, expires is also
        converted to an int if possible or 0 if not, and checked for
        expiration (returns 0 if expired).

        :param env: The WSGI environment for the request.
        :returns: (sig, expires, filename, inline) as described above.
         N/A temp_url_sig temp_url_expires filename inline None N/A qs N/A parse_qs N/A N/A env get QUERY_STRING keep_blank_values True N/A N/A temp_url_sig qs N/A N/A temp_url_sig N/A N/A qs N/A temp_url_sig N/A 0 N/A N/A temp_url_expires qs N/A N/A N/A N/A temp_url_expires N/A int N/A N/A qs N/A temp_url_expires N/A 0 N/A N/A N/A ValueError N/A N/A temp_url_expires 0 N/A N/A temp_url_expires N/A time N/A N/A temp_url_expires 0 N/A N/A filename qs N/A N/A filename N/A N/A qs N/A filename N/A 0 N/A N/A inline qs N/A N/A inline True N/A N/A temp_url_sig temp_url_expires filename inline N/A _get_keys N/A N/A self env N/A N/A N/A 
        Returns the X-[Account|Container]-Meta-Temp-URL-Key[-2] header values
        for the account or container, or an empty list if none are set. Each
        value comes as a 2-tuple (key, scope), where scope is either
        CONTAINER_SCOPE or ACCOUNT_SCOPE.

        Returns 0-4 elements depending on how many keys are set in the
        account's or container's metadata.

        :param env: The WSGI environment for the request.
        :returns: [
            (X-Account-Meta-Temp-URL-Key str value, ACCOUNT_SCOPE) if set,
            (X-Account-Meta-Temp-URL-Key-2 str value, ACCOUNT_SCOPE if set,
            (X-Container-Meta-Temp-URL-Key str value, CONTAINER_SCOPE) if set,
            (X-Container-Meta-Temp-URL-Key-2 str value, CONTAINER_SCOPE if set,
        ]
         N/A account_info N/A get_account_info env N/A self app swift_source TU N/A account_keys N/A get_tempurl_keys_from_metadata N/A account_info N/A meta N/A container_info N/A get_container_info env N/A self app swift_source TU N/A container_keys N/A get_tempurl_keys_from_metadata N/A N/A container_info get meta N/A N/A N/A N/A N/A ak ACCOUNT_SCOPE N/A ak account_keys N/A N/A ck CONTAINER_SCOPE N/A ck container_keys N/A _get_hmacs N/A N/A self env expires scoped_keys request_method N/A None N/A N/A 
        :param env: The WSGI environment for the request.
        :param expires: Unix timestamp as an int for when the URL
                        expires.
        :param scoped_keys: (key, scope) tuples like _get_keys() returns
        :param request_method: Optional override of the request in
                               the WSGI env. For example, if a HEAD
                               does not match, you may wish to
                               override with GET to still allow the
                               HEAD.

        :returns: a list of (hmac, scope) 2-tuples
         N/A N/A request_method N/A N/A request_method N/A env N/A REQUEST_METHOD N/A N/A N/A N/A get_hmac request_method N/A env N/A PATH_INFO expires key scope N/A N/A key scope scoped_keys N/A _invalid N/A N/A self env start_response N/A N/A N/A 
        Performs the necessary steps to indicate a WSGI 401
        Unauthorized response to the request.

        :param env: The WSGI environment for the request.
        :param start_response: The WSGI start_response hook.
        :returns: 401 response as per WSGI.
         N/A N/A N/A env N/A REQUEST_METHOD HEAD N/A N/A body None N/A N/A body 401 Unauthorized: Temp URL invalid
 N/A N/A N/A HTTPUnauthorized body body env start_response N/A _clean_disallowed_headers N/A N/A self env start_response N/A N/A N/A 
        Validate the absence of disallowed headers for "unsafe" operations.

        :returns: None for safe operations or swob.HTTPBadResponse if the
                  request includes disallowed headers.
         N/A N/A N/A env N/A REQUEST_METHOD N/A GET HEAD OPTIONS N/A N/A N/A h env N/A N/A N/A h N/A self disallowed_headers N/A N/A N/A N/A HTTPBadRequest body N/A The header %r is not allowed in this tempurl N/A N/A N/A N/A N/A h N/A N/A len HTTP_ title replace _ - env start_response N/A _clean_incoming_headers N/A N/A self env N/A N/A N/A 
        Removes any headers from the WSGI environment as per the
        middleware configuration for incoming requests.

        :param env: The WSGI environment for the request.
         N/A h N/A N/A env keys N/A N/A N/A h N/A self incoming_allow_headers N/A N/A N/A p N/A self incoming_allow_headers_startswith N/A N/A N/A N/A h startswith p N/A N/A N/A N/A N/A h N/A self incoming_remove_headers N/A N/A N/A env N/A h N/A N/A p N/A self incoming_remove_headers_startswith N/A N/A N/A N/A h startswith p N/A N/A N/A env N/A h N/A N/A _clean_outgoing_headers N/A N/A self headers N/A N/A N/A 
        Removes any headers as per the middleware configuration for
        outgoing responses.

        :param headers: A WSGI start_response style list of headers,
                        [('header1', 'value), ('header2', 'value),
                         ...]
        :returns: The same headers list, but with some headers
                  removed as per the middlware configuration for
                  outgoing responses.
         N/A headers N/A HeaderKeyDict headers N/A h N/A N/A headers keys N/A N/A N/A h N/A self outgoing_allow_headers N/A N/A N/A p N/A self outgoing_allow_headers_startswith N/A N/A N/A N/A h startswith p N/A N/A N/A N/A N/A h N/A self outgoing_remove_headers N/A N/A N/A headers N/A h N/A N/A p N/A self outgoing_remove_headers_startswith N/A N/A N/A N/A h startswith p N/A N/A N/A headers N/A h N/A N/A N/A N/A headers items N/A N/A filter_factory N/A N/A global_conf N/A local_conf N/A N/A Returns the WSGI filter for use with paste.deploy. N/A conf N/A N/A global_conf copy N/A N/A N/A conf update local_conf N/A defaults N/A methods incoming_remove_headers incoming_allow_headers outgoing_remove_headers outgoing_allow_headers GET HEAD PUT POST DELETE DEFAULT_INCOMING_REMOVE_HEADERS DEFAULT_INCOMING_ALLOW_HEADERS DEFAULT_OUTGOING_REMOVE_HEADERS DEFAULT_OUTGOING_ALLOW_HEADERS N/A info_conf N/A k N/A N/A N/A N/A conf get k v split N/A N/A k v N/A N/A defaults items N/A N/A register_swift_info tempurl info_conf N/A N/A N/A conf update info_conf N/A N/A N/A N/A app N/A N/A TempURL app conf N/A