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

Notify extenders when changes to the vault have been made #1987

Open
Tracked by #2070
rudyflores opened this issue Dec 1, 2023 · 4 comments
Open
Tracked by #2070

Notify extenders when changes to the vault have been made #1987

rudyflores opened this issue Dec 1, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request priority-medium Not functioning - next quarter if capacity permits

Comments

@rudyflores
Copy link

Is your feature or enhancement request related to a problem or limitation? Please describe

As a developer for Zowe Explorer, when a user makes changes to their credentials in the vault through imperative, our extenders have no actual way to find out when a change to the vault is made, this could be notified when any CRUD operation is done using imperative when interacting with the vault (this being the keychain, kubernetes secrets, etc).

Describe your enhancement idea

As discussed with @t1m0thyj this could be implemented by creating an event emitter called onVaultUpdate() that when fired will notify anyone using imperative for managing credentials that a change in the vault has occured regarding their credentials, furthermore allowing up to date information to be synced among Zowe profiles.

In Zowe Explorer we have already something like this for changes on our team config profiles (v2) called onProfilesUpdate() which fires when any CRUD operation is performed for team config profiles. This new onVaultUpdate() function could be something we could attach to our existing event emitter in order to keep up to date both important components of a users profile data, this being:

a. The team configuration profile
b. The vault storing the profile's credentials

Describe alternatives you've considered

Currently no alternatives, only the fact that we can trigger our own event emitter when performing very specific credential operations in Zowe Explorer, implementing this in imperative could provide full coverage for keeping credential data up to date accross extensions using imperative.

Provide any additional context

@rudyflores rudyflores added enhancement New feature or request new The issue wasn't triaged yet labels Dec 1, 2023
Copy link

github-actions bot commented Dec 1, 2023

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

@JTonda JTonda added priority-low Legit issue but cosmetic or nice-to-have and removed new The issue wasn't triaged yet labels Dec 4, 2023
@zFernand0 zFernand0 added priority-medium Not functioning - next quarter if capacity permits v3 prospective changes for v3 and removed priority-low Legit issue but cosmetic or nice-to-have labels Dec 12, 2023
@adam-wolfe adam-wolfe mentioned this issue Jan 4, 2024
26 tasks
@zFernand0 zFernand0 self-assigned this Jan 24, 2024
@zFernand0
Copy link
Member

A lot of great discussion has occurred around this.
Leaving this Box gDoc with the summary of the investigation.
https://ent.box.com/s/ltr54ilsvpo5wscg2ca1tj8etag66zya

Here is a TL;DR:
Idea:

  • Shared events: $ZOWE_CLI_HOME/.events/<eventID>
  • User events: ~/.events/<eventID>

Implementation:

  1. Create a hidden directory (called .events) under the User’s home directory (for user specific events) and the $ZOWE_CLI_HOME directory (for shared events).
  2. Write to files (called <eventID>) with the timestamp of the event. The contents of the event will be dictated by the IImperativeEventJson. The emit method (i.e. writing of event files) will be implemented as an Imperative API.
  3. Allow applications to subscribe to these events. The subscribe method (i.e. registration of callback methods) will be implemented as an Imperative API.
  4. Let applications dispose of these event subscriptions.

@zFernand0 zFernand0 removed the v3 prospective changes for v3 label Feb 14, 2024
@zFernand0
Copy link
Member

Removed assignees until someone is assigned to work on this issue.
And removed the v3 label since this can be implemented as a non-breaking enhancement after V3 goes GA.

@rudyflores
Copy link
Author

Thank you so much for the support on the Imperative end of this work! This should be a very impactful change for our users :)

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: In Progress
Development

No branches or pull requests

6 participants