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

Feature: allow generation of secrets if missing in Vault #9

Open
hggh opened this issue Nov 27, 2018 · 2 comments · May be fixed by #85
Open

Feature: allow generation of secrets if missing in Vault #9

hggh opened this issue Nov 27, 2018 · 2 comments · May be fixed by #85

Comments

@hggh
Copy link

hggh commented Nov 27, 2018

It would be nice to have some sort of a password generation option to the vault_lookup function.

some usecases:

  • lookup key has the hostname of the server "root/password/${hostname}" if the key and the secrect does not exists. vault_lookup will generate a new password and save it to Vault. So every server has a different root password
  • bootstrap a new MySQL/MariaDB Server with a new mysql root password

The idea of this feature request to have Vault with the features of trocla (https://github.com/duritong/trocla). Trocla allows autogenerating a password if it does not exist.

@hggh hggh changed the title Feature: allow generation of secrects if missing in Vault Feature: allow generation of secrets if missing in Vault Nov 27, 2018
@petems
Copy link
Member

petems commented Nov 30, 2018

This is actually pretty cool, but I feel like this might be pushing the boundries of the use-case for lookup...

I'm writing up some Vault helpers and other things as functions (eg. AWS credentials, fetching tokens etc) so I'll see if I can make a basic one for setting a password if i get the time 😄

@sircubbi
Copy link

We are using a separate lookup-function named vault_lookup::lookupgen which takes two parameters (lookupkey and passwordlength) to create a new password if not present at the location.

See attached patch for some ideas (note that this function also hardcodes the vault-path to the puppetmaster and also inserts the FQDN to the path.
lookupgen.txt

sircubbi added a commit to sircubbi/puppet-vault_lookup that referenced this issue Sep 5, 2023
@sircubbi sircubbi linked a pull request Sep 5, 2023 that will close this issue
sircubbi added a commit to sircubbi/puppet-vault_lookup that referenced this issue Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants