pcsclient: improvements to keyring handling#494
Open
berrange wants to merge 2 commits intointel:mainfrom
Open
Conversation
This is not available in some distros, and since it is merely a convenience to avoid repeated password entry, it can be made optional. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
On authentication errors with PCS, an attempt is made to clear the keyring. This may fail if the user's login environment has no keyring configured. The user would have declined to store the key when first prompted, so there would be nothing to clear either in this case. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Not all distros (in my case RHEL-9/10) have the python3-keyring module available.
Use of the keyring is not a critical feature of pccsadmin, just a "nice to have". The user already has the option to decline to store a password in the keyring, so it is conceptually reasonable to support running without the keyring module present at all.
Furthermore, when seeing an authentication failure, a failure to clear the keyring should be treated as non-fatal since the user may have declined to store in the keyring to begin with.
The equivalent patches were previously submitted as #480 and as #476 for pccsadmin. This new PR for pcsclient combines the two, since they were complementary parts of the same problem.
The changes are still applicable to the new separated pccsadmin tool, so have also been submitted to intel/confidential-computing.tee.dcap.pccs#39