Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.
This repository was archived by the owner on Dec 8, 2021. It is now read-only.

[SecretsManagement] [FeatureRequest] Pipeline Support and other "Powershelly" behavior #30

Open
@JustinGrote

Description

@JustinGrote

Summary of the new feature/enhancement

As a Powershell User, I want to be able to use pipelines to retrieve credentials and perform various manipulations using the secrets cmdlets to be more efficient

Examples:
Get-SecretInfo 'MyTestSecret' | Get-Secret
Get-Secret 'MyTestSecret' | Add-Secret -Name 'MyTestSecretDuplicate'
Get-SecretsVault 'builtinlocalvault' | Get-SecretInfo | where typename -eq 'String' | Get-Secret
Get-SecretsVault 'builtinlocalvault' | Get-Secret 'mysecret'
Get-AzureVMKeyVaultName | Get-SecretsVault | Get-Secret 'myAzureKeyVaultSecret'

Proposed technical implementation details (optional)

  • ValueByPropertyName should be added to name and vault properties at a minimum
  • Cmdlets should be sensitive to the type of piped object, for instance:
    Get-SecretsVault 'builtinlocalvault' | Get-SecretInfo - Would recognize that it is a [SecretsVaultInfo] and bind the pipeline to the Vault parameter
    'Test' | Get-SecretInfo - Would default strings and unknown types to the [String]Name parameter.
  • Objects like [SecretsVaultInfo] should have a .ToString() implemented that changes them to their vault name, so they can be coerced to the [String]$Vault parameter on Get-Secret if passed as a parameter e.g.
    $myvault = Get-SecretsVault Get-Secret 'mysecret' -vault $myvault

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-EnhancementFeature request or suggestionModule-SecretsManagementIssues for the Microsoft.PowerShell.SecretsManagement module

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions