diff --git a/manifests/init.pp b/manifests/init.pp index 2e2a53d1..7416c58a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -12,6 +12,10 @@ # [*client_package_ensure*] The ensure state for the swift client package. # (Optional) Defaults to present. # +# [*max_header_size*] Max HTTP header size for incoming requests for all swift +# services. Recommended size is 32768 for PKI keystone tokens. +# (Optional) Defaults to 8192 +# # == Dependencies # # None @@ -28,6 +32,7 @@ class swift( $swift_hash_suffix, $package_ensure = 'present', $client_package_ensure = 'present', + $max_header_size = '8192', ) { include ::swift::params @@ -68,4 +73,7 @@ class swift( swift_config { 'swift-hash/swift_hash_path_suffix': value => $swift_hash_suffix, } + swift_config { 'swift-constraints/max_header_size': + value => $max_header_size, + } } diff --git a/spec/classes/swift_spec.rb b/spec/classes/swift_spec.rb index c9f1df0b..33324f7a 100644 --- a/spec/classes/swift_spec.rb +++ b/spec/classes/swift_spec.rb @@ -3,7 +3,10 @@ require 'spec_helper' describe 'swift' do let :params do - {:swift_hash_suffix => 'string'} + { + :swift_hash_suffix => 'string', + :max_header_size => '16384', + } end let :facts do @@ -51,6 +54,10 @@ describe 'swift' do is_expected.to contain_swift_config( 'swift-hash/swift_hash_path_suffix').with_value('string') end + it 'configures swift.conf' do + is_expected.to contain_swift_config( + 'swift-constraints/max_header_size').with_value('16384') + end it { is_expected.to contain_package('swift').with_ensure('present') } end