Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle profile creation/update for ZE extender profiles requiring credentials when the user leaves them blank #1619

Closed
Tracked by #1717
lauren-li opened this issue Dec 22, 2021 · 5 comments
Assignees
Labels
API Extender Issues that allow Zowe Explorer to be extended externally bug Something isn't working v1-profiles relating specifically to v1 profiles management

Comments

@lauren-li
Copy link
Contributor

Describe the bug

If a user has the Secure Credential Store (SCS) plug-in for Zowe CLI installed, and is attempting to create a no-credentials (i.e. no username or password) profile for a Zowe Explorer extender whose profile type specifies that username and password are required, they will see an error about secure fields upon profile creation. The next time they restart VS Code, Zowe Explorer activation fails with the same error.

  • This issue also occurs when updating this type of extender profile to have no username or password.

I first saw this issue when testing the Zowe Explorer Extension for FTP, but when @jellypuno and I modified the extender's zftp_meta.yaml file to set required: false for the user and password properties, the issue went away and we were able to successfully create no-credentials zFTP profiles in Zowe Explorer with SCS installed.

To Reproduce

Steps to reproduce the behavior:

  1. Ensure you have the latest versions of Zowe CLI and the Secure Credential Store for Zowe CLI (SCS) plug-in installed.
  2. In VS Code, install Zowe Explorer (v1.21.0) and Zowe Explorer Extension for FTP (v1.21.0).
  3. Create a zFTP profile with no credentials (i.e. no username or password).
  4. See the following error pop up:
    Screen Shot 2021-12-21 at 10 02 43 AM
  5. Upon the next restart of VS Code, Zowe Explorer activation will fail and show the same error.

Expected behavior

  • Zowe Explorer:

    • If a Zowe Explorer extender's meta YAML file specifies that username and password are required, perform input validation to enforce that the user must enter values for these fields.
    • If the user somehow has a no-credentials profile for a Zowe Explorer extender whose meta YAML file requires username and password, then gracefully handle this upon activation (i.e. without an error that causes Zowe Explorer activation to fail).
  • Zowe Explorer Extension for FTP/z/OS FTP Plug-in for Zowe CLI:

    • Reconsider if the username and password fields are truly required, or if they can be made optional.

Desktop (please complete the following information):

  • OS: MacOS and Windows (Thanks @jellypuno for helping me test!)
  • Zowe Explorer Version: 1.21.0
  • (Optional) Zowe CLI Version: Tested with Zowe CLI 6.33.1 (MacOS) and 6.37.0 (Windows)
  • (Optional) Are you using Secure Credential Store? Yes, version 4.1.5
@lauren-li lauren-li added bug Something isn't working zFTP labels Dec 22, 2021
@github-actions
Copy link

Thank you for creating a bug report. If you haven't already, please ensure you have provided steps to reproduce it and as much context as possible.

@JillieBeanSim
Copy link
Contributor

we could have a validation check of the input using the extenders schema to see if the field value is required and notify the user that this is a required field presenting the text box again similar to the check we have for the host value

@lauren-li
Copy link
Contributor Author

we could have a validation check of the input using the extenders schema to see if the field value is required and notify the user that this is a required field presenting the text box again similar to the check we have for the host value

@JillieBeanSim Sounds good to me!

@JillieBeanSim JillieBeanSim added API Extender Issues that allow Zowe Explorer to be extended externally and removed zFTP labels Feb 8, 2022
@JTonda JTonda added the 22PI2 label Mar 29, 2022
@JillieBeanSim JillieBeanSim mentioned this issue Mar 31, 2022
55 tasks
@zFernand0 zFernand0 added the v1-profiles relating specifically to v1 profiles management label Apr 28, 2022
@KutluOzel-b KutluOzel-b self-assigned this May 31, 2022
@KutluOzel-b
Copy link
Contributor

I followed the steps to repro but I couldn't and deleted v2 tried only with v1 and still no luck.
It is likely that I done something wrong while try to repro it ( I'm a new contributor ) but I started to wonder if this is still an issue.
Does anyone still able to reproduce it ? Any help is appreciated

@KutluOzel-b
Copy link
Contributor

No longer an issue as a result of the removal required fields in config schema.

Please refer to : imperative.ts

see the changes.

Hence closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Extender Issues that allow Zowe Explorer to be extended externally bug Something isn't working v1-profiles relating specifically to v1 profiles management
Projects
None yet
Development

No branches or pull requests

5 participants