Skip to content

Commit

Permalink
Merge branch 'feature/ssp2-deps-update' into feature/ssp2-use-ssp1-fo…
Browse files Browse the repository at this point in the history
…r-sp [skip ci]
  • Loading branch information
briskt committed Jun 18, 2024
2 parents 92f508d + b817428 commit 03f7a60
Show file tree
Hide file tree
Showing 18 changed files with 104 additions and 141 deletions.
84 changes: 0 additions & 84 deletions Vagrantfile

This file was deleted.

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"simplesamlphp/simplesamlphp": "^2.0",
"simplesamlphp/composer-module-installer": "^1.0",
"rlanvin/php-ip": "^1.0",
"silinternational/ssp-utilities": "dev-develop",
"silinternational/ssp-utilities": "v2.0.0",
"silinternational/php-env": "^3.1.0",
"silinternational/psr3-adapters": "dev-develop",
"silinternational/psr3-adapters": "v4.0.0",
"silinternational/yii2-json-log-targets": "^2.0",
"silinternational/idp-id-broker-php-client": "^4.3",
"sinergi/browser-detector": "^6.1",
Expand Down
30 changes: 13 additions & 17 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion development/UserPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ public function __construct($info, $config)
$username = $userpass[0];
$password = $userpass[1];

// $attrUtils = new \SimpleSAML\Utils\Attributes();
//
// try {
// $attributes = \SimpleSAML\Utils\Attributes::normalizeAttributesArray($attributes);
// $attributes = $attrUtils->normalizeAttributesArray($attributes);
// } catch (\Exception $e) {
// throw new \Exception('Invalid attributes for user '.$username.
// ' in authentication source '.$this->authId.': '.$e->getMessage());
Expand Down
10 changes: 8 additions & 2 deletions development/sp-local/config/authsources-pwmanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@
'entityID' => 'http://pwmanager.local:8084',
'idp' => 'http://ssp-idp1.local:8085',
'discoURL' => null,
'NameIDPolicy' => "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent",
'NameIDPolicy' => [
'Format' => 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
'AllowCreate' => true,
],
],

'mfa-idp-no-port' => [
'saml:SP',
'entityID' => 'http://pwmanager.local',
'idp' => 'http://ssp-idp1.local',
'discoURL' => null,
'NameIDPolicy' => "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent",
'NameIDPolicy' => [
'Format' => 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
'AllowCreate' => true,
],
],
];
12 changes: 9 additions & 3 deletions development/sp-local/config/authsources.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@
'discoURL' => null,

// Tell the Hub which format to use for the NameID
'NameIDPolicy' => "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent",

'NameIDPolicy' => [
'Format' => 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
'AllowCreate' => true,
],

// Specify what private key to use (such as for decrypting assertions).
'privatekey' => 'saml.pem',
],
Expand All @@ -51,7 +54,10 @@
'discoURL' => null,

// Tell the Hub which format to use for the NameID
'NameIDPolicy' => "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent",
'NameIDPolicy' => [
'Format' => 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
'AllowCreate' => true,
],

// Specify what private key to use (such as for decrypting assertions).
'privatekey' => 'saml.pem',
Expand Down
7 changes: 6 additions & 1 deletion docs/editing_authprocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ The IdP's metadata needs to include an `'IDPNamespace'` entry with a string valu

In order for this to work, the SP needs to include a line in its authsources.php file in the Hub's entry ...

` 'NameIDPolicy' => "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent",`
```
'NameIDPolicy' => [
'Format' => 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
'AllowCreate' => true,
],
```

In addition, the IDP's sp-remote metadata stanza for the Hub needs to include ...

Expand Down
3 changes: 2 additions & 1 deletion modules/expirychecker/public/about2expire.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
}
}

HTTP::redirectTrustedURL($passwordChangeUrl, array());
$httpUtils = new HTTP();
$httpUtils->redirectTrustedURL($passwordChangeUrl, array());
}

$globalConfig = Configuration::getInstance();
Expand Down
3 changes: 2 additions & 1 deletion modules/expirychecker/public/expired.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
}
}

HTTP::redirectTrustedURL($passwordChangeUrl, array());
$httpUtils = new HTTP();
$httpUtils->redirectTrustedURL($passwordChangeUrl, array());
}

$globalConfig = Configuration::getInstance();
Expand Down
9 changes: 6 additions & 3 deletions modules/expirychecker/src/Auth/Process/ExpiryDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ public function redirect2PasswordChange(
'passwordChangeUrl' => $passwordChangeUrl,
]));

HTTP::redirectTrustedURL($passwordChangeUrl, array());
$httpUtils = new HTTP();
$httpUtils->redirectTrustedURL($passwordChangeUrl, array());
}

/**
Expand Down Expand Up @@ -367,7 +368,8 @@ public function redirectToExpiredPage(array &$state, string $accountName, int $e
$id = State::saveState($state, 'expirychecker:expired');
$url = Module::getModuleURL('expirychecker/expired.php');

HTTP::redirectTrustedURL($url, array('StateId' => $id));
$httpUtils = new HTTP();
$httpUtils->redirectTrustedURL($url, array('StateId' => $id));
}

/**
Expand Down Expand Up @@ -403,6 +405,7 @@ protected function redirectToWarningPage(array &$state, string $accountName, int
$id = State::saveState($state, 'expirychecker:about2expire');
$url = Module::getModuleURL('expirychecker/about2expire.php');

HTTP::redirectTrustedURL($url, array('StateId' => $id));
$httpUtils = new HTTP();
$httpUtils->redirectTrustedURL($url, array('StateId' => $id));
}
}
3 changes: 2 additions & 1 deletion modules/mfa/public/prompt-for-mfa.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
'mfaId' => $mfaOption['id'],
'StateId' => $stateId,
]);
HTTP::redirectTrustedURL($moduleUrl);
$httpUtils = new HTTP();
$httpUtils->redirectTrustedURL($moduleUrl);
return;
}
$mfaOption = Mfa::getMfaOptionById($mfaOptions, $mfaId);
Expand Down
3 changes: 2 additions & 1 deletion modules/mfa/public/send-manager-mfa.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
$moduleUrl = SimpleSAML\Module::getModuleURL('mfa/prompt-for-mfa.php', [
'StateId' => $stateId,
]);
HTTP::redirectTrustedURL($moduleUrl);
$httpUtils = new HTTP();
$httpUtils->redirectTrustedURL($moduleUrl);
}

$globalConfig = Configuration::getInstance();
Expand Down
Loading

0 comments on commit 03f7a60

Please sign in to comment.