Uploaded image for project: 'mod-login'
  1. mod-login
  2. MODLOGIN-131

reset password fails if credentials record does not already exist

    XMLWordPrintable

Details

    • CP: sprint 90
    • 1
    • Core: Platform
    • Q2 2020

    Description

      A POST request to bl-users/password-reset/reset fails with a 500 if the corresponding record from authn/credentials is not already present.

      The failure comes from mod-login's POST /authn/password/repeatable, invoked via the default mod-password-validator rule here:
      https://github.com/folio-org/mod-password-validator/blob/f8864c413dbac105d49b7b9f3b377d4dbaab64bb/ramls/defaultRules/defaultRules.json#L101

      If a credential record is not found the passwordStorageServiceImpl fails the promise/future returned by getCredsById(...)
      https://github.com/folio-org/mod-login/blob/c3c6263f5520319f1208d47e04e70ca6bd39f8f4/src/main/java/org/folio/services/impl/PasswordStorageServiceImpl.java#L435 causing a 500 Internal Server Error to be returned w/o any context.

      The error handling should be adjusted so that when a credentials record doesn't exist POST /authn/password/repeatable returns a response indicating that the password is not a repeat.

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                cmcnally Craig McNally
                zburke Zak_Burke
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases