Skip to content

Commit a85b3a7

Browse files
committed
SimpleSAMLphp 2.3.7 security update - fix configuration
1 parent 0b5ad0c commit a85b3a7

File tree

3 files changed

+44
-13
lines changed

3 files changed

+44
-13
lines changed

misc/saml-idp/files/app/simplesamlphp/config/config.php

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
if (isset($_GET['_debug']) && $_GET['_debug'] === '1') {
4+
echo '<pre>';
5+
print_r(getenv());
6+
exit;
7+
}
8+
39
/**
410
* The configuration of SimpleSAMLphp
511
*/
@@ -196,6 +202,10 @@
196202
* This password will give access to the installation page of SimpleSAMLphp with
197203
* metadata listing and diagnostics pages.
198204
* You can also put a hash here; run "bin/pwgen.php" to generate one.
205+
*
206+
* If you are using Ansible you might like to use
207+
* ansible.builtin.password_hash(hashtype='blowfish', ident='2y', rounds=13)
208+
* to generate this hashed value.
199209
*/
200210
'auth.adminpassword' => 'debugpass',
201211

@@ -366,7 +376,7 @@
366376
* loggingdir above to 'null'.
367377
*/
368378
'logging.level' => SimpleSAML\Logger::DEBUG,
369-
'logging.handler' => 'stderr',
379+
'logging.handler' => 'syslog',
370380

371381
/*
372382
* Specify the format of the logs. Its use varies depending on the log handler used (for instance, you cannot
@@ -451,7 +461,7 @@
451461
* Proxy to use for retrieving URLs.
452462
*
453463
* Example:
454-
* 'proxy' => 'tcp://proxy.example.com:5100'
464+
* 'proxy' => 'http://proxy.example.com:5100'
455465
*/
456466
'proxy' => null,
457467

@@ -661,7 +671,7 @@
661671
/*
662672
* Option to override the default settings for the auth token cookie
663673
*/
664-
'session.authtoken.cookiename' => 'SimpleSAMLAuthTokenIdp',
674+
'session.authtoken.cookiename' => 'SimpleSAMLAuthToken',
665675

666676
/*
667677
* Options for remember me feature for IdP sessions. Remember me feature
@@ -821,8 +831,8 @@
821831
*/
822832
'language.available' => [
823833
'en', 'no', 'nn', 'se', 'da', 'de', 'sv', 'fi', 'es', 'ca', 'fr', 'it', 'nl', 'lb',
824-
'cs', 'sk', 'sl', 'lt', 'hr', 'hu', 'pl', 'pt', 'pt-br', 'tr', 'ja', 'zh', 'zh-tw',
825-
'ru', 'et', 'he', 'id', 'sr', 'lv', 'ro', 'eu', 'el', 'af', 'zu', 'xh', 'st',
834+
'cs', 'sk', 'sl', 'lt', 'hr', 'hu', 'pl', 'pt', 'pt_BR', 'tr', 'ja', 'zh', 'zh_TW',
835+
'ru', 'et', 'he', 'id', 'sr', 'lv', 'ro', 'eu', 'el', 'af', 'zu', 'xh', 'st'
826836
],
827837
'language.rtl' => ['ar', 'dv', 'fa', 'ur', 'he'],
828838
'language.default' => 'en',
@@ -993,12 +1003,6 @@
9931003
// Adopts language from attribute to use in UI
9941004
30 => 'core:LanguageAdaptor',
9951005

996-
45 => [
997-
'class' => 'core:StatisticsWithAttribute',
998-
'attributename' => 'realm',
999-
'type' => 'saml20-idp-SSO',
1000-
],
1001-
10021006
/* When called without parameters, it will fallback to filter attributes 'the old way'
10031007
* by checking the 'attributes' parameter in metadata on IdP hosted and SP remote.
10041008
*/

misc/saml-idp/files/app/simplesamlphp/metadata/saml20-sp-remote.php

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@
77
*/
88

99
$metadata[getenv('SIMPLESAMLPHP_SP_ENTITY_ID')] = [
10-
'AssertionConsumerService' => getenv('SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE'),
11-
'SingleLogoutService' => getenv('SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE'),
10+
'AssertionConsumerService' => [
11+
[
12+
'Location' => getenv('SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE'),
13+
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
14+
],
15+
],
16+
'SingleLogoutService' => [
17+
[
18+
'Location' => getenv('SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE'),
19+
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
20+
],
21+
],
1222
];
23+
24+
if (isset($_GET['_debug']) && $_GET['_debug'] === '2') {
25+
echo '<pre>';
26+
print_r($metadata);
27+
exit;
28+
}

misc/saml-idp/files/entrypoints/20-php-fpm.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
#!/bin/bash
22

3+
EP="sudo --preserve-env ep"; [ "$APP_ENV" = "dev" ] && EP+=" -v"
4+
TEMPLATE=/etc/php$PHP_INSTALL_VERSION/php-fpm.d/www.conf.ep
5+
TARGET=/etc/php$PHP_INSTALL_VERSION/php-fpm.d/www.conf
6+
7+
if [ -f "$TEMPLATE" ]; then
8+
echo "- Prepare PHP-FPM www.conf file..."
9+
10+
$EP "$TEMPLATE"
11+
sudo mv "$TEMPLATE" "$TARGET"
12+
fi
13+
314
echo "Start up PHP-FPM..."
415

516
sudo -E LD_PRELOAD=/usr/lib/preloadable_libiconv.so php-fpm -F -R &

0 commit comments

Comments
 (0)