Skip to content

Commit 397400d

Browse files
committed
Allow additional settings for GSSAPI in Vhost
Adding config items: - allowedmech - authname - authtype - basicauth
1 parent ea09e3f commit 397400d

File tree

2 files changed

+46
-6
lines changed

2 files changed

+46
-6
lines changed

spec/defines/vhost_spec.rb

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,13 @@
252252
'passenger_app_log_file' => '/tmp/app.log',
253253
'passenger_debugger' => false,
254254
'gssapi' => {
255-
'credstore' => 'keytab:/foo/bar.keytab',
256-
'localname' => 'On',
257-
'sslonly' => 'Off',
255+
'credstore' => 'keytab:/foo/bar.keytab',
256+
'localname' => 'On',
257+
'sslonly' => 'Off',
258+
'allowedmech' => 'krb5',
259+
'authname' => 'Kerberos 5',
260+
'authtype' => 'GSSAPI',
261+
'basicauth' => 'On',
258262
},
259263
},
260264
{
@@ -958,6 +962,26 @@
958962
content: %r{^\s+GssapiLocalName\sOn$},
959963
)
960964
}
965+
it {
966+
is_expected.to contain_concat__fragment('rspec.example.com-directories').with(
967+
content: %r{^\s+GssapiAllowedMech\skrb5$},
968+
)
969+
}
970+
it {
971+
is_expected.to contain_concat__fragment('rspec.example.com-directories').with(
972+
content: %r{^\s+AuthName\s"Kerberos 5"$},
973+
)
974+
}
975+
it {
976+
is_expected.to contain_concat__fragment('rspec.example.com-directories').with(
977+
content: %r{^\s+AuthType\sGSSAPI$},
978+
)
979+
}
980+
it {
981+
is_expected.to contain_concat__fragment('rspec.example.com-directories').with(
982+
content: %r{^\s+GssapiBasicAuth\sOn$},
983+
)
984+
}
961985
it {
962986
is_expected.to contain_concat__fragment('rspec.example.com-directories').with(
963987
content: %r{^\s+SSLVerifyClient\soptional$},

templates/vhost/_gssapi.epp

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
<%|
22
# https://github.com/gssapi/mod_auth_gssapi
3-
Optional[String[1]] $credstore = undef,
4-
Optional[Enum['On','Off']] $sslonly = undef,
5-
Optional[Enum['On','Off']] $localname = undef,
3+
Optional[String[1]] $allowedmech = undef,
4+
Optional[String[1]] $authname = undef,
5+
Optional[String[1]] $authtype = undef,
6+
Optional[Enum['On','Off']] $basicauth = undef,
7+
Optional[String[1]] $credstore = undef,
8+
Optional[Enum['On','Off']] $sslonly = undef,
9+
Optional[Enum['On','Off']] $localname = undef,
610
|%>
711
# mod_auth_gssapi configuration
12+
<% if $allowedmech { -%>
13+
GssapiAllowedMech <%= $allowedmech %>
14+
<% } -%>
15+
<% if $authname { -%>
16+
AuthName "<%= $authname %>"
17+
<% } -%>
18+
<% if $authtype { -%>
19+
AuthType <%= $authtype %>
20+
<% } -%>
21+
<% if $basicauth { -%>
22+
GssapiBasicAuth <%= $basicauth %>
23+
<% } -%>
824
<% if $sslonly { -%>
925
GssapiSSLonly <%= $sslonly %>
1026
<% } -%>

0 commit comments

Comments
 (0)