Project

General

Profile

Bug #604

closed

security constraints for rest controller are insufficient

Added by Miroslav Blaško about 6 years ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Start date:
19.04.2018
Due date:
% Done:

50%

Estimated time:
Spent time:

Description

Please revise rest controllers security restrictions. E.g. it is possible to retrieve all patients by REST API if institution is absent in REST API call. Currently fixed by workaround at PatientRecordController:

@PreAuthorize("hasRole('" + SecurityConstants.ROLE_ADMIN + "') OR (institutionKey != null )")
public List<PatientRecordDto> getRecords(@RequestParam(value = "institution", required = false) String institutionKey) {
...
}

- java tests of rest-controllers security should be added to confirm that it works correctly

Also available in: Atom PDF