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

v3: Should presence of tokenValue in profile take precedence over user and password? #1794

Open
t1m0thyj opened this issue Aug 28, 2023 · 3 comments
Assignees
Labels
community-issue keep Issues with this label will be ignored by the stale bot priority-medium Not functioning - next quarter if capacity permits question Further information is requested

Comments

@t1m0thyj
Copy link
Member

t1m0thyj commented Aug 28, 2023

Question: If a profile in zowe.config.json has both tokenValue and user/password defined, which should take precedence?
Please read the context below and react to this issue with an emoji:

  • 👍 if you think tokenValue should take precedence
  • 👎 if you think user and password should take precedence

Current Behavior
In Zowe v2, the behavior is different between Zowe CLI (and SDKs) and Zowe Explorer.
Zowe CLI gives precedence to user and password. They must be removed from the profile for tokenValue to take effect.
Zowe Explorer gives precedence to tokenValue instead.

Expected Behavior
In Zowe v3, we could make this behavior consistent between CLI and Explorer.
Since it is a new major version, breaking changes to the order of precedence are allowed in accordance with semver.
It has been suggested by some users (see zowe/imperative#1008) that tokenValue should have precedence.

@gejohnston
Copy link
Member

When considering your votes on a change in the order of precedence of authentication, keep the following concern in mind.

User/password were given top precedence to accommodate the following scenario. Your site is using APIML with token authentication (with your token stored in your base profile). However, 2 of your 10 services are not integrated yet with APIML. Thus you must use user/password with those 2 services. You put user/password on the profiles for those 2 individual services. Those 2 services will have both a token (from your base profile) and user/password (from the service profile). It is only because user/password take precedence over tokens that you can connect directly to those 2 services, while the other 8 services only have an APIML token and connect through APIML.

If the order were changed to have token take precedence, then an APIML token would be passed directly to the 2 direct-to-service apps. That authentication would fail and you would have no way to connect to those 2 services.

I think that any solution to accommodate all scenarios will require a more elaborate implementation beyond simply changing the authentication order of precedence. The potential user impact of such changes is another reason why a complete solution should be targeted for V3.

@t1m0thyj
Copy link
Member Author

Discussed with the team on today's standup - here are some additional concerns to keep in mind when voting, thanks @gejohnston and @zFernand0 for mentioning them 🙂

We also need to consider certificates if we make changes to the order of precedence. Currently the order is as follows: (1) User/password, (2) Token, (3) Certificate

If the desired order of precedence varies for different use cases, perhaps we could add a setting to zowe.config.json files that would allow users to define the order. For example:

"authTypePriority": ["token", "basic", "cert"]

@adam-wolfe adam-wolfe pinned this issue Aug 30, 2023
@JTonda JTonda added the priority-medium Not functioning - next quarter if capacity permits label Sep 13, 2023
@zFernand0 zFernand0 added the keep Issues with this label will be ignored by the stale bot label Sep 25, 2023
@t1m0thyj t1m0thyj moved this to Medium Priority in Zowe CLI Squad Dec 26, 2023
@adam-wolfe adam-wolfe added for-review-pm and removed for-review-pm v3 prospective changes for v3 labels Feb 14, 2024
@adam-wolfe
Copy link
Contributor

I think it is safe to say that no change is planned in this regard for Zowe V3. Allowing users to specify an order of precedence is likely the safest answer and could be added without introducing breaking changes.

@gejohnston gejohnston self-assigned this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-issue keep Issues with this label will be ignored by the stale bot priority-medium Not functioning - next quarter if capacity permits question Further information is requested
Projects
Status: Medium Priority
Development

No branches or pull requests

5 participants