zowe / zowe-explorer-vscode

Visual Studio Code Extension for Zowe, which lets users interact with z/OS Data Sets, Unix System Services, and Jobs on a remote mainframe instance. Powered by Zowe SDKs.
Eclipse Public License 2.0
159 stars 89 forks source link

2.15.2 regression with mixed APIML/direct-to-service team config #2859

Closed adam-wolfe closed 2 months ago

adam-wolfe commented 2 months ago

Describe the bug

After updating from 2.15.1 to 2.15.2, I run into issues if my config has a base profile that points to the APIML and has an APIML token in the secure array. Instead of using the valid APIML authentication token from my base profile, I am instead prompted for username and password any time that I use a profile that goes through the APIML (though I can hit escape to get past the username prompt and still select a filter and get a list of files).

Direct-to-service profiles continue to work normally.

2 15 2-profile-issue-full-res-normal-speed

To Reproduce

Expected behavior

Desktop (please complete the following information):

Additional context

Here is my config:

{
    "$schema": "./zowe.schema.json",
    "profiles": {
        "Demo System": {
            "properties": {
                "host": "demosystem.net",
                "rejectUnauthorized": false
            },
            "secure": [
                "user",
                "password"
            ],
            "profiles": {
                "zosmf": {
                    "type": "zosmf",
                    "properties": {
                        "port": <zosmf-port>
                    }
                },
                "tso": {
                    "type": "tso",
                    "properties": {
                        "account": "",
                        "codePage": "1047",
                        "logonProcedure": ""
                    }
                },
                "ssh": {
                    "type": "ssh",
                    "properties": {
                        "port": <ssh-port>
                    }
                }
            }
        },
        "ssh-flat": {
            "type": "ssh",
            "properties": {
                "port": <ssh-port>,
                "host": "devsystem.net"
            },
            "secure": [
                "user",
                "password"
            ]
        },
        "ibmzosmf": {
            "type": "zosmf",
            "properties": {
                "host": "devsystem.net",
                "port": <zosmf-port>,
                "rejectUnauthorized": false,
            },
            "secure": [
                "user",
                "password"
            ]
        },
        "dev": {
            "profiles": {
                "zosmf": {
                    "type": "zosmf",
                    "properties": {
                        "basePath": "/ibmzosmf/api/v1"
                    }
                },
                "zosmf-dir": {
                    "type": "zosmf",
                    "properties": {
                        "host": "devsystem.net",
                        "port": <zosmf-port>,
                        "rejectUnauthorized": false
                    },
                    "secure": [
                        "user",
                        "password"
                    ]
                },
                "tso": {
                    "type": "tso",
                    "properties": {
                        "logonProcedure": ""
                    }
                },
                "ssh": {
                    "type": "ssh",
                    "properties": {
                        "port": <ssh-port>
                    },
                    "secure": [
                        "user",
                        "password"
                    ]
                },
                "zftp": {
                    "type": "zftp",
                    "properties": {
                        "port": <ftp-port>,
                        "secureFtp": true
                    },
                    "secure": [
                        "user",
                        "password"
                    ]
                }
            }
        },
        "base_apiml": {
            "type": "base",
            "properties": {
                "host": "devsystem.net",
                "port": <apiml-port>,
                "tokenType": "apimlAuthenticationToken"
            },
            "secure": [
                "tokenValue"
            ]
        }
    },
    "defaults": {
        "zosmf": "dev.zosmf",
        "tso": "dev.tso",
        "ssh": "ssh-flat",
        "zftp": "dev.zftp",
        "base": "base_apiml"
    },
    "autoStore": true,
    "CredentialManager": "@zowe/secure-credential-store-for-zowe-cli"
}
github-actions[bot] commented 2 months ago

Thank you for creating a bug report. We will investigate the bug and evaluate its impact on the product. If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.

adam-wolfe commented 2 months ago

After doing a bit more trial and error, I found that the 'zftp' profile type was not in my schema but it was in my extenders.json file. After deleting the extenders.json file, everything seems to be normal with 2.15.2. I'll assume that I caused this by jumping around between different versions of Zowe Explorer and is probably not an issue with 2.15.2. 😌