Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

V2: Failed to initialize Credential manager #324

@zFernand0

Description

@zFernand0

User may be forced to use plain text credentials.

image


Whenever there is a populated secure: [ ... ] array in a zowe.config.json file, the CICS extension fails to load V2 profiles.

Example `zowe.config.json` with secure properties

// zowe.config.json
{
    "$schema": "./zowe.schema.json",
    "profiles": {
        "zosmf": {
            "type": "zosmf",
            "properties": {
                "port": 443
            }
        },
        "cics": {
            "type": "cics",
            "properties": {
                "port": 5555,
                "protocol": "https",
                "regionName": "REGION"
            }
        },
        "base": {
            "type": "base",
            "properties": {
                "host": "my.host.net",
                "rejectUnauthorized": false,
                "port": 1234
            },
            "secure": [
                "user",
                "password"
            ]
        },
    },
    "defaults": {
        "zosmf": "zosmf",
        "cics": "cics",
        "base": "base"
    },
    "autoStore": true
}

//~/.zowe/settings/imperative.json
{
  "overrides": {
    "CredentialManager": "@zowe/cli"
  }
}

Equivalent `zowe.config.json` without secure properties

// zowe.config.json
{
    "$schema": "./zowe.schema.json",
    "profiles": {
        "zosmf": {
            "type": "zosmf",
            "properties": {
                "port": 443
            }
        },
        "cics": {
            "type": "cics",
            "properties": {
                "port": 5555,
                "protocol": "https",
                "regionName": "REGION"
            }
        },
        "base": {
            "type": "base",
            "properties": {
                "host": "my.host.net",
                "rejectUnauthorized": false,
                "port": 1234,
                "user": "my-user",
                "password": "my-password"
            }
        },
    },
    "defaults": {
        "zosmf": "zosmf",
        "cics": "cics",
        "base": "base"
    },
    "autoStore": true
}

//~/.zowe/settings/imperative.json
{
  "overrides": {
    "CredentialManager": false
  }
}


The following PR hides the error on refresh:

However, the problem still persist since no V2 profiles get loaded, and you can get the error to show again after doing a + (Create a CICS profile) operation

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions