Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log out from API ML is not available anymore with Manage Profile menu #2633

Closed
Tracked by #2252
roman-kupriyanov opened this issue Dec 18, 2023 · 6 comments · Fixed by #2639, #2668, zowe/zowe-cli#2135 or #2913
Closed
Tracked by #2252
Assignees
Labels
bug Something isn't working priority-medium Not functioning - next quarter if capacity permits severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex.
Milestone

Comments

@roman-kupriyanov
Copy link
Contributor

roman-kupriyanov commented Dec 18, 2023

Describe the bug

After using the "Manage Profile -> Log in to authentication service" option for the z/OSMF type of the profile and successful login, the "Log out" option does not appear anymore after the introduction of "Manage Profile" menu.

To Reproduce

  1. Right click on the API ML type of profile in the Zowe Explorer Data Sets / USS / Jobs view (for me - "zosmf-apiml")
  2. Select "Manage Profile".
  3. Use "Log in to authentication service" item.
  4. After login is successful, return to "Manage Profile" menu for the same profile and notice that only "Log in" is still available and not "Log out" (see screenshot below).

Expected behavior

After successful login to API ML using Zowe Explorer, it is expected to be able to logout using ZE too. For now the only way is to use Zowe CLI for that.

Screenshots

image

Desktop:

  • OS: macOS 14.2
  • Zowe Explorer Version: 2.13.0
  • Zowe CLI Version: 7.18.8
  • Are you using Secure Credential Store? Yes

Additional info

Base profile in the Team config:

"base": {
            "type": "base",
            "properties": {
                "host": "apiml.services.net",
                "protocol": "https",
                "port": 60080,
                "rejectUnauthorized": true,
                "tokenType": "apimlAuthenticationToken"
            },
            "secure": [
                "tokenValue"
            ]
        },

Actual z/OSMF profile:

"zosmf-apiml": {
    "type": "zosmf",
    "properties": {
        "basePath": "/ibmzosmf/api/v1"
    }
}
@roman-kupriyanov roman-kupriyanov added the bug Something isn't working label Dec 18, 2023
Copy link

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.

@t1m0thyj t1m0thyj added priority-low Legit issue but cosmetic or nice-to-have severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex. and removed needs more info labels Dec 21, 2023
@JillieBeanSim
Copy link
Contributor

This was resolved with PR #2639 and will be included in an upcoming release

Screen.Recording.2024-01-05.at.4.56.19.PM.mov

@JillieBeanSim JillieBeanSim linked a pull request Jan 5, 2024 that will close this issue
16 tasks
@adam-wolfe
Copy link
Contributor

I ran into something very similar this morning even with a new build of the main branch. #2652

I found that I had a zowe.config.json in my user home directory as well as in the ~/.zowe directory. After deleting the config in my user home directory, I have been unable to recreate this issue, and I do not know what caused the behavior to start initially.

So, I think this will not be resolved by #2639.

@adam-wolfe adam-wolfe reopened this Jan 8, 2024
@adam-wolfe
Copy link
Contributor

After some more trial and error, I have been able to recreate this. It may be related to #2637.

Here is my config:

{
    "$schema": "./zowe.schema.json",
    "profiles": {
        "zosmf": {
            "type": "zosmf",
            "properties": {
                "port": [zosmf direct port]
            },
            "secure": [
                "user",
                "password"
            ]
        },
        "zosmf-apiml": {
            "type": "zosmf",
            "properties": {
                "basePath": [api base path]
            }
        },
        "base": {
            "type": "base",
            "properties": {
                "host": [host name],
                "protocol": "https",
                "port": [apiml port],
                "rejectUnauthorized": true,
                "tokenType": "apimlAuthenticationToken"
            },
            "secure": [
                "tokenValue"
            ]
        }
    },
    "defaults": {
        "zosmf": "zosmf",
        "base": "base"
    },
    "autoStore": true
}

If you delete the secure array from the 'zosmf' profile, the Manage Profiles menu for 'zosmf-apiml' returns to normal.

@adam-wolfe adam-wolfe added priority-medium Not functioning - next quarter if capacity permits and removed priority-low Legit issue but cosmetic or nice-to-have labels Jan 9, 2024
@t1m0thyj t1m0thyj self-assigned this Jan 11, 2024
@zFernand0 zFernand0 added this to the v2.14.0 milestone Jan 17, 2024
@roman-kupriyanov
Copy link
Contributor Author

Hello, seems I have this issue appeared again.

  • OS: macOS 14.4.1
  • Zowe Explorer Version: 2.15.4
  • Zowe CLI Version: 7.24.2
  • Are you using Secure Credential Store? Yes

This time I use ~/.zowe/zowe.config.user.json to override some profile parameters in my ~/.zowe/zowe.config.json.

~/.zowe/zowe.config.user.json:

{
  "$schema": "./zowe.schema.json",
  "profiles": {
    "mfts": {
      "properties": {
        "ccid": "TEST",
        "comment": "Changes by ME"
      },
      "profiles": {
        "demobox": {
          "type": "endevor-location",
          "properties": {
            "subsystem": "DEMOBOX"
          },
          "secure": []
        },
        "my-sandbox": {
          "type": "endevor-location",
          "properties": {
            "subsystem": "MYBOX"
          },
          "secure": []
        }
      }
    },
    "mfne": {
      "properties": {
        "instance": "MFNE",
        "type": "*",
        "ccid": "TEST",
        "comment": "Changes by ME"
      },
      "profiles": {
        "other-sandbox": {
          "type": "endevor-location",
          "properties": {
            "environment": "DEV",
            "stageNumber": "1",
            "system": "SYSTEST",
            "subsystem": "SBSTEST"
          },
          "secure": []
        }
      }
    }
  },
  "defaults": {
    "endevor-location": "mfts.my-sandbox"
  }
}

.zowe/zowe.config.json:

{
  "$schema": "./zowe.schema.json",
  "profiles": {
    "base": {
      "type": "base",
      "properties": {
        "host": "apiml.services.net",
        "protocol": "https",
        "port": 60608,
        "rejectUnauthorized": true,
        "tokenType": "apimlAuthenticationToken"
      },
      "secure": ["tokenValue"]
    },
    "my-mf": {
      "profiles": {
        "zosmf": {
          "type": "zosmf",
          "properties": {
            "port": 1443
          },
          "secure": []
        },
        "zosmf-apiml": {
          "type": "zosmf",
          "properties": {
            "basePath": "/ibmzosmf/api/v1"
          }
        },
        "endevor-apiml": {
          "type": "endevor",
          "properties": {
            "basePath": "/caendevorapi/api/v2"
          }
        }
      }
    },
    "mfts": {
      "properties": {
        "environment": "DEV",
        "instance": "MFTS",
        "system": "SYSPROD",
        "stageNumber": "1",
        "type": "*"
      },
      "profiles": {
        "app-hotfixes": {
          "type": "endevor-location",
          "properties": {
            "environment": "QA",
            "subsystem": "SYSPROD"
          },
          "secure": []
        },
      }
    },
  },
  "defaults": {
    "base": "base",
    "endevor": "my-mf.endevor-apiml",
    "endevor-location": "mfts.app-hotfixes",
    "zosmf": "my-mf.zosmf-apiml"
  },
  "autoStore": true
}

After the API ML successful login using "Manage profile" menu on my-mf.zosmf-apiml profile (tokenType and tokenValue appears in the base profile in the zowe.config.json file), I still cannot see the logout option:

image

Can confirm though if I remove the User config everything works as expected and the logout option is in place.

@t1m0thyj
Copy link
Member

t1m0thyj commented May 9, 2024

@roman-kupriyanov Thanks for reporting this! We have found the underlying issue lies in Imperative. I've opened zowe/zowe-cli#2135 to fix it there. Once it is merged we'll update the Imperative dependency in Zowe Explorer 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-medium Not functioning - next quarter if capacity permits severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex.
Projects
Status: Closed
5 participants