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

Cannot switch from basic auth. to token-based auth. #2590

Open
Tracked by #2835
traeok opened this issue Nov 21, 2023 · 5 comments · May be fixed by #2867
Open
Tracked by #2835

Cannot switch from basic auth. to token-based auth. #2590

traeok opened this issue Nov 21, 2023 · 5 comments · May be fixed by #2867
Assignees
Labels
enhancement New feature or request priority-medium Not functioning - next quarter if capacity permits
Milestone

Comments

@traeok
Copy link
Member

traeok commented Nov 21, 2023

Describe the bug

Previously, a user could access the "Log in to authentication service" option to update a profile to use token-based authentication.

Now, starting with v2.12.0: if a user has basic authentication configured for a specific profile, that profile cannot be updated to token-based auth. using Zowe Explorer. This is because the "Manage Profile" feature hides certain options based on the profile's current authentication type.

To Reproduce

  • Configure a profile so that it uses basic authentication and secure props (user/password)
  • Right-click on the profile -> select "Manage Profile"
  • Notice that there is no longer an option to log in using an authentication service

Expected behavior

The "Log in to authentication service" option should still be accessible when managing profiles that use basic authentication.
If necessary, we can warn the user that they are switching their authentication type if trying to switch from token-based -> basic, or vice versa.

Desktop (please complete the following information):

  • OS: Windows 10
  • Zowe Explorer Version: latest on main (2.12.2)
  • (Optional) Zowe CLI Version: N/A
  • (Optional) Are you using Secure Credential Store? Yes

Additional context

One workaround is to remove the user and password props from the secure array in the Zowe config, but this is not generally recommended.

@traeok traeok added the bug Something isn't working label Nov 21, 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.

@JTonda JTonda added enhancement New feature or request priority-medium Not functioning - next quarter if capacity permits and removed bug Something isn't working labels Nov 30, 2023
Copy link

Thank you for raising this enhancement request.
The community has 90 days to vote on it.
If the enhancement receives at least 10 upvotes, it is added to our development backlog.
If it receives fewer votes, the issue is closed.

@t1m0thyj
Copy link
Member

The opposite is also true - cannot switch from token auth to basic auth, unless you add a secure array containing "user" and "password" to the profile you want to use basic auth for.

@SanthoshiBoyina SanthoshiBoyina self-assigned this Mar 7, 2024
@t1m0thyj
Copy link
Member

t1m0thyj commented Apr 3, 2024

We have a way to clear the secure array using Imperative's low-level Config API:

const profName = "base";
const profAttrs = profCache.getProfileFromConfig(profName);
const configApi = (await profCache.getProfileInfo()).getTeamConfig();
configApi.set(`${profAttrs.profLoc.jsonLoc}.secure`, []);
configApi.save();

This requires that you know the name of the profile where the secure array is located. Perhaps it would be more convenient for us to add a method to the ProfileInfo API that given a profile name, can find the service or base profile where the secure array is located and clear it?

@zFernand0
Copy link
Member

Perhaps it would be more convenient for us to add a method to the ProfileInfo API that given a profile name, can find the service or base profile where the secure array is located and clear it?

FWIW, I kind of agree with this 😋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-medium Not functioning - next quarter if capacity permits
Projects
Status: Review/QA
6 participants