Fixes with auth..
This commit is contained in:
parent
fd68ed866d
commit
c36ed664ff
3 changed files with 32 additions and 20 deletions
|
@ -5,6 +5,7 @@ class soc::intelmq(
|
||||||
String $servername = $facts['networking']['fqdn'],
|
String $servername = $facts['networking']['fqdn'],
|
||||||
Boolean $use_snakeoil = false,
|
Boolean $use_snakeoil = false,
|
||||||
String $apache_group = 'sunet-cert',
|
String $apache_group = 'sunet-cert',
|
||||||
|
Boolean $use_shib = false,
|
||||||
) {
|
) {
|
||||||
include sunet::systemd_reload
|
include sunet::systemd_reload
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,18 @@ class soc::sso(
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exec { 'Make sure mod_shib is loaded':
|
||||||
|
command => 'a2enmod shib',
|
||||||
|
creates => '/etc/apache2/mods-enabled/shib.load',
|
||||||
|
}
|
||||||
|
|
||||||
|
exec { 'Make sure authz_groupfile is loaded':
|
||||||
|
command => 'a2enmod authz_groupfile',
|
||||||
|
creates => '/etc/apache2/mods-enabled/authz_groupfile.load',
|
||||||
|
}
|
||||||
|
|
||||||
$shibbase = '/etc/shibboleth'
|
$shibbase = '/etc/shibboleth'
|
||||||
|
|
||||||
} elsif $ssotype == 'docker' {
|
} elsif $ssotype == 'docker' {
|
||||||
$shibbase = '/opt/sso/shibboleth'
|
$shibbase = '/opt/sso/shibboleth'
|
||||||
|
|
||||||
|
|
|
@ -33,17 +33,20 @@
|
||||||
SSLSessionTickets off
|
SSLSessionTickets off
|
||||||
Header always set Strict-Transport-Security "max-age=63072000"
|
Header always set Strict-Transport-Security "max-age=63072000"
|
||||||
|
|
||||||
<IfModule mod_shib.c>
|
<Location />
|
||||||
<Location />
|
<% if $use_shib -%>
|
||||||
AuthType shibboleth
|
AuthType shibboleth
|
||||||
ShibRequestSetting requireSession On
|
ShibRequestSetting requireSession On
|
||||||
ShibUseHeaders On
|
ShibUseHeaders On
|
||||||
|
|
||||||
|
AuthGroupFile /etc/apache2/groups.txt
|
||||||
|
Require group <%= @apache_group %>
|
||||||
|
<% else -%>
|
||||||
|
Require all granted
|
||||||
|
<% end -%>
|
||||||
|
</Location>
|
||||||
|
|
||||||
AuthGroupFile /etc/apache2/groups.txt
|
|
||||||
Require group <%= @apache_group %>
|
|
||||||
</Location>
|
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
<IfModule mod_proxy.c>
|
<IfModule mod_proxy.c>
|
||||||
ProxyRequests Off
|
ProxyRequests Off
|
||||||
<Location "/api">
|
<Location "/api">
|
||||||
|
@ -69,19 +72,16 @@
|
||||||
|
|
||||||
Alias /intelmq-manager /opt/intelmq/www/intelmq-manager
|
Alias /intelmq-manager /opt/intelmq/www/intelmq-manager
|
||||||
<Directory /opt/intelmq/www/intelmq-manager>
|
<Directory /opt/intelmq/www/intelmq-manager>
|
||||||
<IfModule mod_shib.c>
|
<% if $use_shib -%>
|
||||||
<Location />
|
AuthType shibboleth
|
||||||
AuthType shibboleth
|
ShibRequestSetting requireSession On
|
||||||
ShibRequestSetting requireSession On
|
ShibUseHeaders On
|
||||||
ShibUseHeaders On
|
|
||||||
|
|
||||||
AuthGroupFile /etc/apache2/groups.txt
|
AuthGroupFile /etc/apache2/groups.txt
|
||||||
Require group <%= @apache_group %>
|
Require group <%= @apache_group %>
|
||||||
</Location>
|
<% else -%>
|
||||||
</IfModule>
|
|
||||||
<IfModule !mod_shib.c>
|
|
||||||
Require all granted
|
Require all granted
|
||||||
</IfModule>
|
<% end -%>
|
||||||
|
|
||||||
<IfModule mod_headers.c>
|
<IfModule mod_headers.c>
|
||||||
Header set Content-Security-Policy "script-src 'self'"
|
Header set Content-Security-Policy "script-src 'self'"
|
||||||
|
|
Loading…
Add table
Reference in a new issue