Skip to content

Commit bc66c03

Browse files
authored
Merge pull request #2578 from zlamalp/eduteams
Added support for user virt attributes eIDASPersonIdentifiers and europeanStudentIDs
2 parents 5d73a35 + 8f0305b commit bc66c03

File tree

6 files changed

+102
-2
lines changed

6 files changed

+102
-2
lines changed

perun-base/src/main/java/cz/metacentrum/perun/core/api/CoreConfig.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,14 @@ private void createAttributeDefinitions(String extSourceType, List<String> attrN
502502
attr.setDescription("Assurance about user as defined at: https://wiki.refeds.org/display/ASS/REFEDS+Assurance+Framework+ver+1.0");
503503
attr.setType(BeansUtils.largeStringClassName);
504504
break;
505+
case "europeanStudentID":
506+
attr.setDisplayName("European Student ID");
507+
attr.setDescription("European Student ID");
508+
break;
509+
case "eIDASPersonIdentifier":
510+
attr.setDisplayName("eIDAS Person Identifier");
511+
attr.setDescription("eIDAS Person Identifier");
512+
break;
505513
case "dn":
506514
attr.setDisplayName("certificate DN");
507515
attr.setDescription("Distinguished Name from X509 digital certificate");

perun-base/src/main/resources/perun-base.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
<prop key="perun.DBInitializatorEnabled">false</prop>
117117
<prop key="perun.userExtSources.persistent">PERUN,[\w\d]*</prop>
118118
<prop key="perun.proxyIdPs"/>
119-
<prop key="perun.attributesForUpdate.idp">mail,cn,sn,givenName,o,ou,eppn,affiliation,displayName,uid,epuid,schacHomeOrganization,voPersonExternalAffiliation,alternativeLoginName,isCesnetEligibleLastSeen,IdPOrganizationName,sourceIdPName,entitlement,assurance,eduPersonOrcid,organizationURL</prop>
119+
<prop key="perun.attributesForUpdate.idp">mail,cn,sn,givenName,o,ou,eppn,affiliation,displayName,uid,epuid,schacHomeOrganization,voPersonExternalAffiliation,alternativeLoginName,isCesnetEligibleLastSeen,IdPOrganizationName,sourceIdPName,entitlement,assurance,eduPersonOrcid,organizationURL,eIDASPersonIdentifier,europeanStudentID</prop>
120120
<prop key="perun.attributesForUpdate.x509">mail,cn,o,dn,cadn,certificate</prop>
121121
<prop key="perun.instanceId">AOJ26J3D9DCK3OA7</prop>
122122
<prop key="perun.instanceName">LOCAL</prop>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package cz.metacentrum.perun.core.impl.modules.attributes;
2+
3+
import cz.metacentrum.perun.core.implApi.modules.attributes.SkipValueCheckDuringDependencyCheck;
4+
import cz.metacentrum.perun.core.implApi.modules.attributes.UserVirtualAttributeCollectedFromUserExtSource;
5+
6+
/**
7+
* All eIDASPersonIdentifiers collected from UserExtSources attributes eIDASPersonIdentifier.
8+
*
9+
* @author Pavel Zlamal <zlamal@cesnet.cz>
10+
*/
11+
@SuppressWarnings("unused")
12+
@SkipValueCheckDuringDependencyCheck
13+
public class urn_perun_user_attribute_def_virt_eIDASPersonIdentifiers extends UserVirtualAttributeCollectedFromUserExtSource {
14+
15+
@Override
16+
public String getSourceAttributeFriendlyName() {
17+
return "eIDASPersonIdentifier";
18+
}
19+
20+
@Override
21+
public String getDestinationAttributeFriendlyName() {
22+
return "eIDASPersonIdentifiers";
23+
}
24+
25+
@Override
26+
public String getDestinationAttributeDisplayName() {
27+
return "eIDASPersonIdentifiers";
28+
}
29+
30+
@Override
31+
public String getDestinationAttributeDescription() {
32+
return "All eIDAS Person Identifiers of a user.";
33+
}
34+
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package cz.metacentrum.perun.core.impl.modules.attributes;
2+
3+
import cz.metacentrum.perun.core.implApi.modules.attributes.SkipValueCheckDuringDependencyCheck;
4+
import cz.metacentrum.perun.core.implApi.modules.attributes.UserVirtualAttributeCollectedFromUserExtSource;
5+
6+
/**
7+
* All europeanStudentIDs collected from UserExtSources attributes europeanStudentID.
8+
*
9+
* @author Pavel Zlamal <zlamal@cesnet.cz>
10+
*/
11+
@SuppressWarnings("unused")
12+
@SkipValueCheckDuringDependencyCheck
13+
public class urn_perun_user_attribute_def_virt_europeanStudentIDs extends UserVirtualAttributeCollectedFromUserExtSource {
14+
15+
@Override
16+
public String getSourceAttributeFriendlyName() {
17+
return "europeanStudentID";
18+
}
19+
20+
@Override
21+
public String getDestinationAttributeFriendlyName() {
22+
return "europeanStudentIDs";
23+
}
24+
25+
@Override
26+
public String getDestinationAttributeDisplayName() {
27+
return "europeanStudentIDs";
28+
}
29+
30+
@Override
31+
public String getDestinationAttributeDescription() {
32+
return "All european student IDs of a user.";
33+
}
34+
35+
}

perun-ldapc/src/main/resources/perun-ldapc.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,26 @@ http://www.springframework.org/schema/aop http://www.springframework.org/schema/
806806
</bean>
807807
</property>
808808
</bean>
809+
<bean class="cz.metacentrum.perun.ldapc.model.impl.PerunAttributeDesc">
810+
<property name="name" value="europeanStudentID"/>
811+
<property name="required" value="false"/>
812+
<property name="multipleValuesExtractor">
813+
<bean class="cz.metacentrum.perun.ldapc.model.impl.MultipleAttributeValueExtractor">
814+
<property name="namespace" value="urn:perun:user:attribute-def:virt"/>
815+
<property name="name" value="europeanStudentIDs"/>
816+
</bean>
817+
</property>
818+
</bean>
819+
<bean class="cz.metacentrum.perun.ldapc.model.impl.PerunAttributeDesc">
820+
<property name="name" value="eIDASPersonIdentifier"/>
821+
<property name="required" value="false"/>
822+
<property name="multipleValuesExtractor">
823+
<bean class="cz.metacentrum.perun.ldapc.model.impl.MultipleAttributeValueExtractor">
824+
<property name="namespace" value="urn:perun:user:attribute-def:virt"/>
825+
<property name="name" value="eIDASPersonIdentifiers"/>
826+
</bean>
827+
</property>
828+
</bean>
809829
</list>
810830
</property>
811831
<property name="attributeDescriptionsExt" ref="perunUserAttributesExt"/>

perun-utils/ldapc-scripts/schemas/perun-schema.ldif

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ olcAttributeTypes: {39}( 1.3.6.1.4.1.8057.2.80.45 NAME 'adminOfVo' DESC 'The id
4444
olcAttributeTypes: {40}( 1.3.6.1.4.1.8057.2.80.46 NAME 'adminOfGroup' DESC 'The id of Group this user or group is administrator of' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
4545
olcAttributeTypes: {41}( 1.3.6.1.4.1.8057.2.80.47 NAME 'adminOfFacility' DESC 'The id of Facility this user or group is administrator of' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
4646
olcAttributeTypes: {42}( 1.3.6.1.4.1.8057.2.80.48 NAME 'eduPersonEntitlement' DESC 'A URI (either URN or URL) that indicates a set of rights to specific resources' EQUALITY caseExactMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
47+
olcAttributeTypes: {43}( 1.3.6.1.4.1.8057.2.80.49 NAME 'europeanStudentID' DESC 'European Student IDs of user' EQUALITY caseExactMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
48+
olcAttributeTypes: {44}( 1.3.6.1.4.1.8057.2.80.50 NAME 'eIDASPersonIdentifier' DESC 'eIDAS Person Identifiers of user' EQUALITY caseExactMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
4749
-
4850
replace: olcObjectClasses
49-
olcObjectClasses: {0}( 1.3.6.1.4.1.8057.2.80.4 NAME 'perunUser' DESC 'User managed by Perun' SUP inetOrgPerson STRUCTURAL MUST ( perunUserId $ isServiceUser $ isSponsoredUser ) MAY ( preferredMail $ userCertificateSubject $ uidNumber $ login $ eduPersonPrincipalNames $ userPassword $ memberOfPerunVo $ libraryIDs $ schacHomeOrganizations $ eduPersonScopedAffiliations $ bonaFideStatus $ groupNames $ institutionsCountries $ isCesnetEligible $ loa $ internalUserIdentifiers $ eduPersonOrcid $ loaFenix $ adminOfVo $ adminOfGroup $ adminOfFacility $ eduPersonEntitlement ) )
51+
olcObjectClasses: {0}( 1.3.6.1.4.1.8057.2.80.4 NAME 'perunUser' DESC 'User managed by Perun' SUP inetOrgPerson STRUCTURAL MUST ( perunUserId $ isServiceUser $ isSponsoredUser ) MAY ( preferredMail $ userCertificateSubject $ uidNumber $ login $ eduPersonPrincipalNames $ userPassword $ memberOfPerunVo $ libraryIDs $ schacHomeOrganizations $ eduPersonScopedAffiliations $ bonaFideStatus $ groupNames $ institutionsCountries $ isCesnetEligible $ loa $ internalUserIdentifiers $ eduPersonOrcid $ loaFenix $ adminOfVo $ adminOfGroup $ adminOfFacility $ eduPersonEntitlement $ europeanStudentID $ eIDASPersonIdentifier ) )
5052
olcObjectClasses: {1}( 1.3.6.1.4.1.8057.2.80.5 NAME 'perunGroup' DESC 'Group managed by Perun' SUP top STRUCTURAL MUST ( cn $ perunGroupId $ perunVoId $ perunUniqueGroupName ) MAY ( uniqueMember $ businessCategory $ seeAlso $ owner $ ou $ o $ description $ perunParentGroup $ perunParentGroupId $ assignedToResourceId $ adminOfVo $ adminOfGroup $ adminOfFacility) )
5153
olcObjectClasses: {2}( 1.3.6.1.4.1.8057.2.80.15 NAME 'perunResource' DESC 'Resource managed by Perun' SUP top STRUCTURAL MUST ( cn $ perunResourceId $ perunVoId $ perunFacilityId ) MAY (uniqueMember $ businessCategory $ seeAlso $ owner $ ou $ o $ description $ assignedGroupId $ perunFacilityDn $ capabilities ))
5254
olcObjectClasses: {3}( 1.3.6.1.4.1.8057.2.80.6 NAME 'perunVO' DESC 'VO managed by Perun' SUP organization STRUCTURAL MUST perunVoId MAY uniqueMember )

0 commit comments

Comments
 (0)