-
Notifications
You must be signed in to change notification settings - Fork 5
Creating Application and pushing to vaut #97
Comments
The -ProvisionCertificate is not working may be due to the current version 18.2 . I get the DN error but the application gets created. |
Hi @karthikpappu. I just checked the docs and looks like you are correct. The 'PushToNew' feature being utilized for certificate association when using |
@gdbarron Thank you for the quick reply. Not sure why I Am getting this error . Application is created and associated to a cert but getting the below error as invalid DN path Test-TppObject: /home/user/.local/share/powershell/Modules/VenafiTppPS/1.2.3/Public/New-TppObject.ps1:105 Line | |
Can you run with -verbose and provide the output please? Be sure to remove any sensitive data. |
Hello @gdbarron '\VED\Policy\Certificates\vcert\dummy-env\vaultprod\standalonecert123.test.com' vaultprod is a device PS /home/user/venafipowershell> New-TppObject -Path '\VED\Policy\Certificates\vcert\dummy-env\vaultprod\standalonecert123.test.com' -Class 'Adaptable App' -Attribute @{'Driver Name'='appadaptable';'Certificate'= '\VED\Policy\Certificates\vcert\dummy-env\standalonecert123.test.com'; 'Text Field 2'= $vaultpath } -Verbose VERBOSE: POST https://testserver.test.domain.com/vedsdk/authorize with 59-byte payload VERBOSE: POST https://testserver.test.domain.com/vedsdk/config/IsValid with 102-byte payload VERBOSE: Performing the operation "Create Adaptable App Object" on target "\VED\Policy\Certificates\vcert\dummy-env\vaultprod\standalonecert123.test.com". VERBOSE: POST https://testserver.test.domain.com/vedsdk/config/create with 466-byte payload VERBOSE: POST https://testserver.test.domain.com/vedsdk/Certificates/Associate with 211-byte payload |
Thanks for the info. I believe the issue was due to a regex which only accepted \ instead of / which is used on Linux. Please give v1.2.4 a go and let me know how it goes. |
@gdbarron Thank you for the quick reply . With 1.2.4 the application didn't get created and showing an error on line 106. With earlier version the application got created. Error: The parent folder, /VED/Policy/Certificates/vcert/dummy-env/vaultprod, of your new object does not exist PS /home/usert/venafipowershell> New-TppObject -Path '\VED\Policy\Certificates\vcert\dummy-env\vaultprod\standalonecert123.test.com' -Class 'Adaptable App' -Attribute @{'Driver Name'='appadaptable';'Certificate'= '\VED\Policy\Certificates\vcert\dummy-env\standalonecert123.test.com'; 'Text Field 2'= 'secrets/syseng/data/test/standalonecerttesting1234' } -Verbose VERBOSE: POST https://testserver.test.com/vedsdk/config/IsValid with 102-byte payload VERBOSE: POST https://testserver.test.com/vedsdk/config/IsValid with 70-byte payload |
Ran Test-TppObject at it shows the path exists. PS /home/user/venafipowershell> Test-TppObject -Path \VED\Policy\Certificates\vcert\dummy-env\vaultprod Object Exists \VED\Policy\Certificates\vcert\dummy-env\vaultprod True |
The check for the parent path not existing was failing to validate if the path existed or not so it never stopped at that point. The code continued to create. Once I accounted for forward slashes in Linux, the check is now being validated and failing. This is why it worked before and isn't now. The current issue is why is the check itself failing when you are saying the path exists. I don't have a working Linux system to test with right now so thanks for bearing with me. I've commented out those checks as they aren't truly needed as the api itself will fail. Please try again with v1.2.5 and let me know. |
@gdbarron Thank you for your continued support . After commenting out the check the ran without issues. PS /home/users> Install-Module -Name VenafiTppPS -RequiredVersion 1.2.5 Untrusted repository PS /home/users> cd ./venafipowershell/ PowerShell credential request PS /home/users/venafipowershell> New-TppSession -ServerUrl 'https://testserver.test.dummy.com' -Credential $cred VERBOSE: POST https://testserver.test.dummy.com/vedsdk/config/create with 474-byte payload VERBOSE: POST https://testserver.test.dummy.com/vedsdk/Certificates/Associate with 211-byte payload |
Awesome, glad it's working. |
I am trying to creating an adaptable App and an existing certificate to it and push it to vault.
The application gets created in the right place with an error output on line 105.
-ProvisionCertificate is not pushing the cert to Vault.
New-TppObject -ProvisionCertificate -Path ('{0}\standalonecert123.test.com' -f $devicepath) -Class 'Adaptable App' -Attribute @{'Driver Name'='appadaptable';'Certificate'=$certpath;'Text Field 2'='secrets/test/data/testing/pushtest'} -ProvisionCertificate
Test-TppObject: /home/user/.local/share/powershell/Modules/VenafiTppPS/1.2.3/Public/New-TppObject.ps1:105
Line |
105 | … if ( -not (Test-TppObject -Path (Split-Path $Path -Parent) -ExistO …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot validate argument on parameter 'Path'. '/VED/Policy/Certificates/vcert/test-prod/vaultprod' is not a valid DN path
The text was updated successfully, but these errors were encountered: