WARN [org.apereo.cas.authentication.principal.resolvers.ChainingPrincipalResolver] - <None of the principal resolvers in the chain were able to produce a principal>
We have the following settings in our properties files
cas.authn.pm.jdbc.sql-find-email=SELECT email FROM user WHERE username = ?
cas.authn.pm.jdbc.sql-find-phone=SELECT phone FROM user WHERE username = ?
cas.authn.pm.jdbc.sql-find-user=SELECT username FROM user WHERE email = ? limit 1
In our resultant email the only attribute that is added is "email" which is the one thing that the user already knows :). We don't get a principal or a username.
Trying to read my way through the code in SendForgotUsernameInstructionsAction
locateUserAndProcess gets the username from PasswordManagementService.findUsername(query)
but sendForgotUsernameEmailToAccount builds the credentials with query.getUsername() - but surely username isn't in Query - otherwise locateUserAndProcess could have done the same thing?
I can see this changed in the 'refactor apis for pswd mgmt' in Feb 2021 - but can't see how username is supposed to get into query...
One thing that is additionally slightly annoying here is that in our case multiple usernames could be associated with a single email address and it would be nice to tell the user all of them.
Also for us it would be great if we could get information about the requesting service in the email to tailor the email even further.