WIP: host both service provider and identity provider for local dev
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,4 +5,5 @@
|
|||||||
/test.sql
|
/test.sql
|
||||||
/vendor/
|
/vendor/
|
||||||
/www/simplesaml
|
/www/simplesaml
|
||||||
|
/www/simplesaml-idp
|
||||||
composer.phar
|
composer.phar
|
||||||
|
|||||||
21
dist/identity-provider/authsources.php
vendored
Normal file
21
dist/identity-provider/authsources.php
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
$config = [
|
||||||
|
'admin' => [
|
||||||
|
'core:AdminPassword',
|
||||||
|
],
|
||||||
|
'example-userpass' => [
|
||||||
|
'exampleauth:UserPass',
|
||||||
|
'users' => [
|
||||||
|
'user:user' => [
|
||||||
|
'uid' => ['user'],
|
||||||
|
'eduPersonAffiliation' => ['member', 'student'],
|
||||||
|
],
|
||||||
|
'admin:admin' => [
|
||||||
|
'uid' => ['admin'],
|
||||||
|
'eduPersonAffiliation' => ['member', 'employee'],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
1411
dist/identity-provider/config.php
vendored
Normal file
1411
dist/identity-provider/config.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
dist/identity-provider/saml20-idp-hosted.php
vendored
Normal file
10
dist/identity-provider/saml20-idp-hosted.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
$metadata['http://localhost:1080/simplesaml-idp/'] = [
|
||||||
|
'host' => '__DEFAULT__',
|
||||||
|
'privatekey' => 'localhost.pem',
|
||||||
|
'certificate' => 'localhost.crt',
|
||||||
|
'auth' => 'example-userpass',
|
||||||
|
];
|
||||||
16
dist/identity-provider/saml20-sp-remote.php
vendored
Normal file
16
dist/identity-provider/saml20-sp-remote.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$metadata['http://localhost:1080/simplesaml/module.php/saml/sp/metadata.php/default-sp'] = [
|
||||||
|
'AssertionConsumerService' => [
|
||||||
|
[
|
||||||
|
'Location' => 'http://localhost:1080/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp',
|
||||||
|
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'SingleLogoutService' => [
|
||||||
|
[
|
||||||
|
'Location' => 'http://localhost:1080/simplesaml/module.php/saml/sp/saml2-logout.php/default-sp',
|
||||||
|
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
17
dist/service-provider/authsources.php
vendored
Normal file
17
dist/service-provider/authsources.php
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
$config = [
|
||||||
|
/* This is the name of this authentication source, and will be used to access it later. */
|
||||||
|
'default-sp' => [
|
||||||
|
'saml:SP',
|
||||||
|
'entityID' => 'https://www.pvv.ntnu.no/simplesaml/',
|
||||||
|
'idp' => 'https://idp.pvv.ntnu.no/',
|
||||||
|
],
|
||||||
|
|
||||||
|
'dev-sp' => [
|
||||||
|
'saml:SP',
|
||||||
|
'entityID' => 'http://localhost:1080/simplesaml/',
|
||||||
|
'idp' => 'http://localhost:1080/simplesaml-idp/',
|
||||||
|
],
|
||||||
|
];
|
||||||
@@ -336,7 +336,7 @@ $config = [
|
|||||||
* empty array.
|
* empty array.
|
||||||
*/
|
*/
|
||||||
'debug' => [
|
'debug' => [
|
||||||
'saml' => false,
|
'saml' => true,
|
||||||
'backtraces' => true,
|
'backtraces' => true,
|
||||||
'validatexml' => false,
|
'validatexml' => false,
|
||||||
],
|
],
|
||||||
@@ -348,8 +348,8 @@ $config = [
|
|||||||
* When 'errorreporting' is enabled, a form will be presented for the user to report
|
* When 'errorreporting' is enabled, a form will be presented for the user to report
|
||||||
* the error to 'technicalcontact_email'.
|
* the error to 'technicalcontact_email'.
|
||||||
*/
|
*/
|
||||||
'showerrors' => false,
|
'showerrors' => true,
|
||||||
'errorreporting' => true,
|
'errorreporting' => false,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When showerrors is true, this is an array of which errors
|
* When showerrors is true, this is an array of which errors
|
||||||
@@ -440,8 +440,10 @@ $config = [
|
|||||||
* must exist and be writable for SimpleSAMLphp. If set to something else, set
|
* must exist and be writable for SimpleSAMLphp. If set to something else, set
|
||||||
* loggingdir above to 'null'.
|
* loggingdir above to 'null'.
|
||||||
*/
|
*/
|
||||||
'logging.level' => SimpleSAML\Logger::NOTICE,
|
// 'logging.level' => SimpleSAML\Logger::NOTICE,
|
||||||
'logging.handler' => 'syslog',
|
// 'logging.handler' => 'syslog',
|
||||||
|
'logging.level' => SimpleSAML\Logger::DEBUG,
|
||||||
|
'logging.handler' => 'stderr',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Specify the format of the logs. Its use varies depending on the log handler used (for instance, you cannot
|
* Specify the format of the logs. Its use varies depending on the log handler used (for instance, you cannot
|
||||||
40
dist/service-provider/saml20-idp-remote.php
vendored
Normal file
40
dist/service-provider/saml20-idp-remote.php
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
$metadata['https://idp.pvv.ntnu.no/'] = [
|
||||||
|
'metadata-set' => 'saml20-idp-remote',
|
||||||
|
'entityid' => 'https://idp.pvv.ntnu.no/',
|
||||||
|
'SingleSignOnService' => [
|
||||||
|
0 => [
|
||||||
|
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
|
||||||
|
'Location' => 'https://idp.pvv.ntnu.no/simplesaml/saml2/idp/SSOService.php',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'SingleLogoutService' => [
|
||||||
|
0 => [
|
||||||
|
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
|
||||||
|
'Location' => 'https://idp.pvv.ntnu.no/simplesaml/saml2/idp/SingleLogoutService.php',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'certData' => 'MIIDpTCCAo2gAwIBAgIJAJIgibrB7NvsMA0GCSqGSIb3DQEBCwUAMGkxCzAJBgNVBAYTAk5PMR4wHAYDVQQKDBVQcm9ncmFtdmFyZXZlcmtzdGVkZXQxGDAWBgNVBAMMD2lkcC5wdnYubnRudS5ubzEgMB4GCSqGSIb3DQEJARYRZHJpZnRAcHZ2Lm50bnUubm8wHhcNMTcxMTEzMjI0NTQyWhcNMjcxMTEzMjI0NTQyWjBpMQswCQYDVQQGEwJOTzEeMBwGA1UECgwVUHJvZ3JhbXZhcmV2ZXJrc3RlZGV0MRgwFgYDVQQDDA9pZHAucHZ2Lm50bnUubm8xIDAeBgkqhkiG9w0BCQEWEWRyaWZ0QHB2di5udG51Lm5vMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAveLujCsgVCRA360y5yezy8FcSPhaqodggDqY12UTkYOMQLBFaph6uUL4oCUlXZqxScrAYVRt9yw+7BYpcm0p51VZzVCsfMxRVkn+O1eUvsaXq3f13f87QHKYP2f0uqkGf5PvnKIdSaI/ix8WJhD8XT+h0OkHEcaBvUtSG7zbEhvG21WPHwgw2rvZSneArQ8tOitZC0u8VXSfdhtf6ynRseo0xC95634UwQAZivhQ2v4A6Tp57QG5DCXIJ9/z3PkINx3KB/hOeh0EP6Dpbp+7V0/t9778E3whpm4llrH144kzROhA7EgUgkZOjAVjxGCYlcj3xQPnnItihVOZ5B5qLwIDAQABo1AwTjAdBgNVHQ4EFgQUPLhrB+Qb/Kzz7Car9GJkKmEkz6swHwYDVR0jBBgwFoAUPLhrB+Qb/Kzz7Car9GJkKmEkz6swDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAd+4E6t0j8/p8rbZE8y/gZ9GsiRhxkR4l6JbMRUfEpqHKi415qstChRcP2Lo3Yd5qdmj9tLDWoPsqet1QgyTTmQTgUmPhhMOQDqSh90LuqEJseKWafXGS/SfWLH6MWVmzDV5YofJEw2ThPiU58GiS06OLS2poq1eAesa2LQ22J8yYisXM4sxImIFte+LYQ1+1evfBWcvU1vrGsQ0VLJHdef9WoXp1swUFhq4Zk0c7gjHiB1CFVlExAAlk9L6W3CVXmKIYlf4eUnEBGkC061Ir42+uhAMWO9Y/L1NEuboTyd2KAI/6JdKdzpmfk7zPVxWlNxNCZ7OPNuvOKp6VlpB2EA==',
|
||||||
|
'NameIDFormat' => 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient',
|
||||||
|
];
|
||||||
|
|
||||||
|
$metadata['http://localhost:1080/simplesaml-idp/'] = [
|
||||||
|
'metadata-set' => 'saml20-idp-remote',
|
||||||
|
'entityid' => 'https://localhost:1080/',
|
||||||
|
'SingleSignOnService' => [
|
||||||
|
0 => [
|
||||||
|
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
|
||||||
|
'Location' => 'http://localhost:1080/simplesaml-idp/simplesaml/saml2/idp/SSOService.php',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'SingleLogoutService' => [
|
||||||
|
0 => [
|
||||||
|
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
|
||||||
|
'Location' => 'http://localhost:1080/simplesaml-idp/simplesaml/saml2/idp/SingleLogoutService.php',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'NameIDFormat' => 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient',
|
||||||
|
];
|
||||||
12
dist/simplesamlphp-authsources.php
vendored
12
dist/simplesamlphp-authsources.php
vendored
@@ -1,12 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
$config = [
|
|
||||||
|
|
||||||
/* This is the name of this authentication source, and will be used to access it later. */
|
|
||||||
'default-sp' => [
|
|
||||||
'saml:SP',
|
|
||||||
'entityID' => 'https://www.pvv.ntnu.no/simplesaml/',
|
|
||||||
'idp' => 'https://idp.pvv.ntnu.no/',
|
|
||||||
],
|
|
||||||
];
|
|
||||||
21
dist/simplesamlphp-idp.php
vendored
21
dist/simplesamlphp-idp.php
vendored
@@ -1,21 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
$metadata['https://idp.pvv.ntnu.no/'] = [
|
|
||||||
'metadata-set' => 'saml20-idp-remote',
|
|
||||||
'entityid' => 'https://idp.pvv.ntnu.no/',
|
|
||||||
'SingleSignOnService' => [
|
|
||||||
0 => [
|
|
||||||
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
|
|
||||||
'Location' => 'https://idp.pvv.ntnu.no/simplesaml/saml2/idp/SSOService.php',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'SingleLogoutService' => [
|
|
||||||
0 => [
|
|
||||||
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
|
|
||||||
'Location' => 'https://idp.pvv.ntnu.no/simplesaml/saml2/idp/SingleLogoutService.php',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'certData' => 'MIIDpTCCAo2gAwIBAgIJAJIgibrB7NvsMA0GCSqGSIb3DQEBCwUAMGkxCzAJBgNVBAYTAk5PMR4wHAYDVQQKDBVQcm9ncmFtdmFyZXZlcmtzdGVkZXQxGDAWBgNVBAMMD2lkcC5wdnYubnRudS5ubzEgMB4GCSqGSIb3DQEJARYRZHJpZnRAcHZ2Lm50bnUubm8wHhcNMTcxMTEzMjI0NTQyWhcNMjcxMTEzMjI0NTQyWjBpMQswCQYDVQQGEwJOTzEeMBwGA1UECgwVUHJvZ3JhbXZhcmV2ZXJrc3RlZGV0MRgwFgYDVQQDDA9pZHAucHZ2Lm50bnUubm8xIDAeBgkqhkiG9w0BCQEWEWRyaWZ0QHB2di5udG51Lm5vMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAveLujCsgVCRA360y5yezy8FcSPhaqodggDqY12UTkYOMQLBFaph6uUL4oCUlXZqxScrAYVRt9yw+7BYpcm0p51VZzVCsfMxRVkn+O1eUvsaXq3f13f87QHKYP2f0uqkGf5PvnKIdSaI/ix8WJhD8XT+h0OkHEcaBvUtSG7zbEhvG21WPHwgw2rvZSneArQ8tOitZC0u8VXSfdhtf6ynRseo0xC95634UwQAZivhQ2v4A6Tp57QG5DCXIJ9/z3PkINx3KB/hOeh0EP6Dpbp+7V0/t9778E3whpm4llrH144kzROhA7EgUgkZOjAVjxGCYlcj3xQPnnItihVOZ5B5qLwIDAQABo1AwTjAdBgNVHQ4EFgQUPLhrB+Qb/Kzz7Car9GJkKmEkz6swHwYDVR0jBBgwFoAUPLhrB+Qb/Kzz7Car9GJkKmEkz6swDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAd+4E6t0j8/p8rbZE8y/gZ9GsiRhxkR4l6JbMRUfEpqHKi415qstChRcP2Lo3Yd5qdmj9tLDWoPsqet1QgyTTmQTgUmPhhMOQDqSh90LuqEJseKWafXGS/SfWLH6MWVmzDV5YofJEw2ThPiU58GiS06OLS2poq1eAesa2LQ22J8yYisXM4sxImIFte+LYQ1+1evfBWcvU1vrGsQ0VLJHdef9WoXp1swUFhq4Zk0c7gjHiB1CFVlExAAlk9L6W3CVXmKIYlf4eUnEBGkC061Ir42+uhAMWO9Y/L1NEuboTyd2KAI/6JdKdzpmfk7zPVxWlNxNCZ7OPNuvOKp6VlpB2EA==',
|
|
||||||
'NameIDFormat' => 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient',
|
|
||||||
];
|
|
||||||
@@ -19,7 +19,7 @@ $pdo = new PDO($DB_DSN, $DB_USER, $DB_PASS);
|
|||||||
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
$userManager = new pvv\admin\UserManager($pdo);
|
$userManager = new pvv\admin\UserManager($pdo);
|
||||||
|
|
||||||
$sp = 'default-sp';
|
$sp = 'dev-sp';
|
||||||
$as = new SimpleSAML\Auth\Simple($sp);
|
$as = new SimpleSAML\Auth\Simple($sp);
|
||||||
|
|
||||||
use pvv\side\Agenda;
|
use pvv\side\Agenda;
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ function navbar($depth, $active = null) {
|
|||||||
|
|
||||||
function loginBar($sp = null, $pdo = null) {
|
function loginBar($sp = null, $pdo = null) {
|
||||||
if (null === $sp) {
|
if (null === $sp) {
|
||||||
$sp = 'default-sp';
|
// $sp = 'dev-sp';
|
||||||
|
$sp = 'dev-sp';
|
||||||
}
|
}
|
||||||
$result = "\n";
|
$result = "\n";
|
||||||
require_once __DIR__ . '/../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
|
|||||||
@@ -4,7 +4,22 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
php.buildComposerProject rec {
|
php.buildComposerProject rec {
|
||||||
src = ./..;
|
src = lib.fileset.toSource {
|
||||||
|
root = ./..;
|
||||||
|
fileset = lib.fileset.difference
|
||||||
|
(lib.fileset.unions [
|
||||||
|
../dist
|
||||||
|
../inc
|
||||||
|
../src
|
||||||
|
../www
|
||||||
|
../composer.json
|
||||||
|
../composer.lock
|
||||||
|
])
|
||||||
|
(lib.fileset.unions [
|
||||||
|
(lib.fileset.maybeMissing ../www/simplesaml)
|
||||||
|
(lib.fileset.maybeMissing ../www/simplesaml-idp)
|
||||||
|
]);
|
||||||
|
};
|
||||||
pname = "pvv-nettsiden";
|
pname = "pvv-nettsiden";
|
||||||
version = "0.0.1";
|
version = "0.0.1";
|
||||||
vendorHash = "sha256-7I7Fdp5DvCwCdYY66Mv0hZ+a8xRzQt+WMUKG544k7Fc=";
|
vendorHash = "sha256-7I7Fdp5DvCwCdYY66Mv0hZ+a8xRzQt+WMUKG544k7Fc=";
|
||||||
@@ -12,9 +27,9 @@ php.buildComposerProject rec {
|
|||||||
passthru.simplesamlphpPath = "share/php/pvv-nettsiden/vendor/simplesamlphp/simplesamlphp";
|
passthru.simplesamlphpPath = "share/php/pvv-nettsiden/vendor/simplesamlphp/simplesamlphp";
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
install -Dm644 dist/simplesamlphp-config.php $out/${passthru.simplesamlphpPath}/config/config.php
|
install -Dm644 dist/service-provider/config.php $out/${passthru.simplesamlphpPath}/config/config.php
|
||||||
install -Dm644 dist/simplesamlphp-authsources.php $out/${passthru.simplesamlphpPath}/config/authsources.php
|
install -Dm644 dist/service-provider/authsources.php $out/${passthru.simplesamlphpPath}/config/authsources.php
|
||||||
install -Dm644 dist/simplesamlphp-idp.php $out/${passthru.simplesamlphpPath}/metadata/saml20-idp-remote.php
|
install -Dm644 dist/service-provider/saml20-idp-remote.php $out/${passthru.simplesamlphpPath}/metadata/saml20-idp-remote.php
|
||||||
install -Dm644 dist/config.source-env.php $out/share/php/pvv-nettsiden/config.php
|
install -Dm644 dist/config.source-env.php $out/share/php/pvv-nettsiden/config.php
|
||||||
|
|
||||||
${lib.pipe extra_files [
|
${lib.pipe extra_files [
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ pkgs.mkShellNoCC {
|
|||||||
php84Packages.php-cs-fixer
|
php84Packages.php-cs-fixer
|
||||||
sqlite-interactive
|
sqlite-interactive
|
||||||
sql-formatter
|
sql-formatter
|
||||||
|
openssl
|
||||||
];
|
];
|
||||||
|
|
||||||
# Prepare dev environment with sqlite and config files
|
# Prepare dev environment with sqlite and config files
|
||||||
@@ -21,20 +22,40 @@ pkgs.mkShellNoCC {
|
|||||||
declare -a PROJECT_ROOT="$("${lib.getExe pkgs.git}" rev-parse --show-toplevel)"
|
declare -a PROJECT_ROOT="$("${lib.getExe pkgs.git}" rev-parse --show-toplevel)"
|
||||||
|
|
||||||
mkdir -p "$PROJECT_ROOT/www/galleri/bilder/slideshow"
|
mkdir -p "$PROJECT_ROOT/www/galleri/bilder/slideshow"
|
||||||
test -e "$PROJECT_ROOT/pvv.sqlite" || sqlite3 "$PROJECT_ROOT/pvv.sqlite" < "$PROJECT_ROOT/dist/pvv_sqlite.sql"
|
test -e "$PROJECT_ROOT/pvv.sqlite" || sqlite3 "$PROJECT_ROOT/pvv.sqlite" < "$PROJECT_ROOT/dist/sql/pvv_sqlite.sql"
|
||||||
test -e "$PROJECT_ROOT/config.php" || cp -v "$PROJECT_ROOT/dist/config.local.php" "$PROJECT_ROOT/config.php"
|
test -e "$PROJECT_ROOT/config.php" || cp -v "$PROJECT_ROOT/dist/config.local.php" "$PROJECT_ROOT/config.php"
|
||||||
|
|
||||||
if [ ! -d "$PROJECT_ROOT/vendor" ] ; then
|
if [ ! -d "$PROJECT_ROOT/vendor" ] ; then
|
||||||
pushd "$PROJECT_ROOT"
|
pushd "$PROJECT_ROOT"
|
||||||
composer install || exit $?
|
composer install || exit $?
|
||||||
|
|
||||||
cp dist/simplesamlphp-authsources.php vendor/simplesamlphp/simplesamlphp/config/authsources.php
|
cp -r vendor/simplesamlphp vendor/simplesamlphp-idp
|
||||||
cp dist/simplesamlphp-idp.php vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php
|
|
||||||
cp dist/simplesamlphp-config.php vendor/simplesamlphp/simplesamlphp/config/config.php
|
# Set up SimpleSAMLphp service provider
|
||||||
|
install dist/service-provider/authsources.php vendor/simplesamlphp/simplesamlphp/config/authsources.php
|
||||||
|
install dist/service-provider/config.php vendor/simplesamlphp/simplesamlphp/config/config.php
|
||||||
|
install dist/service-provider/saml20-idp-remote.php vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php
|
||||||
|
|
||||||
|
# Set up SimpleSAMLphp identity provider (for local testing)
|
||||||
|
install dist/identity-provider/authsources.php vendor/simplesamlphp-idp/simplesamlphp/config/authsources.php
|
||||||
|
install dist/identity-provider/config.php vendor/simplesamlphp-idp/simplesamlphp/config/config.php
|
||||||
|
install dist/identity-provider/saml20-idp-hosted.php vendor/simplesamlphp-idp/simplesamlphp/metadata/saml20-idp-hosted.php
|
||||||
|
install dist/identity-provider/saml20-sp-remote.php vendor/simplesamlphp-idp/simplesamlphp/metadata/saml20-sp-remote.php
|
||||||
|
|
||||||
|
openssl req \
|
||||||
|
-newkey rsa:4096 \
|
||||||
|
-new \
|
||||||
|
-x509 \
|
||||||
|
-days 3652 \
|
||||||
|
-nodes \
|
||||||
|
-out vendor/simplesamlphp-idp/simplesamlphp/cert/localhost.crt \
|
||||||
|
-keyout vendor/simplesamlphp-idp/simplesamlphp/cert/localhost.pem \
|
||||||
|
-subj "/C=NO/ST=Trondheim/L=Trondheim/O=Programvareverkstedet/CN=localhost"
|
||||||
|
|
||||||
cp dist/config.local.php config.php
|
cp dist/config.local.php config.php
|
||||||
|
|
||||||
ln -s ../vendor/simplesamlphp/simplesamlphp/public/ www/simplesaml
|
ln -s ../vendor/simplesamlphp/simplesamlphp/public/ www/simplesaml
|
||||||
|
ln -s ../vendor/simplesamlphp-idp/simplesamlphp/public/ www/simplesaml-idp
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|||||||
$userManager = new pvv\admin\UserManager($pdo);
|
$userManager = new pvv\admin\UserManager($pdo);
|
||||||
|
|
||||||
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
$uname = $attrs['uid'][0];
|
$uname = $attrs['uid'][0];
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|||||||
$userManager = new pvv\admin\UserManager($pdo);
|
$userManager = new pvv\admin\UserManager($pdo);
|
||||||
|
|
||||||
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
$uname = $attrs['uid'][0];
|
$uname = $attrs['uid'][0];
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|||||||
$userManager = new pvv\admin\UserManager($pdo);
|
$userManager = new pvv\admin\UserManager($pdo);
|
||||||
|
|
||||||
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
$uname = $attrs['uid'][0];
|
$uname = $attrs['uid'][0];
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|||||||
$userManager = new pvv\admin\UserManager($pdo);
|
$userManager = new pvv\admin\UserManager($pdo);
|
||||||
|
|
||||||
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
$uname = $attrs['uid'][0];
|
$uname = $attrs['uid'][0];
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ require __DIR__ . '/../../../inc/navbar.php';
|
|||||||
require __DIR__ . '/../../../src/_autoload.php';
|
require __DIR__ . '/../../../src/_autoload.php';
|
||||||
require __DIR__ . '/../../../config.php';
|
require __DIR__ . '/../../../config.php';
|
||||||
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
|
|
||||||
$pdo = new PDO($DB_DSN, $DB_USER, $DB_PASS);
|
$pdo = new PDO($DB_DSN, $DB_USER, $DB_PASS);
|
||||||
@@ -15,7 +15,7 @@ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|||||||
$userManager = new pvv\admin\UserManager($pdo);
|
$userManager = new pvv\admin\UserManager($pdo);
|
||||||
|
|
||||||
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
$uname = $attrs['uid'][0];
|
$uname = $attrs['uid'][0];
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|||||||
$userManager = new pvv\admin\UserManager($pdo);
|
$userManager = new pvv\admin\UserManager($pdo);
|
||||||
|
|
||||||
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
$uname = $attrs['uid'][0];
|
$uname = $attrs['uid'][0];
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ $pdo = new PDO($DB_DSN, $DB_USER, $DB_PASS);
|
|||||||
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
$userManager = new pvv\admin\UserManager($pdo);
|
$userManager = new pvv\admin\UserManager($pdo);
|
||||||
|
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
$uname = $attrs['uid'][0];
|
$uname = $attrs['uid'][0];
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ require __DIR__ . '/../../../inc/navbar.php';
|
|||||||
require __DIR__ . '/../../../src/_autoload.php';
|
require __DIR__ . '/../../../src/_autoload.php';
|
||||||
require __DIR__ . '/../../../config.php';
|
require __DIR__ . '/../../../config.php';
|
||||||
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
|
|
||||||
$pdo = new PDO($DB_DSN, $DB_USER, $DB_PASS);
|
$pdo = new PDO($DB_DSN, $DB_USER, $DB_PASS);
|
||||||
@@ -15,7 +15,7 @@ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|||||||
$userManager = new pvv\admin\UserManager($pdo);
|
$userManager = new pvv\admin\UserManager($pdo);
|
||||||
|
|
||||||
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
$uname = $attrs['uid'][0];
|
$uname = $attrs['uid'][0];
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|||||||
$userManager = new pvv\admin\UserManager($pdo);
|
$userManager = new pvv\admin\UserManager($pdo);
|
||||||
|
|
||||||
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
$uname = $attrs['uid'][0];
|
$uname = $attrs['uid'][0];
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|||||||
$userManager = new pvv\admin\UserManager($pdo);
|
$userManager = new pvv\admin\UserManager($pdo);
|
||||||
|
|
||||||
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
$uname = $attrs['uid'][0];
|
$uname = $attrs['uid'][0];
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|||||||
$userManager = new pvv\admin\UserManager($pdo);
|
$userManager = new pvv\admin\UserManager($pdo);
|
||||||
|
|
||||||
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
$uname = $attrs['uid'][0];
|
$uname = $attrs['uid'][0];
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|||||||
$userManager = new pvv\admin\UserManager($pdo);
|
$userManager = new pvv\admin\UserManager($pdo);
|
||||||
|
|
||||||
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
$uname = $attrs['uid'][0];
|
$uname = $attrs['uid'][0];
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|||||||
$userManager = new pvv\admin\UserManager($pdo);
|
$userManager = new pvv\admin\UserManager($pdo);
|
||||||
|
|
||||||
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
$uname = $attrs['uid'][0];
|
$uname = $attrs['uid'][0];
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|||||||
|
|
||||||
$userManager = new pvv\admin\UserManager($pdo);
|
$userManager = new pvv\admin\UserManager($pdo);
|
||||||
|
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
$loginname = $attrs['uid'][0];
|
$loginname = $attrs['uid'][0];
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ require __DIR__ . '/../../src/_autoload.php';
|
|||||||
require __DIR__ . '/../../config.php';
|
require __DIR__ . '/../../config.php';
|
||||||
|
|
||||||
require_once __DIR__ . '/../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ if (isset($_GET['id'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
require_once __DIR__ . '/../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
|
|
||||||
$projectManager = new pvv\side\ProjectManager($pdo);
|
$projectManager = new pvv\side\ProjectManager($pdo);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ require __DIR__ . '/../../src/_autoload.php';
|
|||||||
require __DIR__ . '/../../config.php';
|
require __DIR__ . '/../../config.php';
|
||||||
|
|
||||||
require_once __DIR__ . '/../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ if (!isset($_POST['title']) || !isset($_POST['desc']) || !isset($_POST['active']
|
|||||||
}
|
}
|
||||||
|
|
||||||
require_once __DIR__ . '/../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
require_once __DIR__ . '/../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php';
|
||||||
$as = new SimpleSAML\Auth\Simple('default-sp');
|
$as = new SimpleSAML\Auth\Simple('dev-sp');
|
||||||
$as->requireAuth();
|
$as->requireAuth();
|
||||||
$attrs = $as->getAttributes();
|
$attrs = $as->getAttributes();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user