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

VMware vCenter 6.7 and PyKMIP / VMWare's PyKMIP failure #626

Open
brandonpoc opened this issue Apr 26, 2020 · 7 comments
Open

VMware vCenter 6.7 and PyKMIP / VMWare's PyKMIP failure #626

brandonpoc opened this issue Apr 26, 2020 · 7 comments

Comments

@brandonpoc
Copy link

I have tried adding as a KMS server in vCenter 6.7 both the latest PyKMIP and the modified PyKMIP that VMware made for demoing KMS in their 6.5 release but have had no luck. I get the following error:

'Cannot retrieve the requested certificate'

Again this is with both the current PyKMIP from github and the modified PyKMIP from VMWare that was present in their demo .ova and on William Lan's docker repository (lamw/vmwkmip). Is anyone aware of what is causing this error and if it's something I could fix or if it is just not supported in vCenter 6.7 and, if so, what it is that isn't supported? I get 'transport endpoint not connected' on the latest PyKMIP which I believe is from the vCenter client closing the connection out of protocol/sequence and the pykmip server calling close() on it. Other than that there's really no information.

Thanks

@KBassford
Copy link

You might want to check out issue #566 (#566). You have to use the certificate generation script under "bin" and point to the appropriate ones in both the server.conf and client.conf. Also make certain the permissions on where you store them allow for read access.

I think everyone is out for the time being due to the coronavirus. Hope this helps.

@PeterHamilton
Copy link
Contributor

Hi @brandonpoc, thank you filing this issue. My apologies for the extreme delay on this; @KBassford was correct, I've been out and unable to work on PyKMIP due to the ongoing pandemic. I should be able to spend more time on this going forward.

Are you still having issues using PyKMIP with vCenter? If so, I will need more information to help you debug the problem. Let me know and we can discuss it further.

@brandonpoc
Copy link
Author

brandonpoc commented Jun 30, 2020 via email

@PeterHamilton
Copy link
Contributor

If I recall correctly the version of PyKMIP that came as part of a VMware-provided image to demo OpenKMIP/PyKMIP worked fine but, as stated, could not save the key and associated meta-data to disk.

Actually, this isn't true. PyKMIP does store it's data (a single SQLite database file) on the filesystem, it just defaults to storage in /tmp which gets purged on reboot (or by routinely running cron jobs depending on your system). This is intentional, since the PyKMIP server is meant for testing and demonstration purposes. If you use a different storage location (using the database_path argument when running the server) you can have PyKMIP store your data wherever you want.

It's been a while since I looked at William's Docker image for PyKMIP. I was not involved in its creation. However, it shouldn't take much to map a host directory onto /tmp in the PyKMIP container when you start it up, allowing you to persist your data.

It's important to note that the PyKMIP data is not secured in any way. Any user with access to that SQLite database file will have access to all of your keys, certificates, etc. This is another reason we don't recommend the PyKMIP server for production use.

@brandonpoc
Copy link
Author

brandonpoc commented Jul 3, 2020 via email

@thevelement
Copy link

I had a similar issue when I was setting up PyKMIP on a Photon-based appliance. The UI would tell me it couldn't get the certificate, and running openssl s_client -connect from vCenter would not pull the cert. The issue for me was when defining the server configuration (/etc/pykmip/server.conf) I was using the FQDN for the 'hostname' directive, but with Photon, it resolves the hostname to 127.0.0.1 in /etc/hosts, so the PyKMIP server was only ever working when connections were initiated from that appliance. Once I changed the value of the 'hostname' directive to the IP of the system, it worked.

I've been using PyKMIP with vCenter 6.7 U3h and it works pretty well.

@eyooooo
Copy link

eyooooo commented May 17, 2024

#717 i bet this fixes your issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants