Zowe explorer - Must have user & password OR base64 encoded credentials
search cancel

Zowe explorer - Must have user & password OR base64 encoded credentials

book

Article ID: 395513

calendar_today

Updated On:

Products

Brightside

Issue/Introduction

Using the APIML to authenticate and have no problem to use ZOWE CLI. 

zowe auth login apiml --base-p lpar1

zowe files list ds 'XXX.XXX.XXX' --zosmf-p lpar1.zosmf --show-inputs-only
commandValues: 
  host:                hostname
  port:                port
  reject-unauthorized: false
  base-path:           /ibmzosmf/api/v1/
  protocol:            https
  show-inputs-only:    true
  zosmf-profile:       lpar1.zosmf
  token-type:          apimlAuthenticationToken
  token-value:         --this prints a valid token--
optionalProfiles: 
  - zosmf
  - base
locations: 
  - C:\Users\XXXX\.zowe\zowe.config.user.json
  - C:\Users\XXXX\.zowe\zowe.config.json

 

When trying to search for data sets under the lpar1.zosmf profile in zowe explorer, got the prompt to "Login to Authentication Service",  also got 'Must have user & password OR base64 encoded credentials' error. 

 

Environment

VSCode - 1.94.2

Zowe Explorer - v3.1.2

ZOWE CLI Version: 8.11.0
Zowe Release Version: v3.1.0

Cause

zowe.config.user.json has a base profile, and it also sets as defaults. 

        "base_apiml": {
            "type": "base",
            "properties": {
                "host": host,
                "port": port,
                "tokenType": "apimlAuthenticationToken"
            },
            "secure": [
                "tokenValue"
            ]
        }
    },
    "defaults": {
         "base": "base_apiml"
    }

Resolution

Avoid placing a base profile in user configuration, as the user config is designed for adding user-specific overrides. Having this base profile in user configuration may cause its tokenValue to take priority.

Solution: 

Remove the base profile from the user configuration, then issue

zowe auth login apiml --base-p lpar1  

  • Enter TSO username and password to authenticate with the API ML
  • Once successful, a tokenValue is placed in the secure property in the Lpar1 group, and the tokenType property is added to its properties section.

zowe files list ds 'myuser.*' --zosmf-p lpar1.zosmf

After running these commands, switch to Zowe Explorer and search for data sets under this profile.