diff --git a/server/src/main/resources/application.yml b/server/src/main/resources/application.yml index 4c73d34b..d661cd83 100644 --- a/server/src/main/resources/application.yml +++ b/server/src/main/resources/application.yml @@ -3,7 +3,8 @@ logging: level: root: WARN com.zaxxer.hikari: ERROR - org.springframework.security: TRACE + org.mariadb.jdbc.message.server: ERROR + org.springframework.security: INFO access: DEBUG threshold: console: WARN @@ -173,7 +174,7 @@ manage: user: invite password: secret # If manage is disabled (e.g. enabled: False) the staticManageDirectory is the directory where the {metadata_type}.json files -# are located. This can also be an absolute file path, e.g. file:///opt/openconext/oidc-playground/manage +# are located. This can also be an absolute file path, e.g. file:///opt/openconext/invite/manage staticManageDirectory: classpath:/manage # staticManageDirectory: file:///usr/local/etc/manage @@ -203,10 +204,11 @@ management: enabled: true health: enabled: true + show-details: always mappings: enabled: true metrics: - enabled: true + enabled: false info: git: mode: full diff --git a/server/src/main/resources/logback-spring.xml b/server/src/main/resources/logback-spring.xml index a9d50138..57a85180 100644 --- a/server/src/main/resources/logback-spring.xml +++ b/server/src/main/resources/logback-spring.xml @@ -8,7 +8,8 @@ - + + diff --git a/server/src/main/resources/public/favicon.ico b/server/src/main/resources/public/favicon.ico new file mode 100644 index 00000000..4d8d6256 Binary files /dev/null and b/server/src/main/resources/public/favicon.ico differ diff --git a/server/src/test/java/access/aggregation/AttributeAggregatorControllerTest.java b/server/src/test/java/access/aggregation/AttributeAggregatorControllerTest.java index d5cf4366..93104b52 100644 --- a/server/src/test/java/access/aggregation/AttributeAggregatorControllerTest.java +++ b/server/src/test/java/access/aggregation/AttributeAggregatorControllerTest.java @@ -33,6 +33,21 @@ void getGroupMemberships() throws JsonProcessingException { assertTrue(roles.get(0).get("id").startsWith("urn:mace:surf.nl:test.surfaccess.nl:")); } + @Test + void getGroupMembershipsManageUnavailable() { + List> roles = given() + .when() + .auth().preemptive().basic("aa", "secret") + .accept(ContentType.JSON) + .contentType(ContentType.JSON) + .pathParam("sub", GUEST_SUB) + .queryParam("SPentityID", "") + .get("/api/external/v1/aa/{sub}") + .as(new TypeRef<>() { + }); + assertEquals(0, roles.size()); + } + @Test void getGroupMembershipsGuestIncluded() throws JsonProcessingException { stubForManageProviderByEntityID(EntityType.SAML20_SP, "https://wiki"); diff --git a/server/src/test/java/access/teams/TeamsControllerTest.java b/server/src/test/java/access/teams/TeamsControllerTest.java index 1e99bb29..7d85f4d0 100644 --- a/server/src/test/java/access/teams/TeamsControllerTest.java +++ b/server/src/test/java/access/teams/TeamsControllerTest.java @@ -203,4 +203,31 @@ void migrateTeamInvalidSchacHome() { }); assertEquals("SchacHomeOrganization of a person is required", responseBody.get("message")); } + + @Test + void migrateTeamManageUnavailable() { + List memberships = getMemberships(); + List applications = List.of( + new Application("1", EntityType.SAML20_SP), + new Application("5", EntityType.OIDC10_RP)); + Team team = new Team( + "nl:surfnet:diensten:test", + "test migration", + "test migration", + memberships, + applications + ); + + given() + .when() + .auth().preemptive().basic("teams", "secret") + .accept(ContentType.JSON) + .contentType(ContentType.JSON) + .body(team) + .put("/api/external/v1/teams") + .then() + .statusCode(400); + + } + } \ No newline at end of file