Skip to content

Separate SCS creds are stored for CMD and GitBash #2604

@gejohnston

Description

@gejohnston

Describe the bug

The directory path stored in the secure credential store creates separate entries when paths are identical except for case. On Windows, this can lead to multiple entries when switching between a CMD window and a GitBash window.

Expected and actual results

  1. In CMD:
    • mkdir ops (lower case ops)
    • chdir ops
    • zowe config secure
  2. In GitBash:
    • cd OPS (Upper case OPS. This is allowed on Windows and it enters the same directory as CMD did)
    • zowe config secure

You get two different entries in the Secure Credential Store, which differ by case, even though you only have one directory. The result is that when you run later zowe commands you may use the first set of credentials instead of your latest set of credentials depending on which command window you are in and whether you specified upper or lower case when changing into that directory with a given command window.

Since the information is hidden in the Secure Credential Store, the user has no indication of why the later zowe commands fail.

Here are the contents of such an SCS vault. Notice that the first directory is lowercase 'ops' in the first entry but the first directory is uppercase 'OPS' in the second entry. There is only one ops directory on this Windows system.

b'{
    "D:\\\\ops\\\\OPSMVS-REST-API\\\\zowe.config.json":
    {
        "profiles.zosmf.properties.user":"user",
        "profiles.zosmf.properties.password":"password",
        "profiles.tso.properties.user":"user",
        "profiles.tso.properties.password":"password",
        "profiles.ssh.properties.user":"user",
        "profiles.ssh.properties.password":"password",
        "profiles.ops.properties.user":"user",
        "profiles.ops.properties.password":"password",
        "profiles.zftp.properties.user":"user",
        "profiles.zftp.properties.password":"password"
    },
    "D:\\\\OPS\\\\OPSMVS-REST-API\\\\zowe.config.json":
    {
        "profiles.zosmf.properties.user":"user",
        "profiles.zosmf.properties.password":"password",
        "profiles.ssh.properties.user":"user",
        "profiles.ssh.properties.password":"password"
    }
}'

Describe your environment

Additional context

A possible solution may be to make all SCS entries case-insensitive when on Windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-mediumNot functioning - next quarter if capacity permitsseverity-mediumBug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex.

    Type

    No type

    Projects

    Status

    Medium Priority

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions