Skip to content

Commit

Permalink
moving the eduPKI testing setting to ConfigAssistant
Browse files Browse the repository at this point in the history
  • Loading branch information
twoln committed Feb 26, 2024
1 parent 6d58bfe commit 5843535
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions config/ConfAssistant-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ class ConfAssistant
'nomenclature_participant' => 'Organisation',
];

/** eduPKI options:
*
* at the moment we just have one whic decides wheather we are in the testing
* or production mode. In future it might make sense to move some other parametrs
* from code to this place.
*/
const eduPKI = [
'testing' => false,
];
/** silverbullet options:
* default_maxusers: an institution is not allowed to create more than that amount of users
* the value can be overridden as a per-federation option in fed-operator UI
Expand Down
4 changes: 3 additions & 1 deletion web/admin/action_req_certificate.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
$feds[] = $fed;
}
}
if ($is_testing === true) {
if (\config\ConfAssistant::eduPKI['testing'] === true) {
$DN = ["DC=eduroam", "DC=test", "DC=test"];
$expiryDays = 365;
} else {
Expand Down Expand Up @@ -169,6 +169,8 @@
"ALTNAMES" => $serverList,
"POLICIES" => $policies,
"FED" => $country];
$loggerInstance = new \core\common\Logging();
$loggerInstance->debug(2, $DN, "CERT DN: ", "\n");
// our certs can be good for max 5 years
$fed->requestCertificate($user->identifier, $newCsrWithMeta, $expiryDays);
echo "<p>" . _("The certificate was requested.") . "</p>";
Expand Down

0 comments on commit 5843535

Please sign in to comment.