ibm-openbmc / openbmc

https://github.com
Other
19 stars 51 forks source link

A translation error #304

Open ChicagoDuan opened 7 months ago

ChicagoDuan commented 7 months ago

When the password complexity requirements are not met, the error message displays 'Error updating user 'admin' because the password was not accepted.' In this case, the prompt should indicate that the password does not meet the complexity requirements or specify which complexity requirement is not satisfied. The suggested English translation is: 'Error updating user 'admin' because the password complexity requirements are not met.

image

joseph-reynolds commented 7 months ago

I agree. I tried to fix the server side of this problem a few years ago via https://gerrit.openbmc.org/c/openbmc/bmcweb/+/27503, but the patch is abandoned because I ran out of time to work on it.

When I look at this patch, the remaining problems are:

  1. The messages from Linux-PAM are hard-coded English and there is no translation support. I didn't have a plan for what the WebUI is supposed to do with these messages (other then show them as toast messages).
  2. It is difficult even for me to learn the exact set of messages. Messages can come from any module named in the Linux-PAM /etc/pam.d "password" configuration (https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-extended/pam/libpam/pam.d/common-password). The configuration stack changes over time, and different vendors may add modules, or enable pam_pwhistory (currently present but effectively disabled). --> As it is now, Messages are typically from pam_pwquality but can also come from pam_ipmicheck such as "Username %zu / Password %zu exceeds IPMI 16/20 limit".
  3. An effective way to solve this problem might be to first modify BMCWeb so it can reliably send the message Error updating user 'admin' because the password was not accepted. The patch linked above is very close to doing this (providing properties so the WebUI can do this). Maybe it can send the specific reasons (currently available as English-only strings) as additional data.
  4. I'm not sure exactly what Redfish property should be used (per discussion in https://redfishforum.com/thread/246/message-send-patch-password-failure), or if the Password@Message.ExtendedInfo.Oem.OpenBMC.diagnosticMessages property (as-coded in the gerrit review) is acceptable.
  5. The WebUI front-end (HTTP/Javascript code) would need to be enhanced to respond to this new Property from BMCWeb.

You are welcome to pick up this patch and work on it.

mzipse commented 7 months ago

@ChicagoDuan , would you be willing to pick this patch up, modify appropriately to address some of Joseph's concerns and then push it upstream? Once the backend work is upstreamed, I can get the BMC GUI team to make a corresponding change.

ChicagoDuan commented 6 months ago

@ChicagoDuan , would you be willing to pick this patch up, modify appropriately to address some of Joseph's concerns and then push it upstream? Once the backend work is upstreamed, I can get the BMC GUI team to make a corresponding change.

Sure!@lxwinspur George will pick this patch up.

ChicagoDuan commented 6 months ago

Hi @mzipse , We found that this issue is not related to the patch submitted by @joseph-reynolds , but is caused by a string matching error in the webui. The following commit has fixed this issue: https://github.com/ibm-openbmc/webui-vue/commit/9f3ae79bd59d0a4c5867ceef744d171edefd352e

mzipse commented 6 months ago

This fix is merged into the next 1020, 1030, 1050 service packs, and 1060.