MauroDataMapper / mdm-core

The backend of MDM
Apache License 2.0
7 stars 3 forks source link

Optimise Security Policy creation for non-admin users #474

Closed jamesrwelch closed 3 months ago

jamesrwelch commented 4 months ago

Fixes #473

jamesrwelch commented 4 months ago

Sorry, the branch was incorrectly named. But all the tests are passing on it

pjmonks commented 3 months ago

I carried out some performance testing to compare sign in times. These were taken to see how long the GET /session/isApplicationAdministration endpoint completes in various environments - those marked in bold are the improvements to focus on:

Administrator user

Regular user

Even if a regular user security policy check takes around 1 - 2 seconds longer than an administrator, this still looks well within tolerance of the 60 second timeout.

pjmonks commented 3 months ago

I tested the performance on another endpoint too, PUT /folders/{folderId}/readByAuthenticated. It was raised to me that switching this on/off in the UI seemed very slow to actually complete. Thinking this might be related to the security policy for the users, I checked if there was a performance improvement here too.

Running as an administrator

So your changes have benefitted other areas too 👍

joe-crawford commented 3 months ago

Can't see a problem with this and great that the performance is much better so good to merge.

Noted your comment Pete but will leave for now given it's in a test.