Vscode-extension-for-zowe: Updating credentials via Check Credentials does not update profile yaml

Created on 12 May 2020  路  6Comments  路  Source: zowe/vscode-extension-for-zowe

Steps to recreate:

  1. Create a profile with incorrect username/password combination.
  2. Search for MVS data sets using profile from Step 1, triggering the "Invalid Username" error with the "Check Credentials" button.
  3. Click "Check Credentials".
  4. Enter in correct username/password at the dialog prompts.
  5. You will be able to use the profile to successfully search for data sets for this session. However, the corrected username/password does not get saved to the profile's yaml file, and for the next session, Zowe Explorer shows the credentials as wrong again.

Note: The solution to this issue should also take into account the possible case where a user does not want their credentials saved, but then enters their credentials incorrectly when prompted (e.g. on data sets search), triggers the "Invalid Username" error with the "Check Credentials" button, then uses the dialogs from the "Check Credentials" button to correct their credentials for that session. In this case, Zowe Explorer should not store the username/password entered in the prompts generated by clicking "Check Credentials".

Profiles bug

Most helpful comment

With this issue being connected to rePrompt that is used for profiles that don't have saved username and password as well as profiles with incorrect username and password, I wonder if accepting the values as usual but having a message come up for Check Credentials to inform the user to edit and save the valid information for future use would be the best way to go with this.

@JillieBeanSim I think adding an option in the Check Credentials dialog flow (after the user enters their credentials) that allows the user to pick whether or not they want to save those credentials could be a good idea. (As opposed to us trying to decide for them, since the user may have arrived at the Check Credentials dialog from various paths.)

All 6 comments

I can look into this one since I have been working on the profiles code if someone isn't already tackling it

I debugged it and it is happening here: https://github.com/zowe/vscode-extension-for-zowe/blob/master/src/Profiles.ts#L1007

The value for rePrompt is true during Check Credentials.

With this issue being connected to rePrompt that is used for profiles that don't have saved username and password as well as profiles with incorrect username and password, I wonder if accepting the values as usual but having a message come up for Check Credentials to inform the user to edit and save the valid information for future use would be the best way to go with this.

@lauren-li & @jellypuno what do you think?

I have tried to have it check if username and password were empty string and if so not save it in the yaml but if the user enters invalid creds here and are prompted a second time the values from the 1st prompt are cached and we loose the empty string check, so values would be saved to the yaml even though the user may not want them there.

I will continue working on ways to work with these edge cases

I will try and test it. Thanks @JillieBeanSim

With this issue being connected to rePrompt that is used for profiles that don't have saved username and password as well as profiles with incorrect username and password, I wonder if accepting the values as usual but having a message come up for Check Credentials to inform the user to edit and save the valid information for future use would be the best way to go with this.

@JillieBeanSim I think adding an option in the Check Credentials dialog flow (after the user enters their credentials) that allows the user to pick whether or not they want to save those credentials could be a good idea. (As opposed to us trying to decide for them, since the user may have arrived at the Check Credentials dialog from various paths.)

Was this page helpful?
0 / 5 - 0 ratings