I don't know how to name this issue but this is what I am experiencing. Please note that this is applicable for changes in the master branch only.
I added "Zowe-Plugin" in the security section of Zowe Settings.
Researched why this is happening, seems there is a bug in Imperative that when the profile property is set on the interface IUpdateProfile, then secure fields are stored twice. The first time they are stored with the correct values, but the second time they get overwritten with the string managed by <CredentialManager>.
The zowe profiles update command uses the interface IUpdateProfileFromCliArgs which sets the args property instead of the profile property. This stores the secure fields only once as expected.
Going to create an issue in Imperative to track this. Until it gets fixed, a workaround for Zowe Explorer is to change the following lines:
https://github.com/zowe/vscode-extension-for-zowe/blob/e3e9c10a6c33432014050b9048fd6f9652f65515/src/Profiles.ts#L321-L325
const updateParms = {
name: this.loadedProfile.name,
merge: true,
args: { user: NewProfileInfo.user, password: NewProfileInfo.password }
};
This issue was fixed in v1.6.0
Most helpful comment
Researched why this is happening, seems there is a bug in Imperative that when the
profileproperty is set on the interfaceIUpdateProfile, then secure fields are stored twice. The first time they are stored with the correct values, but the second time they get overwritten with the stringmanaged by <CredentialManager>.The
zowe profiles updatecommand uses the interfaceIUpdateProfileFromCliArgswhich sets theargsproperty instead of theprofileproperty. This stores the secure fields only once as expected.Going to create an issue in Imperative to track this. Until it gets fixed, a workaround for Zowe Explorer is to change the following lines:
https://github.com/zowe/vscode-extension-for-zowe/blob/e3e9c10a6c33432014050b9048fd6f9652f65515/src/Profiles.ts#L321-L325