diff --git a/server/src/main/java/access/lifecycle/LifeCycleResult.java b/server/src/main/java/access/lifecycle/LifeCycleResult.java index 210e3842..d1a3eaaa 100644 --- a/server/src/main/java/access/lifecycle/LifeCycleResult.java +++ b/server/src/main/java/access/lifecycle/LifeCycleResult.java @@ -13,7 +13,7 @@ public class LifeCycleResult { private final String status = "OK"; - private final String name = "OpenConext-access-server"; + private final String name = "OpenConext-invite-server"; private List data = new ArrayList<>(); public void setData(List data) { diff --git a/server/src/main/java/access/lifecycle/UserLifeCycleController.java b/server/src/main/java/access/lifecycle/UserLifeCycleController.java index 2079afc3..f37107d0 100644 --- a/server/src/main/java/access/lifecycle/UserLifeCycleController.java +++ b/server/src/main/java/access/lifecycle/UserLifeCycleController.java @@ -23,7 +23,7 @@ import static access.SwaggerOpenIdConfig.LIFE_CYCLE_SCHEME_NAME; @RestController -@RequestMapping(value = {"/api/deprovisioning", "/api/external/v1/deprovisioning"}, produces = MediaType.APPLICATION_JSON_VALUE) +@RequestMapping(value = {"/api/deprovision", "/api/external/v1/deprovision"}, produces = MediaType.APPLICATION_JSON_VALUE) @SecurityRequirement(name = LIFE_CYCLE_SCHEME_NAME) public class UserLifeCycleController { diff --git a/server/src/main/java/access/security/SecurityConfig.java b/server/src/main/java/access/security/SecurityConfig.java index 85e9187f..1e0ee14d 100644 --- a/server/src/main/java/access/security/SecurityConfig.java +++ b/server/src/main/java/access/security/SecurityConfig.java @@ -73,8 +73,8 @@ public SecurityConfig(ClientRegistrationRepository clientRegistrationRepository, @Value("${oidcng.resource-server-secret}") String secret, @Value("${voot.user}") String vootUser, @Value("${voot.password}") String vootPassword, - @Value("${lifecyle.user}") String lifeCycleUser, - @Value("${lifecyle.password}") String lifeCyclePassword, + @Value("${lifecycle.user}") String lifeCycleUser, + @Value("${lifecycle.password}") String lifeCyclePassword, @Value("${teams.user}") String teamsUser, @Value("${teams.password}") String teamsPassword, @Value("${attribute-aggregation.user}") String attributeAggregationUser, @@ -203,8 +203,8 @@ SecurityFilterChain basicAuthenticationSecurityFilterChain(HttpSecurity http) th "/api/external/v1/teams/**", "/api/aa/**", "/api/external/v1/aa/**", - "/api/deprovisioning/**", - "/api/external/v1/deprovisioning/**") + "/api/deprovision/**", + "/api/external/v1/deprovision/**") .sessionManagement(c -> c .sessionCreationPolicy(SessionCreationPolicy.STATELESS) ) diff --git a/server/src/main/resources/application.yml b/server/src/main/resources/application.yml index 0b53c7f3..3ba2d066 100644 --- a/server/src/main/resources/application.yml +++ b/server/src/main/resources/application.yml @@ -125,8 +125,8 @@ attribute-aggregation: user: aa password: secret -lifecyle: - user: lifecyle +lifecycle: + user: lifecycle password: secret email: diff --git a/server/src/test/java/access/lifecycle/UserLifeCycleControllerTest.java b/server/src/test/java/access/lifecycle/UserLifeCycleControllerTest.java index a4ba2d66..e7e7ac72 100644 --- a/server/src/test/java/access/lifecycle/UserLifeCycleControllerTest.java +++ b/server/src/test/java/access/lifecycle/UserLifeCycleControllerTest.java @@ -19,11 +19,11 @@ class UserLifeCycleControllerTest extends AbstractTest { void preview() { LifeCycleResult lifeCycleResult = given() .when() - .auth().basic("lifecyle", "secret") + .auth().basic("lifecycle", "secret") .accept(ContentType.JSON) .contentType(ContentType.JSON) .pathParam("sub", GUEST_SUB) - .get("/api/deprovisioning/{sub}") + .get("/api/deprovision/{sub}") .as(new TypeRef<>() { }); List memberships = lifeCycleResult.getData().stream().filter(attribute -> attribute.getName().equals("membership")) @@ -40,7 +40,7 @@ void lifeCycleRole() { .accept(ContentType.JSON) .contentType(ContentType.JSON) .pathParam("sub", GUEST_SUB) - .get("/api/deprovisioning/{sub}") + .get("/api/deprovision/{sub}") .then() .statusCode(400); } @@ -49,11 +49,11 @@ void lifeCycleRole() { void dryRun() { LifeCycleResult lifeCycleResult = given() .when() - .auth().basic("lifecyle", "secret") + .auth().basic("lifecycle", "secret") .accept(ContentType.JSON) .contentType(ContentType.JSON) .pathParam("sub", GUEST_SUB) - .delete("/api/deprovisioning/{sub}/dry-run") + .delete("/api/deprovision/{sub}/dry-run") .as(new TypeRef<>() { }); List memberships = lifeCycleResult.getData().stream().filter(attribute -> attribute.getName().equals("membership")) @@ -72,11 +72,11 @@ void deprovision() throws JsonProcessingException { super.stubForDeleteScimUser(); LifeCycleResult lifeCycleResult = given() .when() - .auth().basic("lifecyle", "secret") + .auth().basic("lifecycle", "secret") .accept(ContentType.JSON) .contentType(ContentType.JSON) .pathParam("sub", GUEST_SUB) - .delete("/api/deprovisioning/{sub}") + .delete("/api/deprovision/{sub}") .as(new TypeRef<>() { }); List memberships = lifeCycleResult.getData().stream().filter(attribute -> attribute.getName().equals("membership")) @@ -87,4 +87,4 @@ void deprovision() throws JsonProcessingException { } -} \ No newline at end of file +}