Update 10.2020: In version 8.2 you can finally manage and delete passwords from the GUI
In vRealize Lifecycle Manager 8.0 VMware introduced «Locker» this is where you store certificates, licenses and passwords. If you for some reason add a password that is wrong or you want to delete an old one you are in trouble. There is no way to delete entries through GUI or CLI. But you can do it through the API!
Here is how
First you might need to install a software to do the API calls. I used Postman and you can download it here.
When you have installed or if you already have postman, you need to do the following
Authenticate
First you need to insert your credentials in the Authorization tab inside postman and send this POST command. Remember to insert your vRSLCM FQDN address.
POST https://vrslcm.your.fqdn/lcm/authzn/api/login
If login is successful you will get «Login Successfully» in return.
In versjon 8.0.1 of vrslcm and you also need to copy the Authorization Key Value found under Headers and Temporary Headers in postman.
Example: YWRtaW5AbG9jYWw6Vk13YXJlMTIzIQ
GET the list of all entries
GET https://vrslcm.your.fqdn/lcm/locker/api/passwords/
The GET command will give you a list of all the passwords and they’re vmid. Copy the vmid that you want to delete and use it instead of «vmid» below when you send DELETE command.
Update:
It appears that in version 8.0.1 this command is no longer possible.
Only for Pre 8.0.1 versions
DELETE the entries
DELETE http://vrslcm.your.fqdn:8080/lcm/locker/api/passwords/vmid
Run the GET command again to see that the password has been removed or refresh the locker page in the GUI of vRSLCM.
For 8.0.1 and possible later versions
Delete the entries
Login with root user to your vRSLCM appliance through SSH. and run the following command.
Remember to replace the IDs in bold with your own. First ID with the vmid from the GET passwords command. And the last ID with the Authorization KEY Value.
curl -X DELETE 'http://localhost:8080/lcm/locker/api/passwords/5581b687-a26c-4495-a8ed-11486c79fd81' -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: Basic YWRtaW5AbG9jYWw6Vk13YXJlMTIzIQ ' -k
I’ve attempted to delete credentials using this method but I receive «400 Bad Request» responses when I attemp the last step of issuing the DELETE request. Am I missing something? I don’t see any mention of a DELETE method being supported in the API documentation at https://{vRSLCM_URL}/api/swagger-ui.html#/Locker_Password_and_License_API/
Thanks!
That is correct it is not documented I got it from VMware support. Did you remember to do http and not https on the DELETE command?
Seem that it stopped working after installing 8.0.1 patch for vRLCM
I have now tested on this version and I can confirm that it is no longer working 🙁
That would explain why it was not working for me. I was running 8.0.1. It is quite disappointing that they removed this API function 🙁
Hi, i will update the blog with a new solution soon 🙂
I have now updated the post with a new command that works. I have also tested it my self.
Yes, It works, I just finished the call with VMware and thats the exact solution he gave me.
Thanks for updating the blog.