-
Notifications
You must be signed in to change notification settings - Fork 85
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
fix(secrets): Reduce keychain unlock prompts on MacOS #2394
Conversation
Signed-off-by: Timothy Johnson <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2394 +/- ##
=======================================
Coverage 91.32% 91.32%
=======================================
Files 638 638
Lines 18210 18210
Branches 3823 3823
=======================================
Hits 16630 16630
Misses 1579 1579
Partials 1 1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Timothy Johnson <[email protected]>
5ac932d
to
9475e16
Compare
Signed-off-by: Timothy Johnson <[email protected]>
45d2bc0
to
7c0a0d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes make sense to me, thanks for the fix @t1m0thyj - pretty cool that fmutex
leverages the scope of the guard to auto-release the lock 😋
As discussed offline, failing tests are related to glibc
segfault with ava
- once workerThreads: false
is added, the stages will pass. Thanks for looking into this as well!
Signed-off-by: Timothy Johnson <[email protected]>
Signed-off-by: Timothy Johnson <[email protected]>
0104a49
to
fadf4e8
Compare
📅 Suggested merge-by date: 1/20/2025 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small suggestion about the changelog. Otherwise ready to approve.
Signed-off-by: Timothy Johnson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM! 😋
Signed-off-by: Timothy Johnson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add an issue or PR link to the changelog entry
Signed-off-by: Timothy Johnson <[email protected]>
Quality Gate passedIssues Measures |
Release succeeded for the The following packages have been published:
Powered by Octorelease 🚀 |
What It Does
Reduces the number of keychain unlock prompts on MacOS for simultaneous access to secrets by multiple instances of the same application.
As a security feature, MacOS always re-prompts for keychain access after a secret has been modified by another process. This is why after running
zowe config secure
which updates credentials usingnode
, you get a prompt for Zowe Explorer (the VS Code extension host process) to access credentials.Suppose there are 3 VS Code instances open: A, B, and C. Currently when a vault change event is triggered, all 3 instances attempt to access the keychain simultaneously and Mac users will see 3 keychain prompts (ouch).
By adding a mutex associated with the calling process, we can make B & C wait to access credentials until A has finished accessing them. Now Mac users will see just 1 keychain prompt (0 would be ideal but 1 is way better than 3).
How to Test
This PR can only be tested on MacOS since the issue is OS-specific:
keyring.node
artifact and copy it into your ZE prebuilds folder.xattr -d com.apple.quarantine *.node
zowe config secure
command and press Enter repeatedly to skip all prompts.Review Checklist
I certify that I have:
Additional Comments