Handle profile creation/update for ZE extender profiles requiring credentials when the user leaves them blank
See original GitHub issueDescribe 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:
- Ensure you have the latest versions of Zowe CLI and the Secure Credential Store for Zowe CLI (SCS) plug-in installed.
- In VS Code, install Zowe Explorer (v1.21.0) and Zowe Explorer Extension for FTP (v1.21.0).
- Create a zFTP profile with no credentials (i.e. no username or password).
- See the following error pop up:
- 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
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5 (4 by maintainers)
Top GitHub Comments
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.
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