Skip to content

Commit 208d226

Browse files
Merge pull request #1203 from OpenConext/feature/542-rename-mijneduid-to-myconext
#542 rename mijneduid to myconext
2 parents 7670851 + 02e823e commit 208d226

11 files changed

Lines changed: 40 additions & 40 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ log
2121
NOTES.md
2222
dep.tree
2323
application-test2.yml
24+
application-dev.yml
2425
api-docs.json
2526
dist
2627
account-gui/public/index.html

account-gui/src/routes/WebAuthn.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
})
3636
.catch(() => {
3737
//happens when the key is already registered
38-
window.location.href = $conf.eduIDWebAuthnRedirectSpUrl;
38+
window.location.href = $conf.myconextWebAuthnRedirectSpUrl;
3939
})
4040
})
4141
.catch(() => navigate("/404"));
@@ -63,4 +63,4 @@
6363
<p class="info">{I18n.t("WebAuthn.BrowserPrompt.COPY")}</p>
6464
<Button label={I18n.t("Webauthn.SetUpdate.COPY")} onClick={startWebAuthnRegistration}/>
6565
{/if}
66-
</div>
66+
</div>

account-gui/src/stores/conf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const conf = writable({
55
magicLinkUrl: "",
66
continueAfterLoginUrl: "",
77
domain: "",
8-
eduIDWebAuthnRedirectSpUrl: "",
8+
myconextWebAuthnRedirectSpUrl: "",
99
featureWebAuthn: false,
1010
featureAllowList: false,
1111
idpBaseUrl: "",
@@ -21,4 +21,4 @@ export const conf = writable({
2121
export const links = writable({
2222
userLink: true,
2323
displayBackArrow: true
24-
});
24+
});

myconext-gui/src/routes/WebAuthn.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
const startWebAuthn = () => {
1616
loading = true;
1717
startWebAuthFlow().then(res => {
18-
window.location.href = `${$config.eduIDWebAuthnUrl}?token=${res.token}&name=${encodeURIComponent(credentialName)}`
18+
window.location.href = `${$config.myconextWebAuthUrl}?token=${res.token}&name=${encodeURIComponent(credentialName)}`
1919
});
2020
}
2121
@@ -81,4 +81,4 @@
8181
</div>
8282
{/if}
8383

84-
</div>
84+
</div>

myconext-gui/src/stores/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const config = writable({
2828
myConextUrlGuestIdp: "",
2929
spBaseUrl: "",
3030
createEduIDInstitutionLanding: false,
31-
eduIDWebAuthnUrl: "",
31+
myconextWebAuthUrl: "",
3232
magicLinkUrl: "",
3333
domain: "",
3434
idpBaseUrl: "",

myconext-gui/src/utils/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const doLogOutAfterRateLimit = idpBaseUrl => {
3838
export const redirectToLogin = (loginUrl, redirectTo) => {
3939
const url = new URL(loginUrl);
4040
url.searchParams.set("redirect_path", redirectTo || "/");
41-
url.searchParams.set("registration_id", "mijn_eduid");
41+
url.searchParams.set("registration_id", "my_conext");
4242
window.location.href = url.toString();
4343
}
4444

myconext-server/src/main/java/myconext/api/LoginController.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public class LoginController {
5757
private final List<String> createFromInstitutionAllowedReturnDomains;
5858
private final String spBaseUrl;
5959
private final String spServiceDeskBaseUrl;
60+
private final String myconextLoginUrl;
6061

6162
public LoginController(UserRepository userRepository,
6263
AuthenticationRequestRepository authenticationRequestRepository,
@@ -101,9 +102,8 @@ public LoginController(UserRepository userRepository,
101102
this.config.put("idpBaseUrl", idpBaseUrl);
102103
this.config.put("spBaseUrl", spBaseUrl);
103104
this.config.put("spServiceDeskBaseUrl", spServiceDeskBaseUrl);
104-
this.config.put("eduIDWebAuthnUrl", String.format("%s/webauthn", idpBaseUrl));
105-
this.config.put("eduIDLoginUrl", myConextUrl + "/oauth2/authorization/oidcng");
106-
this.config.put("eduIDWebAuthnRedirectSpUrl", String.format("%s/security", spBaseUrl));
105+
this.config.put("myconextWebAuthUrl", String.format("%s/webauthn", idpBaseUrl));
106+
this.config.put("myconextWebAuthnRedirectSpUrl", String.format("%s/security", spBaseUrl));
107107
this.config.put("domain", domain);
108108
this.config.put("featureWebAuthn", featureWebAuthn);
109109
this.config.put("featureWarningEducationalEmailDomain", featureWarningEducationalEmailDomain);
@@ -131,6 +131,7 @@ public LoginController(UserRepository userRepository,
131131
this.createFromInstitutionAllowedReturnDomains = createFromInstitutionProperties.getReturnUrlAllowedDomains();
132132
this.spBaseUrl = spBaseUrl;
133133
this.spServiceDeskBaseUrl = spServiceDeskBaseUrl;
134+
this.myconextLoginUrl = myConextUrl + "/oauth2/authorization/oidcng";
134135
}
135136

136137
@GetMapping("/config")
@@ -225,7 +226,7 @@ private void doRedirect(String lang, String location, HttpServletResponse respon
225226
String cookieValue = String.format("%s=true; Max-Age=%s; SameSite=None%s", REGISTER_MODUS_COOKIE_NAME, 60 * 10, secureCookie ? "; Secure" : "");
226227
response.setHeader("Set-Cookie", cookieValue);
227228
}
228-
String redirectLocation = StringUtils.hasText(location) ? location : this.config.get("eduIDLoginUrl") + "?lang=" + lang;
229+
String redirectLocation = StringUtils.hasText(location) ? location : this.myconextLoginUrl + "?lang=" + lang;
229230

230231
LOG.info(String.format("Redirecting to %s", redirectLocation));
231232

myconext-server/src/main/java/myconext/security/SecurityConfiguration.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@
5858
public class SecurityConfiguration {
5959

6060
// Overview of the security configuration:
61-
// 1. SamlSecurity (@Order(1)) — Secures the SAML guest IdP endpoint (eduID guest login).
62-
// 2. InternalSecurityConfigurationAdapter (@Order default) — Secures the Mijn eduID and Service Desk portals via OAuth2/OIDC login against OpenConext.
61+
// 1. SamlSecurity (@Order(1)) — Secures the SAML guest IdP endpoint (myconext guest login).
62+
// 2. InternalSecurityConfigurationAdapter (@Order default) — Secures the myconext and Service Desk portals via OAuth2/OIDC login against OpenConext.
6363
// 3. AppSecurity (@Order(2)) — Secures system-to-system OpenConext APIs with HTTP Basic auth.
64-
// 4. JWTSecurityConfig (@Order(3)) — Secures mobile app and eduID APIs via OAuth2 opaque token introspection.
65-
64+
// 4. JWTSecurityConfig (@Order(3)) — Secures mobile app and myconext APIs via OAuth2 opaque token introspection.
65+
6666
private static final Log LOG = LogFactory.getLog(SecurityConfiguration.class);
6767

6868
@Bean
@@ -86,7 +86,7 @@ public void addCorsMappings(CorsRegistry registry) {
8686
}
8787
}
8888

89-
//1. SamlSecurity (@Order(1)) — Secures the SAML guest IdP endpoint (eduID guest login).
89+
//1. SamlSecurity (@Order(1)) — Secures the SAML guest IdP endpoint (myconext guest login).
9090
@Configuration
9191
@Order(1)
9292
@EnableConfigurationProperties(IdentityProviderMetaData.class)
@@ -229,7 +229,7 @@ private String read(Resource resource) throws IOException {
229229
}
230230
}
231231

232-
//2. InternalSecurityConfigurationAdapter (@Order default) — Secures the Mijn eduID and Service Desk portals via OAuth2/OIDC login against OpenConext.
232+
//2. InternalSecurityConfigurationAdapter (@Order default) — Secures the myconext and Service Desk portals via OAuth2/OIDC login against OpenConext.
233233
@Order
234234
@Configuration
235235
public static class InternalSecurityConfigurationAdapter {
@@ -238,11 +238,11 @@ public static class InternalSecurityConfigurationAdapter {
238238

239239
public static final String ROLE_GUEST = "ROLE_GUEST";
240240
public static final String SERVICE_DESK = "SERVICE_DESK";
241-
public static final String REGISTRATION_ID_MIIN_EDUID = "mijn_eduid";
241+
public static final String REGISTRATION_ID_MY_CONEXT = "my_conext";
242242
public static final String REGISTRATION_ID_SERVICE_DESK = "service_desk";
243243

244244
private static final Set<String> ALLOWED_REGISTRATION_IDS =
245-
Set.of(REGISTRATION_ID_MIIN_EDUID, REGISTRATION_ID_SERVICE_DESK);
245+
Set.of(REGISTRATION_ID_MY_CONEXT, REGISTRATION_ID_SERVICE_DESK);
246246

247247
public InternalSecurityConfigurationAdapter(AppAwareAuthorizationRequestResolver authorizationRequestResolver) {
248248
this.authorizationRequestResolver = authorizationRequestResolver;
@@ -315,7 +315,7 @@ private AuthenticationEntryPoint appAwareAuthenticationEntryPoint() {
315315
return (request, response, authException) -> {
316316
String registrationId = request.getParameter("registration_id");
317317
if (!ALLOWED_REGISTRATION_IDS.contains(registrationId)) {
318-
registrationId = "mijn_eduid";
318+
registrationId = REGISTRATION_ID_MY_CONEXT;
319319
}
320320
response.sendRedirect(request.getContextPath() + "/oauth2/authorization/" + registrationId);
321321
};
@@ -363,7 +363,7 @@ private DaoAuthenticationProvider inMemoryAuthenticationProvider() {
363363

364364
}
365365

366-
//4. JWTSecurityConfig (@Order(3)) — Secures mobile app and eduID APIs via OAuth2 opaque token introspection.
366+
//4. JWTSecurityConfig (@Order(3)) — Secures mobile app and myconext APIs via OAuth2 opaque token introspection.
367367
@Configuration
368368
@Order(3)
369369
public static class JWTSecurityConfig {

myconext-server/src/main/resources/application-servicedesk.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
# Spring profile: 'servicedesk'
2-
# Activate with -Dspring.profiles.active=servicedesk (or SPRING_PROFILES_ACTIVE=servicedesk)
31
# Overrides for running the backend in Service Desk mode (servicedesk-gui as the front-end).
42

53
host_headers:
6-
active: servicedesk.test2.eduid.nl
4+
active: servicedesk.myconext.nl
75

86
service_desk_role_auto_provisioning: True
97

myconext-server/src/main/resources/application.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ create-from-institution:
106106

107107
# The host headers to identify the service the user is logged in
108108
host_headers:
109-
service_desk: servicedesk.test2.eduid.nl
110-
mijn_ediuid: mijn.test2.eduid.nl
109+
service_desk: servicedesk.myconext.nl
110+
mijn_ediuid: mijn.myconext.nl
111111
#Only for testing purposes
112-
# active: servicedesk.test2.eduid.nl
113-
active: mijn.test2.eduid.nl
112+
# active: servicedesk.myconext.nl
113+
active: mijn.myconext.nl
114114

115115
feature:
116116
webauthn: True
@@ -299,7 +299,7 @@ spring:
299299
oauth2:
300300
client:
301301
registration:
302-
mijn_eduid:
302+
my_conext:
303303
client-id: playground_client
304304
client-secret: secret
305305
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
@@ -315,10 +315,10 @@ spring:
315315
provider: oidcng
316316
provider:
317317
oidcng:
318-
authorization-uri: "https://connect.test2.surfconext.nl/oidc/authorize"
319-
token-uri: "https://connect.test2.surfconext.nl/oidc/token"
320-
user-info-uri: "https://connect.test2.surfconext.nl/oidc/userinfo"
321-
jwk-set-uri: "https://connect.test2.surfconext.nl/oidc/certs"
318+
authorization-uri: "http://localhost:8098/oidc/authorize"
319+
token-uri: "http://localhost:8098/oidc/token"
320+
user-info-uri: "http://localhost:8098/oidc/userinfo"
321+
jwk-set-uri: "http://localhost:8098/oidc/certs"
322322
user-name-attribute: sub
323323
user-info-authentication-method: client_secret_basic
324324

0 commit comments

Comments
 (0)