Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 35fb1c3

Browse files
committed
Changed login and registration process
* Login process in PerunIdentity has been changed. Now we always check status of member in defaultVO(configuration option 'voShortName' in metadata/saml20-idp-hosted.php). If user is not member of this VO or status of the member is EXPIRED, user will be redirected to registration to this VO. User is redirected to the unauthorized page if the member has different status than VALID / EXPIRED. * Added new options for each facility. Facility manager is able to set if registration is allowed (if not, user is redirected to unauthorized access page instead of the registration page), set the registrationURL, enable/disable GroupMembershipCheck (if enabled, user must be a valid member in one of assigned groups to access the service), select the registration type (normal/dynamic; Normal type means redirect to registrationURL, Dynamic registration means ability to choose VO and Group for registration from assigned groups with registration form)
1 parent 0cd018e commit 35fb1c3

12 files changed

+593
-185
lines changed

CHANGELOG.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@ All notable changes to this project will be documented in this file.
44
## [Unreleased]
55
[Added]
66
- Added badges to README
7-
- Added new property to Facility model: description
87
- Added page with configurable table of SPs on Proxy
98
- Added new model Member
109
- Added new model Resource
1110
- New methods for getting data from Perun LDAP and Perun RPC
1211

13-
[Changed]
14-
- Connectors methods are not static for now.
15-
- Added constructors to Adapters, which allows specified config file for each connections.
16-
- New properties voId and uniqueName in Group model
17-
- Function getSpGroup require only one param($spEntityId)
12+
[Changed]
13+
- Connectors methods are not static for now.
14+
- Added constructors to Adapters, which allows specified config file for each connections.
15+
- New properties voId and uniqueName in Group model
16+
- Function getSpGroup require only one param($spEntityId)
17+
- Function unauthorize in PerunIdentity is now public
18+
- Changed the login and registration process
1819

1920
## [v1.0.0]
2021

config-templates/processFilterConfigurations-example.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
## PerunIdentity
2+
3+
Example how to configure PerunIdentity module:
4+
```php
5+
24 => array(
6+
'class' => 'perun:ProxyFilter',
7+
'filterSPs' => $perunEntityIds,
8+
'config' => array(
9+
'class' => 'perun:PerunIdentity',
10+
'uidsAttr' => array('eduPersonUniqueId', 'eduPersonPrincipalName', 'eduPersonTargetedIDString', 'nameid', 'uid'),
11+
'voShortName' => 'einfra',
12+
'registerUrlBase' => 'https://perun.cesnet.cz/allfed/registrar',
13+
'registerUrl' => 'https://login.cesnet.cz/register',
14+
'interface' => 'ldap',
15+
'facilityCheckGroupMembershipAttr' => 'urn:perun:facility:attribute-def:def:checkGroupMembership',
16+
'facilityVoShortNamesAttr' => 'urn:perun:facility:attribute-def:virt:voShortNames',
17+
'facilityDynamicRegistrationAttr' => 'urn:perun:facility:attribute-def:def:dynamicRegistration',
18+
'facilityRegisterUrlAttr' => 'urn:perun:facility:attribute-def:def:registerUrl',
19+
'facilityAllowRegistrationToGroups' => 'urn:perun:facility:attribute-def:def:allowRegistration',
20+
),
21+
),
22+
```
23+
24+
125
## IdPAttribute
226

327
Example how to enable filter IdPAttribute:

dictionaries/perun.definition.json

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
{
2-
"choose-group-tpl_header": {
3-
"en": "Select group which fits you most",
4-
"cs": "Vyberte si odpovídající skupinu"
2+
"choose-vo-and-group-tpl_header": {
3+
"en": "Access forbidden",
4+
"cs": "Přístup odepřen"
55
},
6-
"choose-group-tpl_text": {
7-
"en": "It will give you access to the requested service.",
8-
"cs": "Získáte tak přístup k požadované službě."
6+
"choose-vo-and-group-tpl_text": {
7+
"en": "You don't meet the prerequisites for accessing the service: ",
8+
"cs": "Nesplňujete prerekvizity pro přístup ke službě: "
9+
},
10+
"choose-vo-and-group-tpl_message": {
11+
"en": "To access the service it is necessary to have a valid membership in one of the following groups. Please proceed with selection of organization and group for registration.",
12+
"cs": "Pro získání přístupu k dané službě je nutné se zaregistrovat do jedné z následujících skupin. Pokračujte výběrem příslušné organizace a skupiny."
13+
},
14+
"choose-vo-and-group-tpl_select-vo": {
15+
"en": "Select virtual organization for registration: ",
16+
"cs": "Vyberte virtuální organizaci: "
17+
},
18+
"choose-vo-and-group-tpl_select-group": {
19+
"en": "Select group for registration: ",
20+
"cs": "Vyberte skupinu pro registraci: "
21+
},
22+
"choose-vo-and-group-tpl_continue": {
23+
"en": "Continue",
24+
"cs": "Pokračovat"
925
},
1026
"disco-tpl_previous-selection": {
1127
"en": "your previous selection",
@@ -63,6 +79,10 @@
6379
"en": "Go back to ",
6480
"cs": "Vraťte se zpět na "
6581
},
82+
"unauthorized-access_redirect_to_registration": {
83+
"en": "Now you will be redirected to registration to Perun system.",
84+
"cs": "Nyní budete přesměrování na registraci do systému Perun."
85+
},
6686
"listOfSps_header": {
6787
"en": "List of Service providers",
6888
"cs": "Seznam služeb"

lib/AdapterRpc.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function getSpGroups($spEntityId)
123123

124124
$spGroups = array();
125125
foreach ($resources as $resource) {
126-
$groups = sspmod_perun_RpcConnector::get('resourcesManager', 'getAssignedGroups', array(
126+
$groups = $this->connector->get('resourcesManager', 'getAssignedGroups', array(
127127
'resource' => $resource->getId(),
128128
));
129129

@@ -306,7 +306,7 @@ public function getFacilitiesByEntityId($spEntityId)
306306
* @return sspmod_perun_model_Member
307307
*/
308308
public function getMemberByUser($user, $vo) {
309-
$member = sspmod_perun_RpcConnector::get('membersManager', 'getMemberByUser', array(
309+
$member = $this->connector->get('membersManager', 'getMemberByUser', array(
310310
'user' => $user->getId(),
311311
'vo' => $vo->getId(),
312312
));
@@ -324,7 +324,7 @@ public function getMemberByUser($user, $vo) {
324324
*/
325325
public function hasRegistrationForm($group) {
326326
try {
327-
sspmod_perun_RpcConnector::get( 'registrarManager', 'getApplicationForm', array(
327+
$this->connector->get( 'registrarManager', 'getApplicationForm', array(
328328
'group' => $group->getId(),
329329
));
330330
return true;

0 commit comments

Comments
 (0)