VMware Cloud Community
Thelemanu
Enthusiast
Enthusiast

Decrypt password from blueprint in vRO

Hello, we have a blueprint, to deploy a VM, which ask for a the futur password (encrypted:true) of the VM. After the VM is built the OS password is reset with the entered password, via extensibility which triggers a vRO flow. In the vRO flow, we retrieve the password through  API calls to the deployment. However the password is encrypted, and we need to decrypt it to inject it as a string into the reset password script. How can we decrypt it ? 
Tks for the support

Blueprint extract:

  vm_os_password:
    type: string
    title: admin_password
    encrypted: true
    description: password for the default administrator/root account

vRO flow:

var deploymentObject = getObjectFromUrl("/deployment/api/deployments/" + deploymentId);
System.log("Deployment inputs\n" + getJson(deploymentObject.inputs));
var input_vm_os_password = deploymentObject['inputs']['vm_os_password'];

Output:

"vm_join_to_ad": "no",
"vm_business_id": "",
"vm_os_password": "((secret:v1:AAEP7yPUacIvRW6LjHqIm/Owynx0ug9jks1dZtVwfLLQ2eQ==))",
"vm_customer_tag": ""

 

0 Kudos
0 Replies