Skip to content

Add Cmdlets for storing Credentials in OS credential store #2110

Closed

Description

The Get-Credential works well for interactive sessions, but to execute scripts non-interactively, credentials often need to get stored in a secure place, which is a challenge for most PowerShell users. As at least Windows and Mac OS X (Keychain) offer secure credential stores, it would be great if Cmdlets could be added to PowerShell to securely store credentials in the OS credential store. PowerShell Credentials Manager, an implementation for Windows PowerShell can be found in the Technet Gallery.

This would increase usability of PowerShell for non-interactive scripting and enhance security for the average user.

Activity

  1. added
    Issue-Enhancement
    WG-Cmdlets
    on Sep 1, 2016
  2. devblackops commented on Sep 2, 2016

    @devblackops
    Contributor

    I think Joel Bennett (@Jaykul) implements what you are asking for in his BetterCredentials module. That module adds some extra functionality to Get-Credential.

    Get-Credential UserName -Store

    If you haven't stored the password for "UserName", you'll be prompted with the regular PowerShell credential prompt, otherwise it will read the stored password.
    In either case, it will store (update) the credentials in the Vault

    Perhaps that type of behavior should be added to the native Get-Credential cmdlet.

  3. ffeldhaus commented on Sep 2, 2016

    @ffeldhaus
    ContributorAuthor

    BetterCredentials looks interesting, but it also relies on the Advapi32.dll for storing credentials which is Windows specific. Secure Credential Management is essential and enabline PowerShell to use the Credential stores Microsoft and Apple recommends would be a great way to increase security for PowerShell scripts (especially non-interactive ones).

  4. Jaykul commented on Sep 19, 2016

    @Jaykul
    Contributor

    Although I'd theoretically like to make mine cross-platform, I don't have a MacBookPro anymore, so I won't be implementing that myself...

    Since even the credential prompt OS-specific -- they might as well implement cross-platform native storage in the core.

    For better or worse, I've actually been considering going the opposite direction, and making the storage pluggable, so that it can use something that's not user+machine specific, maybe KeePass or Thycotic SecretServer etc.

  5. added
    Up-for-Grabs
    on Nov 1, 2016
  6. felixfbecker commented on Sep 21, 2018

    @felixfbecker
    Contributor

    macOS Keychain can be accessed through a CLI command, which could be easily wrapped in BetterCredentials. But shelling out in core commands is kind of weird.

  7. iSazonov commented on Sep 29, 2019

    @iSazonov
    Collaborator

    RFC PowerShell/PowerShell-RFC#208
    Please discuss there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-EnhancementResolution-AnsweredUp-for-GrabsWG-Cmdlets

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions