PowerShell / SecretManagement

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

Binary extension module not returning objects? #213

Open parithon opened 1 year ago

parithon commented 1 year ago

Prerequisites

Steps to reproduce

I'm attempting to learn how to develop a vault using a binary extension to a front-end PowerShell module. However, it doesn't return the information I expect. I am building the Parithon.Test.Vault.Extension using netstandard2.0.

  1. Clone: https://github.com/parithon/Parithon.Test.Vault
  2. Run the following: .\build.ps1
  3. Execute the following: Register-TestVault -Name <name>
  4. Then execute: Get-SecretInfo -Verbose

Expected behavior

When running `Get-SecretInfo` I expect two objects to returned

Actual behavior

I see my verbose messages logged to the console, but no objects are returned.

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      5.1.22621.963
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.963
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Version

NA

Visuals

PS > Get-SecretInfo -Verbose
VERBOSE: Invoking command Get-SecretInfo on module Parithon.Test.Vault.Extension VERBOSE: Sending: {"Name":"MySecret","Type":"Hashtable","VaultName":"Test","Metadata":{}} VERBOSE: Sending: {"Name":"MySecret2","Type":"PSCredential","VaultName":"Test","Metadata":{"Description":"Some description about this secret.","Alt":"Message"}} VERBOSE: EndProcessing VERBOSE: Secret information was successfully retrieved from vault Test. PS >