-
Notifications
You must be signed in to change notification settings - Fork 6
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
Get-KeyChainConfiguration - is not set - how do I 'reset' it back to 'default'? #5
Comments
I have seen an error similar to this one when I responded to a password entry dialog box by pressing the cancel button several times. You obviously had the KeyChain module imported, but have you tried
The Get|Set KeyChainConfiguration functions only control the PasswordTimeout. The Register-SecretVault does the creation of a separate KeyChain that is used via pwsh. Your existing key chains (login, iCloud) are not used by the SecretManagement.KeyChain cmdlets. BTW - There is a menu option in KeyChain Access (Apple GUI tool for keychains) that will let you add SecretManagement.KeyChain-db to the Keychains viewable by this tool. |
@DonPwrShellHunt thanks. But even after running Is there a step by step and failsafe way to remove all parts of this module and then re-install it in such a way that I will end up with the module installed and the Keychain vault registered?
It looks to me that this module does not ever create the keychain db file ?
But a test seems to work ok?
|
@TheBigBear - There is an incorrect conditional test in Test-SecretVault for creating the keychain db file. Thanks for posting this issue. Since I wrote that conditional test, I'll submit a fix. If you want to experiment until this fix is published, run> A dialog asking for a new password for this keychain will pop up. You need to enter the new password twice. |
My original question still stands. How can I reset this to the default? How can I manually go in and what do I have to edit or what cmd line cmds or pwsh cmdlets do I have to run, so the KeyChain vault disappears 100% from the Mac OS level as well as on the pwsh modules registration and the SecretsManagement Vault definition levels? |
Thanks for that info. |
Microsoft.PowerShell.SecretManagement module handles the Register-SecretVault and Unregister-SecretVault commands and stores the vault details in the file under your MacOS home directory. As described in the README.md "Configuration of SecretManagement.KeyChain", the cmdlet Get-KeyChainConfiguration will trigger creation of this keychain resource. It does this by calling the extension cmdlet Test-SecretVault which detects if the keychain is present, and creates it if not present BTW - the assignment to $null is to prevent any unwanted data from being put into the pipeline as a result of this call. See Microsoft Docs If you cannot Register or Unregister a Vault, there are some basic PowerShell / Microsoft.PowerShell.SecretManagement installation issues. Take a look at the content of your vaultinfo file and make sure the ModulePath property of your vaults are accurate. You could also do the following if Microsoft.PowerShell.SecretManagement is working>
Using the latest versions of powershell itself & the SecretManagement modules is suggested. Also, keep in mind that if a vault is not your Default, you must specify the Vault name in secret management cmdlets.
|
@DonPwrShellHunt thank you so much for your detailed explanations. very helpful, much appreciated. |
If I run
Get-KeyChainConfiguration
I get an exception, expect this should not happen?How do I now reset the KeyChain configuration back to it's defaults, presumably with the help of the right parameters passed to
Set -KeyChainConfiguration
? ( removing, uninstalling and re-installing didn't do the trick )PS:
and FYI my PS Modules are at following versions:
SecretManagement.KeyChain
is at version0.1.2
Microsoft.PowerShell.SecretManagement
is at version0.9.0
Microsoft.PowerShell.SecretStore
is at version0.9.0
The text was updated successfully, but these errors were encountered: