imperative icon indicating copy to clipboard operation
imperative copied to clipboard

mergeArgsForProfile cannot read plain text credentials

Open dkelosky opened this issue 3 years ago • 0 comments

Running the profile load APIs in this sequence:

    const profInfo = new ProfileInfo("zowe", {
        requireKeytar: () => getNodeModule<NodeModule>("keytar")!
    });
   ...
     const profAttrs = profInfo.getDefaultProfile(profileType);
  ...
     const mergedArgs = profInfo.mergeArgsForProfile(profAttrs, { getSecureVals: false});

With this config (without a secure array):

{
    "$schema": "./zowe.schema.json",
    "profiles": {
        "sample": {
            "type": "sample",
            "properties": {
                "host": "localhost",
                "rejectUnauthorized": false,
                "port": 10080,
                "user": "zowe",
                "password": "zowe"
            },
            // "secure": [
            //     "user",
            //     "password",
            // ]
        }
    },
    "defaults": {
        "sample": "sample"
    },
    "plugins": []
}

It seems like mergedArgs has a secure: true property and fails to load; however, this property should load when not in the secure array.

dkelosky avatar Jul 27 '21 21:07 dkelosky