From f5b533fb2f217a987d9bd7898b6baed31e9a1a31 Mon Sep 17 00:00:00 2001 From: Richard Hawkins Date: Wed, 11 Feb 2015 12:44:08 -0600 Subject: [PATCH] Update TempURL docs to include containers Change-Id: Ifb7c26b23ec81e3bde96b6e3bad0e950c0ca9408 --- doc/source/api/form_post_middleware.rst | 4 ++-- doc/source/api/temporary_url_middleware.rst | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/source/api/form_post_middleware.rst b/doc/source/api/form_post_middleware.rst index 272fa59899..24af0b6be4 100644 --- a/doc/source/api/form_post_middleware.rst +++ b/doc/source/api/form_post_middleware.rst @@ -165,7 +165,8 @@ signature includes these elements from the form: is set to ``600`` seconds into the future. - The secret key. Set as the ``X-Account-Meta-Temp-URL-Key`` header - value. + value for accounts or ``X-Container-Meta-Temp-URL-Key`` header + value for containers. See :ref:`secret_keys` for more information. The following example code generates a signature for use with form **POST**: @@ -214,4 +215,3 @@ This example uses the **swift-form-signature** script to compute the -F signature=35129416ebda2f1a21b3c2b8939850dfc63d8f43 \ -F redirect=https://example.com/done.html \ -F file=@flower.jpg - diff --git a/doc/source/api/temporary_url_middleware.rst b/doc/source/api/temporary_url_middleware.rst index f606b0b8c0..51b2634cbb 100644 --- a/doc/source/api/temporary_url_middleware.rst +++ b/doc/source/api/temporary_url_middleware.rst @@ -36,7 +36,7 @@ parameters: .. code:: https://swift-cluster.example.com/v1/my_account/container/object - ?temp_url_sig=da39a3ee5e6b4b0d3255bfef95601890afd80709 + ?temp_url_sig=da39a3ee5e6b4b0d3255bfef95601890afd80709 &temp_url_expires=1323479485 &filename=My+Test+File.pdf @@ -69,9 +69,8 @@ Secret Keys The cryptographic signature used in Temporary URLs and also in :doc:`form_post_middleware` uses a secret key. Object Storage allows you to -store four secret key values. Two are stored at the account level and two -are stored at the container level. When validating a request, -Object Storage checks signatures against all keys. Using two keys at +store two secret key values per account, and two per container. When validating +a request, Object Storage checks signatures against all keys. Using two keys at each level enables key rotation without invalidating existing temporary URLs. To set the keys at the account level, set one or both of the following @@ -113,11 +112,11 @@ signature includes these elements: - The allowed method. Typically, **GET** or **PUT**. - Expiry time. In the example for the HMAC-SHA1 signature for temporary - URLs below, the expiry time is set to ``86400`` seconds (or 1 day) + URLs below, the expiry time is set to ``86400`` seconds (or 1 day) into the future. - The path. Starting with ``/v1/`` onwards and including a container - name and object. In the example below, the path is + name and object. In the example below, the path is ``/v1/my_account/container/object``. Do not URL-encode the path at this stage.