Skip to content

Commit f382865

Browse files
author
Boy Baukema
committed
Merge pull request #95 from OpenConext/develop
[WIP] EB 4.3.0
2 parents c50bbb8 + 7e14bf5 commit f382865

File tree

170 files changed

+2167
-6751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+2167
-6751
lines changed

application/configs/application.ini

Lines changed: 39 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
;;;
2-
; Ini configuration for EngineBlock for all known environments.
2+
; Default ini configuration for OpenConext EngineBlock.
33
;
4-
; Divided in sections per environment like so:
5-
; [acceptance : base]
6-
;
7-
; Meaning 'these are the settings for the acceptance environment,
8-
; based on the base env (inherits from base)'
4+
; You can override this in /etc/openconext/engineblock.ini.
95
;
106
; Editting Rules:
117
; 1. The first rule of INI files is, you do not talk about INI files.
128
; 2. The second rule of INI files is is, you DO NOT talk about INI files.
139
; 3. Names in camelCase (note first character is lowerCase)
14-
; 4. Every configuration item should be present and documented for [base]
15-
; 5. All environments extend from base
16-
; 7. Section inheritance only works one level deep
17-
; 8. If this is your first time editing an INI file, have fun!
10+
; 4. Every configuration item should be present and documented for in application/configs/application.ini
11+
; 5. If this is your first time editing an INI file, have fun!
1812
;;;
1913
[base]
2014

@@ -90,7 +84,7 @@ auth.simplesamlphp.idp.certificate= "/etc/openconext/engineblock.crt"
9084
; Note "123" means no access
9185
auth.simplesamlphp.adminPassword = "123"
9286

93-
auth.simplesamlphp.baseurlpath = "simplesamlphp/"
87+
auth.simplesamlphp.baseurlpath = "simplesaml/"
9488

9589
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
9690
;;;;;;;;;;;; LOGGING / ERROR HANDLING ;;;;;;;;;;
@@ -252,10 +246,34 @@ api.vovalidate.baseUrl = "https://api.demo.openconext.org"
252246
api.vovalidate.key = "oauth_key"
253247
api.vovalidate.secret = "oauth_secret"
254248

249+
250+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
251+
;;;;;;;;;;;;;;; CRONJOB SETTINGS ;;;;;;;;;;;;;;;
252+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
253+
254+
; The time after which a user is deprovisioned
255+
cron.deprovision.idleTime = "6 months"
256+
257+
; Warning time settings
258+
cron.deprovision.firstWarningTime = "4 weeks" ; Period before the idleTime
259+
cron.deprovision.secondWarningTime = "2 weeks" ; Period before the idleTime
260+
261+
cron.deprovision.sendGroupMemberWarning = true ; do we send mails to teammembers who are about to loose their only admin
262+
cron.deprovision.sendDeprovisionWarning = true ; do we send mails as warnings
263+
264+
255265
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
256266
;;;;;;;;;;;; MISCELLANEOUS SETTINGS ;;;;;;;;;;;;
257267
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
258268

269+
; the value for guest qualifier. Can be overridden for specific non-surfnet environments
270+
addgueststatus.guestqualifier = "urn:collab:org:surf.nl"
271+
272+
; Language Cookie settings
273+
cookie.lang.domain = ".surfconext.nl"
274+
; Cookie expiry time, specify the time in seconds, set empty to let the cookie get expired after the session
275+
cookie.lang.expiry = 5184000 ; 60 days in seconds
276+
259277
; Skip the asset compiling and use the source .js files.
260278
dynamicAssets = false
261279

@@ -264,20 +282,18 @@ defaults.header = "SURFconext"
264282
defaults.subheader = ""
265283
defaults.layout = "1-column-blue-grey"
266284

267-
; Profile URI settings
268-
profile.protocol = "https"
269-
profile.host = "profile.surfconext.nl"
270-
271-
; Language Cookie settings
272-
cookie.lang.domain = ".surfconext.nl"
273-
; Cookie expiry time, specify the time in seconds, set empty to let the cookie get expired after the session
274-
cookie.lang.expiry = 5184000 ; 60 days in seconds
275-
276285
; EngineBlock default Group Provider ID
277286
; This identifier is used when fetching the group provider configuration for deprovisioning
278287
; In our case this identifier should point to the Grouper group provider
279288
defaultGroupProvider = "grouper"
280289

290+
; edugain metadata
291+
edugain.publication.publisher = "https://engine.surfconext.nl/authentication/proxy/edugain-metadata"
292+
edugain.publication.policy = "http://www.edugain.org/policy/metadata-tou_1_0.txt"
293+
edugain.registration.authority = "http://www.surfconext.nl/"
294+
edugain.registration.policy = "https://wiki.surfnetlabs.nl/display/eduGAIN/EduGAIN"
295+
edugain.termsOfUse = "Use of this metadata is subject to the Terms of Use at http://www.edugain.org/policy/metadata-tou_1_0.txt"
296+
281297
; Do we send welcome emails
282298
email.sendWelcomeMail = false
283299

@@ -295,31 +311,9 @@ email.idpDebugging.subject = "IdP debug info van %1$s"
295311
; terms of use surfconext
296312
openconext.termsOfUse = "https://wiki.surfnetlabs.nl/display/conextsupport/Terms+of+Service+%28EN%29"
297313

298-
; edugain metadata
299-
edugain.registration.authority = "http://www.surfconext.nl/"
300-
edugain.registration.policy = "https://wiki.surfnetlabs.nl/display/eduGAIN/EduGAIN"
301-
302-
edugain.publication.publisher = "https://engine.surfconext.nl/authentication/proxy/edugain-metadata"
303-
edugain.publication.policy = "http://www.edugain.org/policy/metadata-tou_1_0.txt"
304-
305-
edugain.termsOfUse = "Use of this metadata is subject to the Terms of Use at http://www.edugain.org/policy/metadata-tou_1_0.txt"
306-
307-
; the value for guest qualifier. Can be overridden for specific non-surfnet environments
308-
addgueststatus.guestqualifier = "urn:collab:org:surf.nl"
309-
310-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
311-
;;;;;;;;;;;;;;; CRONJOB SETTINGS ;;;;;;;;;;;;;;;
312-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
313-
314-
; The time after which a user is deprovisioned
315-
cron.deprovision.idleTime = "6 months"
316-
317-
; Warning time settings
318-
cron.deprovision.firstWarningTime = "4 weeks" ; Period before the idleTime
319-
cron.deprovision.secondWarningTime = "2 weeks" ; Period before the idleTime
320-
321-
cron.deprovision.sendGroupMemberWarning = true ; do we send mails to teammembers who are about to loose their only admin
322-
cron.deprovision.sendDeprovisionWarning = true ; do we send mails as warnings
314+
; Profile URI settings
315+
profile.protocol = "https"
316+
profile.host = "profile.surfconext.nl"
323317

324318
; Configure trusted proxies to use their X-Forwarded-For header.
325319
; trustedProxyIps[] = 192.168.1.1

application/layouts/scripts/1-column-blue-grey-narrow.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require PARTIAL_DIR . 'header-start.php';
1010
</head>
1111
<body class="index">
1212
<div id="wrapper">
13-
<div id="header"><b><font size="4"><?php echo htmlentities($this->layout()->header, 0, "UTF-8"); ?></font></b></div>
13+
<div id="header"><h4><?php echo htmlentities($this->layout()->header, 0, "UTF-8"); ?></h4></div>
1414
<div id="main">
1515

1616
<?php require PARTIAL_DIR . 'nav.php'; ?>
@@ -20,8 +20,8 @@ require PARTIAL_DIR . 'header-start.php';
2020
<?php echo $this->layout()->content; ?>
2121

2222
<div class="bottom">
23+
<hr />
2324
<p>
24-
<hr />
2525
<?php echo $this->layout()->footerText; ?>
2626
</p>
2727
</div>

application/layouts/scripts/1-column-blue-grey.phtml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
/** @var Zend_View $this */
23
define('PARTIAL_DIR', __DIR__ . '/partials/');
34
require PARTIAL_DIR . 'header-start.php';
45
?>
@@ -26,10 +27,10 @@ require PARTIAL_DIR . 'header-start.php';
2627
<!-- Language selection -->
2728
<ul class="nav">
2829
<li class="<?php if ($lang==='en'): ?>active<?php endif; ?>">
29-
<a href="<?php echo EngineBlock_View::setLanguage('en'); ?>">EN</a>
30+
<a href="<?php echo EngineBlock_View::htmlSpecialCharsText(EngineBlock_View::setLanguage('en')); ?>">EN</a>
3031
</li>
3132
<li class="<?php if ($lang==='nl'): ?>active<?php endif; ?>">
32-
<a href="<?php echo EngineBlock_View::setLanguage('nl'); ?>">NL</a>
33+
<a href="<?php echo EngineBlock_View::htmlSpecialCharsText(EngineBlock_View::setLanguage('nl')); ?>">NL</a>
3334
</li>
3435
</ul>
3536

application/layouts/scripts/partials/header-start.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php require __DIR__ . '/lang.php'; ?>
2-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3-
<html xmlns="http://www.w3.org/1999/xhtml">
2+
<!DOCTYPE html>
3+
<html>
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
66
<meta name="robots" content="noindex, nofollow"/>

application/layouts/scripts/partials/nav.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<!-- Language selection -->
22
<ul class="nav">
33
<li class="<?php if ($lang==='en'): ?>active<?php endif; ?>">
4-
<a href="<?php echo EngineBlock_View::setLanguage('en'); ?>">EN</a>
4+
<a href="<?php echo EngineBlock_View::htmlSpecialCharsText(EngineBlock_View::setLanguage('en')); ?>">EN</a>
55
</li>
66
<li class="<?php if ($lang==='nl'): ?>active<?php endif; ?>">
7-
<a href="<?php echo EngineBlock_View::setLanguage('nl'); ?>">NL</a>
7+
<a href="<?php echo EngineBlock_View::htmlSpecialCharsText(EngineBlock_View::setLanguage('nl')); ?>">NL</a>
88
</li>
99
<?php if (EngineBlock_View::moduleName() == 'profile'): ?>
1010
<li data-external-link="true">

application/modules/Authentication/Controller/Feedback.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ public function receivedInvalidResponseAction()
6666
// @todo Send 4xx or 5xx header?
6767
}
6868

69+
public function receivedInvalidSignedResponseAction()
70+
{
71+
// @todo Send 4xx or 5xx header?
72+
}
73+
6974
public function noIdpsAction()
7075
{
7176
// @todo Send 4xx or 5xx header?

application/modules/Authentication/Controller/Proxy.php

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
class Authentication_Controller_Proxy extends EngineBlock_Controller_Abstract
44
{
5-
/**
6-
*
7-
*
8-
* @param string $encodedIdPEntityId
9-
* @return void
10-
*/
115
public function idPsMetaDataAction()
126
{
137
$this->setNoRender();
@@ -22,27 +16,29 @@ public function idPsMetaDataAction()
2216
} else if (substr($argument, 0, 4) === 'key:') {
2317
$proxyServer->setKeyId(substr($argument, 4));
2418
} else {
25-
EngineBlock_ApplicationSingleton::getInstance()->getLogInstance()->notice(
19+
$application->getLogInstance()->notice(
2620
"Ignoring unknown argument '$argument'."
2721
);
2822
}
2923
}
3024
$proxyServer->idPsMetadata();
31-
} catch(EngineBlock_Corto_ProxyServer_UnknownRemoteEntityException $e) {
25+
}
26+
catch(EngineBlock_Corto_ProxyServer_UnknownRemoteEntityException $e) {
3227
$application->getLogInstance()->log(
3328
"Unknown remote entity: " . $e->getEntityId(),
3429
EngineBlock_Log::NOTICE,
3530
EngineBlock_Log_Message_AdditionalInfo::createFromException($e)
3631
);
3732
$application->handleExceptionWithFeedback($e,
3833
'/authentication/feedback/unknown-service-provider?entity-id=' . urlencode($e->getEntityId()));
39-
} catch(Janus_Client_CacheProxy_Exception $e) {
34+
}
35+
catch(Janus_Client_CacheProxy_Exception $e) {
4036
$application->getLogInstance()->log(
4137
"Unknown Service Provider?",
4238
EngineBlock_Log::NOTICE,
4339
EngineBlock_Log_Message_AdditionalInfo::createFromException($e)
4440
);
45-
$spEntityId = EngineBlock_ApplicationSingleton::getInstance()->getHttpRequest()->getQueryParameter('sp-entity-id');
41+
$spEntityId = $application->getHttpRequest()->getQueryParameter('sp-entity-id');
4642
$application->handleExceptionWithFeedback($e,
4743
'/authentication/feedback/unknown-service-provider?entity-id=' . urlencode($spEntityId));
4844
}
@@ -54,38 +50,42 @@ public function edugainMetaDataAction()
5450

5551
$application = EngineBlock_ApplicationSingleton::getInstance();
5652

57-
$queryString = EngineBlock_ApplicationSingleton::getInstance()->getHttpRequest()->getQueryString();
53+
$queryString = $application->getHttpRequest()->getQueryString();
5854
$proxyServer = new EngineBlock_Corto_Adapter();
5955

6056
foreach (func_get_args() as $argument) {
6157
if (substr($argument, 0, 4) === 'key:') {
6258
$proxyServer->setKeyId(substr($argument, 4));
6359
} else {
64-
EngineBlock_ApplicationSingleton::getInstance()->getLogInstance()->notice(
60+
$application->getLogInstance()->notice(
6561
"Ignoring unknown argument '$argument'."
6662
);
6763
}
6864
}
6965

7066
try {
7167
$proxyServer->edugainMetadata($queryString);
72-
} catch(EngineBlock_Corto_ProxyServer_UnknownRemoteEntityException $e) {
68+
}
69+
catch(EngineBlock_Corto_ProxyServer_UnknownRemoteEntityException $e) {
7370
$application->getLogInstance()->log(
7471
"Unknown Service Provider?",
7572
EngineBlock_Log::NOTICE,
7673
EngineBlock_Log_Message_AdditionalInfo::createFromException($e)
7774
);
78-
$application->handleExceptionWithFeedback($e,
75+
$application->handleExceptionWithFeedback(
76+
$e,
7977
'/authentication/feedback/unknown-service-provider?entity-id=' . urlencode($e->getEntityId())
8078
);
81-
} catch(Janus_Client_CacheProxy_Exception $e) {
82-
$spEntityId = EngineBlock_ApplicationSingleton::getInstance()->getHttpRequest()->getQueryParameter('sp-entity-id');
79+
}
80+
catch(Janus_Client_CacheProxy_Exception $e) {
81+
$spEntityId = $application->getHttpRequest()->getQueryParameter('sp-entity-id');
8382
$application->getLogInstance()->log(
8483
"Unknown Service Provider '$spEntityId'?",
8584
EngineBlock_Log::NOTICE,
8685
EngineBlock_Log_Message_AdditionalInfo::createFromException($e)
8786
);
88-
$application->handleExceptionWithFeedback($e,
87+
$application->handleExceptionWithFeedback(
88+
$e,
8989
'/authentication/feedback/unknown-service-provider?entity-id=' . urlencode($spEntityId)
9090
);
9191
}
@@ -105,8 +105,10 @@ public function processedAssertionAction()
105105
EngineBlock_Log::NOTICE,
106106
EngineBlock_Log_Message_AdditionalInfo::createFromException($e)
107107
);
108-
$application->handleExceptionWithFeedback($e,
109-
'/authentication/feedback/vomembershiprequired');
108+
$application->handleExceptionWithFeedback(
109+
$e,
110+
'/authentication/feedback/vomembershiprequired'
111+
);
110112
}
111113
catch (EngineBlock_Attributes_Manipulator_CustomException $e) {
112114
$application->getLogInstance()->log(
@@ -115,8 +117,10 @@ public function processedAssertionAction()
115117
EngineBlock_Log_Message_AdditionalInfo::createFromException($e)
116118
);
117119
$_SESSION['feedback_custom'] = $e->getFeedback();
118-
$application->handleExceptionWithFeedback($e,
119-
'/authentication/feedback/custom');
120+
$application->handleExceptionWithFeedback(
121+
$e,
122+
'/authentication/feedback/custom'
123+
);
120124
}
121125
}
122126
}

0 commit comments

Comments
 (0)