Skip to content

Commit

Permalink
Merge pull request #2089 from yakatz/feature/vhost_cas_cookie_path
Browse files Browse the repository at this point in the history
Add cas_cookie_path in vhosts
  • Loading branch information
sanfrancrisko authored Nov 23, 2020
2 parents 0e67921 + 6af65e6 commit e32183c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions manifests/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@
# @param cas_validate_url
# Sets the URL to use when validating a client-presented ticket in an HTTP query string.
#
# @param cas_cookie_path
# Sets the location where information on the current session should be stored. This should
# be writable by the web server only.
#
# @param comment
# Adds comments to the header of the configuration file. Pass as string or an array of strings.
# For example:
Expand Down Expand Up @@ -1964,6 +1968,7 @@
$cas_login_url = undef,
$cas_validate_url = undef,
$cas_validate_saml = undef,
$cas_cookie_path = undef,
Optional[String] $shib_compat_valid_user = undef,
Optional[Enum['On', 'on', 'Off', 'off', 'DNS', 'dns']] $use_canonical_name = undef,
Optional[Variant[String,Array[String]]] $comment = undef,
Expand Down
3 changes: 2 additions & 1 deletion spec/classes/mod/auth_cas_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

context 'vhost setup', :compile do
let :pre_condition do
"class { 'apache': } apache::vhost { 'test.server': docroot => '/var/www/html', cas_root_proxied_as => 'http://test.server'} "
"class { 'apache': } apache::vhost { 'test.server': docroot => '/var/www/html', cas_root_proxied_as => 'http://test.server', cas_cookie_path => '/my/cas/path'} "
end

let :facts do
Expand All @@ -85,6 +85,7 @@
it { is_expected.to contain_file('/var/cache/mod_auth_cas/').with_owner('apache') }
it {
is_expected.to contain_concat__fragment('test.server-auth_cas').with(content: %r{^\s+CASRootProxiedAs http://test.server$})
is_expected.to contain_concat__fragment('test.server-auth_cas').with(content: %r{^\s+CASCookiePath /my/cas/path$})
}
end
end
Expand Down

0 comments on commit e32183c

Please sign in to comment.