Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing credentials #128

Closed
ghost opened this issue Dec 5, 2017 · 2 comments
Closed

Passing credentials #128

ghost opened this issue Dec 5, 2017 · 2 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Dec 5, 2017

Hi,
I'm not very familiar with your Powershell module but it is exactly what i am looking for!

It works great so far but I have a question.
Is it possible to pass the master password to a request so that i dont have to enter it every time I do a request? I know that i could do the same thing with a Master Key but i would like to save the credetials encrypted with dapi. It looks a bit more safe than a file which grants you direct access to the database.

So a Parameter like "-Credentials" would be great.

Or maybe, I would at least aks for them once like
$KeeCred = Get-Credentials -Credentials KeePass
Get-KeePassEntry -AsPlainText -DatabaseProfileName TestDB -Credentials $KeeCred

Cheers!

@jkdba
Copy link
Member

jkdba commented Dec 6, 2017

@AchdukeNavaron

Glad it is working out well for you!

Currently you can pass the the master password (called the masterkey in the context of the module) by using the -MasterKey parameter on any of the supported function calls (should be all of them where it makes sense).

Example usage:

# Create a Credential Object Variable
# this will prompt you for the master password for a scriptable usage please read the MS documentation # on the Get-Credential function
$KeeCred =  Get-Credential -Message 'MasterKey Password:' -UserName 'KeePass'

# make a call with this Credential using the secure string password
Get-KeePassEntry -AsPlainText -DatabaseProfileName TestDB -MasterKey $KeeCred.Password

Note when testing this I did find a bug; you are supposed to be able to pass a cred, or secure string to the -MasterKey parameter however for the time being only secure strings are working hence the use of the credential objects Password property in the example (-MasterKey $KeeCred.**Password**).

Will open a bug for the aforementioned issue.

@jkdba jkdba self-assigned this Dec 6, 2017
@jkdba jkdba added the question label Dec 6, 2017
@jkdba
Copy link
Member

jkdba commented Dec 6, 2017

created bug #129 for the issue found.

@jkdba jkdba closed this as completed Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant