-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmapbugfeature: external storage
Description
Steps to reproduce
- Have LDAP/AD configured as well as user specific SMB share with AD credentials (saved in DB)
- Log in at least once, close the browser
- Change the password in AD
- Let cron jobs do their things
Expected behaviour
- Have only one attempt that ends up with unauthenticated, or introduce a big delay
Actual behaviour
- The storage is marked unavailable (for hard 10 minutes)
- The next attempt to authenticate follows
- dependent on the policy on AD a lock will follow
Options
Let me state first state that this mechanism follows not a modern approach but sadly is still adopted in many places.
Background: on an attempt with an invalid password, SMB Storage throws a ConnectError with "Invalid login"
- The workaround: configurable RECHECK_TTL_SEC in config.php – the hard 10 minutes could be increased by admins
- The other timestamp: extended the database and setting when the storage is available again. On certain types of errors, it could be more than the 10 minutes, e.g. 8 hours for this type of exception. Still a static time, but probably sufficient. It is required to extend the database table however. Still can include the config.php option if necessary.
- The full blown: like before, with another column that counts "bad attempts" so that the time interval increases each time.
- The awkward workaround: sets the time checked timestamp to the future on ConnectError exceptions to achieve the same result as in the second option. The advantage is that no DB changes are needed, but comes with ugliness.
Better backportability comes without DB changes, espcially if they can be time costly. Therefore, as bad as it sounds, the last option has a good balance of flexibility and complexity. What do you think @icewind1991
Metadata
Metadata
Assignees
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmapbugfeature: external storage