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

zowe auth login apiml creates 2nd base profile #2181

Open
dkelosky opened this issue Jun 20, 2024 · 2 comments
Open

zowe auth login apiml creates 2nd base profile #2181

dkelosky opened this issue Jun 20, 2024 · 2 comments
Labels
bug Something isn't working priority-low Legit issue but cosmetic or nice-to-have severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases

Comments

@dkelosky
Copy link
Contributor

dkelosky commented Jun 20, 2024

Steps:

  1. run zowe config init and respond to prompts
  2. run zowe config auto-init and respond to prompts
  3. verify zowe jobs list jobs functions correctly after
  4. run zowe auth login apiml

This gives a response:

~/dev/systems/apiml> zowe auth login apiml
Do you want to store the host, port, and token on disk for use with future commands? If you answer Yes, the credentials will be saved to a base profile named 'base_apiml'. If you answer No, the token will be printed to the terminal and will not be stored on disk. [y/N]: y

Login successful. The authentication token is stored in the 'base_apiml' base profile for future use. To revoke this token and remove it from your profile, review the 'zowe auth logout' command.

My original base profile was:

        "base": {
            "type": "base",
            "properties": {
                "host": "mainframe.net",
                "rejectUnauthorized": true,
                "port": 60154,
                "tokenType": "apimlAuthenticationToken"
            },
            "secure": [
                "user",
                "password",
                "tokenValue"
            ]
        },

This auth command added:

        "base_apiml": {
            "type": "base",
            "properties": {
                "host": "mainframe.net",
                "port": 60154,
                "tokenType": "apimlAuthenticationToken"
            },
            "secure": [
                "tokenValue"
            ]
        }

Shouldn't login have instead performed a login to my existing base profile?

@dkelosky dkelosky added bug Something isn't working new The issue wasn't triaged yet labels Jun 20, 2024
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.

@JTonda JTonda added priority-low Legit issue but cosmetic or nice-to-have severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases and removed new The issue wasn't triaged yet labels Jun 24, 2024
@zFernand0
Copy link
Member

zFernand0 commented Jun 26, 2024

I had a chance to execute these commands.

I didn't expect to end up with a tokenValue and basic-auth in the same base profile after the auto-init operation.

But I believe the behavior of creating a new base_apiml profile is OK, since it prevents me from storing creds with token on the same base profile.

It is likely possible that I might be mixing things here, but I kind of remember us not wanting to store token and creds in the same base profile.


On a similar note, I would've expected the new base profile (base_apiml) to have remembered my rejectUnauthorized value since it did not ask for a host (meaning that it knows I'm connecting to the same one that had ru=false)

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-low Legit issue but cosmetic or nice-to-have severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases
Projects
Status: Low Priority
Development

No branches or pull requests

3 participants