PowerShell / SecretManagement

PowerShell module to consistent usage of secrets through different extension vaults
MIT License
317 stars 46 forks source link

Creating a Secret #215

Open BurtJohnsonfbl opened 9 months ago

BurtJohnsonfbl commented 9 months ago

Prerequisites

Steps to reproduce

According to the documentation I've seen, Set-Secret is supposed to create Secrets in Keeper. However, I cannot get that done thru PowerShell.

Set-Secret -Name "Just A Test" -Secret "P@ssVord" -Vault Keeper_SER_Creds

This returns an error "Set-Secret: Set-Secret can be used only on a single field"

I am probably doing something wrong, so I'm not sure if it is documentation opportunity or a bug or a feature.

Thanks, Burt

Expected behavior

I expect it to create an entry in Keeper.

Actual behavior

Error thrown as shown above.

Error details

Exception             :
    Type    : Microsoft.PowerShell.Commands.WriteErrorException
    Message : Set-Secret can be used only on a single field
    HResult : -2146233087
CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Microsoft.PowerShell.SecretManagement.SetSecretCommand
InvocationInfo        :
    MyCommand        : Set-Secret
    ScriptLineNumber : 1
    OffsetInLine     : 1
    HistoryId        : 1
    Line             : Set-Secret -Name "Just A Test" -Secret "P@ssVord" -Vault Keeper_SER_Creds
    PositionMessage  : At line:1 char:1
                       + Set-Secret -Name "Just A Test" -Secret "P@ssVord" -Vault Keeper_SE …
                       + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    InvocationName   : Set-Secret
    CommandOrigin    : Internal
ScriptStackTrace      : at Set-Secret, C:\Users\E015401\Documents\PowerShell\Modules\SecretManagement.Keeper\16.6.1\SecretManagemen
t.Keeper.Extension\SecretManagement.Keeper.Extension.psm1: line 73
                        at <ScriptBlock>, <No file>: line 19
PipelineIterationInfo :

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.0-preview.5
PSEdition                      Core
GitCommitId                    7.4.0-preview.5
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

-AND-

Name                           Value
----                           -----
PSVersion                      7.3.6
PSEdition                      Core
GitCommitId                    7.3.6
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

Not sure what Crescendo is

Visuals

No response

SydneyhSmith commented 4 months ago

Thanks @BurtJohnsonfbl from the SecretManagement perspective it looks like you are doing everything correct, the error message you are seeing is coming from the SecretManagement.Keeper module so I suggest opening an issue in that repo--thanks!