Skip to content

Commit

Permalink
Added logging to provisioning
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Mar 13, 2024
1 parent e7f60a5 commit 870077a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ public void updateGroupRequest(List<String> previousManageIdentifiers, Role newR
if (previousManageIdentifiers.equals(newManageIdentifiers)) {
return;
}

LOG.info(String.format("Group %s update request with different manage identifiers. Old identifiers %s, new identifiers %s",
newRole.getName(),
previousManageIdentifiers,
newManageIdentifiers));

List<String> addedManageIdentifiers = newManageIdentifiers.stream().filter(id -> !previousManageIdentifiersSorted.contains(id)).toList();
List<String> deletedManageIdentifiers = previousManageIdentifiers.stream().filter(id -> !newManageIdentifiers.contains(id)).toList();

Expand All @@ -250,6 +256,9 @@ public void updateGroupRequest(List<String> previousManageIdentifiers, Role newR
this.sendGroupPutRequest(provisioning, provisionedGroup, userRoles, newRole, OperationType.Add);
});
});

LOG.info(String.format("Deleting existing provisionings %s from group %s", deletedManageIdentifiers, newRole.getName()));

List<Provisioning> provisionings = manage.provisioning(deletedManageIdentifiers).stream().map(Provisioning::new).toList();
deleteGroupRequest(newRole, provisionings);
}
Expand Down
1 change: 1 addition & 0 deletions server/src/main/java/access/voot/VootController.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
@RequestMapping(value = {"/api/voot", "/api/external/v1/voot"}, produces = MediaType.APPLICATION_JSON_VALUE)
@SecurityRequirement(name = VOOT_SCHEME_NAME)
public class VootController {

private static final Log LOG = LogFactory.getLog(VootController.class);

private final UserRepository userRepository;
Expand Down
10 changes: 5 additions & 5 deletions server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ spring:
port: 3025

crypto:
development-mode: True
private-key-location: classpath:nope
# development-mode: False
# private-key-location: classpath:/private_key_pkcs8.pem
# development-mode: True

Check warning on line 68 in server/src/main/resources/application.yml

View workflow job for this annotation

GitHub Actions / Test documentation and generate openapi html documentation

68:1 [comments-indentation] comment not indented like content
# private-key-location: classpath:nope
development-mode: False

Check warning on line 70 in server/src/main/resources/application.yml

View workflow job for this annotation

GitHub Actions / Test documentation and generate openapi html documentation

70:21 [truthy] truthy value should be one of [false, true]
private-key-location: classpath:/private_key_pkcs8.pem

cron:
node-cron-job-responsible: true
Expand Down Expand Up @@ -136,7 +136,7 @@ email:
enabled: false

manage:
enabled: False
enabled: True

Check warning on line 139 in server/src/main/resources/application.yml

View workflow job for this annotation

GitHub Actions / Test documentation and generate openapi html documentation

139:12 [truthy] truthy value should be one of [false, true]
url: "https://manage.test2.surfconext.nl"
user: invite
password: secret
Expand Down

0 comments on commit 870077a

Please sign in to comment.