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.

[SecretManagement] Set-Secret does not accept string value. #93

Closed

Description

Steps to reproduce

Set-Secret -Vault MyAzVaultName -Name 'Staging-SomeSecreet' -Secret 'SomeSecret'

Expected behavior

Secret is set in the vault


Actual behavior

Set-Secret: Cannot bind parameter 'SecretValue'. Cannot convert the "SomeSecret" value of type "System.String" to type "System.Security.SecureString".

String is part of the [Microsoft.PowerShell.SecretManagement.SecretType] enum types.
There is also a distrinct -SecureStringSecret parameter so I'd expect to be able to set my secret as a string by using the -Secret instead of having to to a ConvertTo-SecureString -AsPlainText -Force first to be able to set it.

Environment data

Module version:

PSVersion                      7.1.0-preview.3
PSEdition                      Core
GitCommitId                    7.1.0-preview.3
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Activity

  1. added
    Issue-Question
    on Jun 16, 2020
  2. itfranck commented on Jun 17, 2020

    @itfranck
    Author

    I am closing this issue.
    After some investigation, the problem lies in the Az.Keyvault implementation and not the SecretManagement module (Possibly Az.keyvault implementation predate the current version of this module or it was simply partially implemented.)

    Az.Keyvault module only support

    Here's the issue I created on the Azure-Powershell repository instead to encompass this.
    Azure/azure-powershell#12190

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-Question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions