Giter Site home page Giter Site logo

Comments (11)

jeremyfreudberg avatar jeremyfreudberg commented on July 21, 2024

it's in a lot more places than just there... but yeah accepting "private repo" as an adequate solution was supposed to be temporary.

from moc-openstack-tools.

ianballou avatar ianballou commented on July 21, 2024

I'll probably end up working on getting this set first, it's one of a few issues that came up from the meeting last night with @kamfonik

from moc-openstack-tools.

greyspectrum avatar greyspectrum commented on July 21, 2024

I would like to see this change, as well. The settings.ini does need to be backed up somewhere, otherwise rebuilding the moc-openstack-tools vm in a timely way becomes a headache.

This is a tool I recently became aware of, but haven't yet played with, that purports to address this problem:

https://www.hashicorp.com/blog/Vault-announcement/

Here's a general overview:

https://www.vaultproject.io/intro/index.html

Source:

https://github.com/hashicorp/vault

from moc-openstack-tools.

ianballou avatar ianballou commented on July 21, 2024

Which part of the process would become more difficult? Are there many places that need the Kaizen password to be inserted?

from moc-openstack-tools.

greyspectrum avatar greyspectrum commented on July 21, 2024

@Izhmash Whenever moc-openstack-tools talks to Keystone, it needs the addusers password. The advantage to using Vault would be twofold: we could remove the addusers password from the private Github repo and we could remove it from the moc-openstack-tools VM, as well.

Instead, moc-openstack-tools could query Vault, either with vault read or the Vault API, fetch the addusers password, and use it to authenticate to Keystone, all without storing that password on disk. That's my understanding of how Vault would work. The same thing could be done for the Google API key that moc-openstack-tools uses, as well.

Using Vault just to manage secrets for moc-openstack-tools is probably overkill, but it would be an interesting place to experiment with using it, in case it turns out to be a useful way to manage secrets, like API keys, for other systems.

from moc-openstack-tools.

ianballou avatar ianballou commented on July 21, 2024

For this particular password, Laura mentioned to me that having a separate gitignore'd config file saved locally on the machine with the password could be a solution. I would just need to create a 2nd ConfigParser object to read in the password. It would also need to be made known that the password is there for those who need it so it isn't forgotten.

This solution would be a more secure workaround for now, but having a credential service in the future would probably be very helpful, especially since so many OpenStack services are being communicated with.

Edit: just noticed that the engage1 credentials are out in the open too, those should probably be hidden as well.

from moc-openstack-tools.

greyspectrum avatar greyspectrum commented on July 21, 2024

I'm not sure I understand how adding another config file to the .gitignore would help. The settings.ini is already in the .gitignore, so adding another credential file and keeping it on the production VM wouldn't solve the problem of securely backing up those credentials, in case something happens to that VM.

Maybe you're saying something else, though?

from moc-openstack-tools.

ianballou avatar ianballou commented on July 21, 2024

I see, so the local configuration on the VM is already saved locally on the machine. In that case we don't need the second config, just need to make sure that the current one is kept up-to-date.

I'm not sure what our usual path of action is for backing up passwords, but I thought that the password(s) would be something known and kept only by those who need to know it. I just talked to Rado and he wishes to make sure that the passwords visible in the moc private repo are made invalid as soon as possible.

Perhaps we could change it now and later implement some sort of backup utility like Vault?

from moc-openstack-tools.

greyspectrum avatar greyspectrum commented on July 21, 2024

I see, so the local configuration on the VM is already saved locally on the machine.

Yup, that's right. In this case, the password & Google API key can't stay in a human or humans' head, since the scripts use it to authenticate to Keystone and Google, respectively, any time a user needs to be added or a quota needs to be changed, for example.

So, if we took the credentials off of the VM, then it would break the automation. Having a human enter those credentials from memory would also be sub-optimal, since that's the sort of toil the scripts were designed to eliminate.

Vault would be a potential solution, since the credentials could be kept off of the helpdesk VM's disk (they would of course be in the helpdesk VM's memory when called from Vault in order to authenticate to Keystone or Google, but that's a necessity unless we get into storing secrets on hardware tokens, which I don't think would work on a virtualized machine in any case).

Vault itself would have to be backed up, but after that, things look pretty good. Any secrets (API keys, passwords, etc) that any automated service requires can be called with the Vault API, so that those secrets aren't distributed among many machines.

In the short term, one solution to the backup-creds-living-on-Github problem (that doesn't involve Vault) would just be to encrypt the settings.ini file with GPG and push it to the same private repo. The private key that was used would have to be distributed to a few key people. Alternately, if GPG is used in symmetric mode, then the corresponding password would have to be similarly distributed among those who might need access.

Just deleting the settings.ini from that Github private repo seems a bit risky, since if the settings.ini on the helpdesk VM were lost or erroneously edited, then it's a bit of a headache to reconstruct it, which would potentially increase downtime if that were to become necessary.

from moc-openstack-tools.

kamfonik avatar kamfonik commented on July 21, 2024

My suggestion to Ian was that as a short term solution, the password could be removed from settings.ini and placed in a different config file, so you could continue to back up settings.ini in the private repo - since that file can otherwise take time to recreate if lost. The other file would contain just the user/password combo.

from moc-openstack-tools.

greyspectrum avatar greyspectrum commented on July 21, 2024

Oh OK, I see. Yeah, that makes sense.

from moc-openstack-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.