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:
@@ -12,6 +12,10 @@
|
|||||||
# [*client_package_ensure*] The ensure state for the swift client package.
|
# [*client_package_ensure*] The ensure state for the swift client package.
|
||||||
# (Optional) Defaults to present.
|
# (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
|
# == Dependencies
|
||||||
#
|
#
|
||||||
# None
|
# None
|
||||||
@@ -28,6 +32,7 @@ class swift(
|
|||||||
$swift_hash_suffix,
|
$swift_hash_suffix,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$client_package_ensure = 'present',
|
$client_package_ensure = 'present',
|
||||||
|
$max_header_size = '8192',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::swift::params
|
include ::swift::params
|
||||||
@@ -68,4 +73,7 @@ class swift(
|
|||||||
swift_config { 'swift-hash/swift_hash_path_suffix':
|
swift_config { 'swift-hash/swift_hash_path_suffix':
|
||||||
value => $swift_hash_suffix,
|
value => $swift_hash_suffix,
|
||||||
}
|
}
|
||||||
|
swift_config { 'swift-constraints/max_header_size':
|
||||||
|
value => $max_header_size,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,10 @@ require 'spec_helper'
|
|||||||
describe 'swift' do
|
describe 'swift' do
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{:swift_hash_suffix => 'string'}
|
{
|
||||||
|
:swift_hash_suffix => 'string',
|
||||||
|
:max_header_size => '16384',
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
let :facts do
|
let :facts do
|
||||||
@@ -51,6 +54,10 @@ describe 'swift' do
|
|||||||
is_expected.to contain_swift_config(
|
is_expected.to contain_swift_config(
|
||||||
'swift-hash/swift_hash_path_suffix').with_value('string')
|
'swift-hash/swift_hash_path_suffix').with_value('string')
|
||||||
end
|
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') }
|
it { is_expected.to contain_package('swift').with_ensure('present') }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user