zyborg / Zyborg.Vault

PowerShell bindings for HashiCorp Vault
https://zyborg.github.io/Zyborg.Vault/
MIT License
18 stars 5 forks source link

VaultSession parameter #2

Closed rashmisinghgaurav closed 6 years ago

rashmisinghgaurav commented 6 years ago

I am having trouble using this client. Can someone please let me know what is the vault session parameter and how the value would be constructed.

ebekker commented 6 years ago

A VaultSession is an object that has connected-state information already in it, such as the network endpoint and an authentication token. It is primarily for advanced usage scenarios where you need to establish a connection to a Vault server endpoint in some unique or special way outside of what is supported by this module, and most users will not need to worry about it.

Can you tell me what issues you are having using this client?

Do you have a Vault server instance up and running? Have you been able to successfully access it using the native vault CLI client?

rashmisinghgaurav commented 6 years ago

Hi Eugene,

Thanks for your response. I am trying to use this client to set app-role on the avult server and authenticate using app-role. However I am unable to use the cmdlets. I am getting these errors with most of the cmdlets:

PS C:\Users****> Write-VltData

cmdlet Write-VltData at command pipeline position 1 Supply values for the following parameters: Path: secret/hello Key[0]: value Key[1]: vaule1 Key[2]: Value[0]: hello Value[1]: hello1 Value[2]: Write-VltData : Method not found: 'System.String System.String.Format(System.IFormatProvider, System.String, System.Object, System.Object, System.Object)'.At line:1 char:1

Please note that I was able to successfully connect to the normal API

ebekker commented 6 years ago

Can you give me some details about your environment?

The error seems to indicate that a very basic method is missing from your environment context, which is strange.

rashmisinghgaurav commented 6 years ago

It is .NET Framework 4.5.2 OS: Windows7 64bit

rashmisinghgaurav commented 6 years ago

I am able to run the command now. You were right. There was some issue with the package installation on my system. I tried on AWS instance and it worked like a charm :) Thanks for your help!

ebekker commented 6 years ago

Glad it worked out.