Skip to content

Commit 8014710

Browse files
authored
Merge pull request #3994 from zlamalp/einfra
refactor(core): do not create certificate IdP identity for e-INFRA CZ
2 parents 224ba7b + 9f9fcb8 commit 8014710

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

perun-core/src/main/java/cz/metacentrum/perun/core/impl/modules/pwdmgr/EinfraPasswordManagerModule.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,6 @@ public void validatePassword(PerunSession sess, String userLogin, User user) thr
165165
//this is OK
166166
}
167167

168-
// Store E-INFRA CERT IdP UES
169-
extSource = perunBl.getExtSourcesManagerBl().getExtSourceByName(sess, "https://idp-cert.e-infra.cz/idp/");
170-
ues = new UserExtSource(extSource, userLogin + "@idp-cert.e-infra.cz");
171-
ues.setLoa(0);
172-
173-
try {
174-
perunBl.getUsersManagerBl().addUserExtSource(sess, user, ues);
175-
} catch (UserExtSourceExistsException ex) {
176-
//this is OK
177-
}
178-
179168
// Store also Kerberos logins
180169
Attribute kerberosLoginsAttr = perunBl.getAttributesManagerBl().getAttribute(sess, user, AttributesManager.NS_USER_ATTR_DEF + ":" + "kerberosLogins");
181170
if (kerberosLoginsAttr != null && kerberosLoginsAttr.getValue() != null) {

perun-registrar-lib/src/main/java/cz/metacentrum/perun/registrar/modules/Metacentrum.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ public class Metacentrum extends DefaultRegistrarModule {
5858
protected final static String A_USER_IS_CESNET_ELIGIBLE_LAST_SEEN = AttributesManager.NS_USER_ATTR_DEF+":isCesnetEligibleLastSeen";
5959
private final static String A_MEMBER_MEMBERSHIP_EXPIRATION = AttributesManager.NS_MEMBER_ATTR_DEF+":membershipExpiration";
6060
protected final static String METACENTRUM_IDP = "https://login.ics.muni.cz/idp/shibboleth";
61-
protected final static String EINFRA_IDP = "https://https://idp.e-infra.cz/idp/";
62-
protected final static String EINFRA_IDP_CERT = "https://idp-cert.e-infra.cz/idp/";
61+
protected final static String EINFRA_IDP = "https://idp.e-infra.cz/idp/";
6362

6463
/**
6564
* Add all new Metacentrum members to "storage" group.
@@ -142,7 +141,7 @@ public Application approveApplication(PerunSession session, Application app) thr
142141
// user is already in e-INFRA CZ
143142
} catch (ExtendMembershipException e) {
144143
// can't be member of e-INFRA CZ, shouldn't happen
145-
log.error("{} member can't be added to \"e-INFRA CZ\": {}", vo.getName(), e);
144+
log.error("{} member can't be added to \"e-INFRA CZ\"", vo.getName(), e);
146145
}
147146

148147
// Support statistic groups
@@ -206,8 +205,7 @@ public void canBeSubmitted(PerunSession session, Application.AppType appType, Ma
206205
"NOT_ELIGIBLE_METAIDP", null, null);
207206
}
208207

209-
if (EINFRA_IDP.equals(session.getPerunPrincipal().getExtSourceName()) ||
210-
EINFRA_IDP_CERT.equals(session.getPerunPrincipal().getExtSourceName())) {
208+
if (EINFRA_IDP.equals(session.getPerunPrincipal().getExtSourceName())) {
211209
throw new CantBeSubmittedException("You are currently logged-in using e-INFRA CZ IdP." +
212210
"It can't be used to register or extend membership in Metacentrum. Please close browser and log-in using different identity provider.",
213211
"NOT_ELIGIBLE_EINFRAIDP", null, null);

perun-registrar-lib/src/main/java/cz/metacentrum/perun/registrar/modules/MetacentrumSocial.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import java.util.Map;
2525

2626
import static cz.metacentrum.perun.registrar.modules.Metacentrum.EINFRA_IDP;
27-
import static cz.metacentrum.perun.registrar.modules.Metacentrum.EINFRA_IDP_CERT;
2827
import static cz.metacentrum.perun.registrar.modules.Metacentrum.METACENTRUM_IDP;
2928

3029
/**
@@ -74,8 +73,7 @@ public void canBeSubmitted(PerunSession session, Application.AppType appType, Ma
7473
"NOT_ELIGIBLE_METAIDP", null, null);
7574
}
7675

77-
if (EINFRA_IDP.equals(session.getPerunPrincipal().getExtSourceName()) ||
78-
EINFRA_IDP_CERT.equals(session.getPerunPrincipal().getExtSourceName())) {
76+
if (EINFRA_IDP.equals(session.getPerunPrincipal().getExtSourceName())) {
7977
throw new CantBeSubmittedException("You are currently logged-in using e-INFRA CZ IdP." +
8078
"It can't be used to register or extend membership in Metacentrum. Please close browser and log-in using different identity provider.",
8179
"NOT_ELIGIBLE_EINFRAIDP", null, null);

0 commit comments

Comments
 (0)