Add max_header_size field for PKI tokens

PKI tokens can be extremely large (>64k), requiring
a custom max_header_size to be configured.
This field defaults to the default from swift internal
defaults, which is 8192 bytes.

Change-Id: I9d2df074e333e110df4dfeaf5ba1cdab5c4ff19f
Related-Bug: #1470664
This commit is contained in:
Matthew Mosesohn 2015-07-02 19:24:50 +03:00
parent 95b4d9d6af
commit f37b4ffbd7
2 changed files with 16 additions and 1 deletions

View File

@ -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,
}
}

View File

@ -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