Browse Source

Manage oslo_middleware/max_request_body_size

So that we can increase it from the default 114688

Useful in case for example the OS-Federation mapping is too large.

If this limit is breached keystone will return a 413 Entity Too Large
and not log anything to keystone.log.

Closes-Bug: #1835161

Change-Id: If9fc5c0bb5d6216b8656ee1673e1812c543de305
Signed-off-by: Johan Guldmyr <johan.guldmyr@csc.fi>
(cherry picked from commit a60980f3da)
changes/46/669046/1
Johan Guldmyr 2 months ago
parent
commit
913c2431ab

+ 6
- 0
manifests/init.pp View File

@@ -562,6 +562,10 @@
562 562
 #   HTTPProxyToWSGI middleware.
563 563
 #   Defaults to $::os_service_default.
564 564
 #
565
+# [*max_request_body_size*]
566
+#   (Optional) Set max request body size
567
+#   Defaults to $::os_service_default.
568
+#
565 569
 # [*purge_config*]
566 570
 #   (optional) Whether to set only the specified config options
567 571
 #   in the keystone config.
@@ -762,6 +766,7 @@ class keystone(
762 766
   $keystone_group                       = $::keystone::params::keystone_group,
763 767
   $manage_policyrcd                     = false,
764 768
   $enable_proxy_headers_parsing         = $::os_service_default,
769
+  $max_request_body_size                = $::os_service_default,
765 770
   $purge_config                         = false,
766 771
   # DEPRECATED PARAMETERS
767 772
   $admin_workers                        = $::os_workers,
@@ -967,6 +972,7 @@ We have enabled caching as a backwards compatibility that will be removed in the
967 972
 
968 973
   oslo::middleware { 'keystone_config':
969 974
     enable_proxy_headers_parsing => $enable_proxy_headers_parsing,
975
+    max_request_body_size        => $max_request_body_size,
970 976
   }
971 977
 
972 978
   # configure based on the catalog backend

+ 5
- 0
releasenotes/notes/max_request_body_size-1835161-45ec3b7ab7c40cfa.yaml View File

@@ -0,0 +1,5 @@
1
+---
2
+features:
3
+  - |
4
+    Add support to configure `[oslo_middleware]/max_request_body_size` with
5
+    `$max_request_body_size` in the `keystone::` class.

+ 8
- 0
spec/classes/keystone_init_spec.rb View File

@@ -836,6 +836,14 @@ describe 'keystone' do
836 836
     it { is_expected.to contain_keystone_config('oslo_middleware/enable_proxy_headers_parsing').with_value(true) }
837 837
   end
838 838
 
839
+  describe 'setting max_request_body_size' do
840
+    let :params do
841
+      default_params.merge({:max_request_body_size => '1146880' })
842
+    end
843
+
844
+    it { is_expected.to contain_keystone_config('oslo_middleware/max_request_body_size').with_value('1146880') }
845
+  end
846
+
839 847
   describe 'setting sql policy driver' do
840 848
     let :params do
841 849
       default_params.merge({:policy_driver => 'sql' })

Loading…
Cancel
Save