]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
common: add config option rgw_trust_forwarded_https
authorCasey Bodley <cbodley@redhat.com>
Mon, 22 Oct 2018 15:04:55 +0000 (11:04 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 22 Oct 2018 18:56:22 +0000 (14:56 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
doc/radosgw/config-ref.rst
doc/radosgw/encryption.rst
src/common/legacy_config_opts.h
src/common/options.cc

index 37c9b81f746458115ac4f3ca4270fc5229acc49c..abaeafba8212fa4357238528066b63ac15f80803 100644 (file)
@@ -576,6 +576,17 @@ Swift Settings
 :Default: ``false``
 
 
+``rgw trust forwarded https``
+
+:Description: When a proxy in front of radosgw is used for ssl termination, radosgw
+              does not know whether incoming http connections are secure. Enable
+              this option to trust the ``Forwarded`` and ``X-Forwarded-Proto`` headers
+              sent by the proxy when determining whether the connection is secure.
+              This is required for some features, such as server side encryption.
+:Type: Boolean
+:Default: ``false``
+
+
 
 Logging Settings
 ================
index a7bb7e2e931b65130c9cd2f4e00c954d75b2a6d1..ea89e502ab0b8e828d34fdcfc32437d3acc56d65 100644 (file)
@@ -9,6 +9,11 @@ with 3 options for the management of encryption keys. Server-side encryption
 means that the data is sent over HTTP in its unencrypted form, and the Ceph
 Object Gateway stores that data in the Ceph Storage Cluster in encrypted form.
 
+.. note:: Requests for server-side encryption must be sent over a secure HTTPS
+          connection to avoid sending secrets in plaintext. If a proxy is used
+          for SSL termination, ``rgw trust forwarded https`` must be enabled
+          before forwarded requests will be trusted as secure.
+
 Customer-Provided Keys
 ======================
 
index 0145f1575978145496b3730c977741af1a22039f..e1d5e8458d2d822e61ec689cef9b110d3ba96681 100644 (file)
@@ -1504,6 +1504,7 @@ OPTION(rgw_shard_warning_threshold, OPT_DOUBLE) // pct of safe max
 
 OPTION(rgw_swift_versioning_enabled, OPT_BOOL) // whether swift object versioning feature is enabled
 
+OPTION(rgw_trust_forwarded_https, OPT_BOOL) // trust Forwarded and X-Forwarded-Proto headers for ssl termination
 OPTION(rgw_crypt_require_ssl, OPT_BOOL) // requests including encryption key headers must be sent over ssl
 OPTION(rgw_crypt_default_encryption_key, OPT_STR) // base64 encoded key for encryption of rgw objects
 OPTION(rgw_crypt_s3_kms_encryption_keys, OPT_STR) // extra keys that may be used for aws:kms
index ac855ed7561d16016c5daef7e207b92721b23dee..d7f325bb809470c39633f9cf7fe596555a4ff0a0 100644 (file)
@@ -6237,6 +6237,17 @@ std::vector<Option> get_rgw_options() {
     .set_default(120)
     .set_description(""),
 
+    Option("rgw_trust_forwarded_https", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+    .set_default(false)
+    .set_description("Trust Forwarded and X-Forwarded-Proto headers")
+    .set_long_description(
+        "When a proxy in front of radosgw is used for ssl termination, radosgw "
+        "does not know whether incoming http connections are secure. Enable "
+        "this option to trust the Forwarded and X-Forwarded-Proto headers sent "
+        "by the proxy when determining whether the connection is secure. This "
+        "is required for some features, such as server side encryption.")
+    .add_see_also("rgw_crypt_require_ssl"),
+
     Option("rgw_crypt_require_ssl", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
     .set_default(true)
     .set_description("Requests including encryption key headers must be sent over ssl"),