adaptable application functions

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

adaptable application functions

L2 Linker
Im unable to get any code to run from an adaptable application in the Exract-Certificate function, does anyone know at what stage or how this function is called in an adaptable app?I opened a support case with Venafi and they suggested me ask the community.
4 REPLIES 4

L3 Networker

Hi Chris. Here is some info on Extract-Certificate. From the "Extract-Certificate function" documentation: https://docs.venafi.com/Docs/current/TopNav/Content/Drivers/r-drivers-AdaptableApp-function-ExtractCertificate.php.

 

 

Use the Extract-Certificate function to retrieve the certificate from the target device so that it can be validated and extracted to update the certificate in Trust Protection Platform. This function is called after a certificate has been successfully provisioned and whenever a user requests the certificate and private key to be extracted from the device. This function is required because it provides an important method for Trust Protection Platform to verify that the certificate is properly installed on the device. The function may return the raw X509 certificate or the serial number and SHA1 thumbprint for the purposes of Validation but it must return the raw X509 certificate to support Extraction.

L2 Linker
Thanks for the info @Greg.Brownstein but Im unable to get the Extract-Function block to run, I added some logging to this function and it never runs, unless it doesnt have to run on the same engine that is assigned to the workflow of the folder.

L1 Bithead
@Chris.Blackburn , Id recommend the following best practices when troubleshootingadaptable apps: Make sure that you write the code outside of Venafi first to make sure that the code works. If its API calls, test them first, then write the code before you transfer to the Adaptable framework. For routineswhere you need to troubleshoot a response, wrapwith a try/catch block so you can send the response back to the Venafi status on the object you are provisioning. In the catch block, you can throw something like Throw Error: $($_.Exception.Message). The throw statement will trap the error and send it back to the console. Venafi does have an enable logging feature which will log to the default location specified by the $DEBUG_FILE variable (according to the docs). If you cant get that to work, you can always start a PowerShell transcript so you can catch where in the code. Something like: Start-Transcript -Path should work and will log your session. If you are just trying to see the values of the variables that are injecting into the PowerShell functions, you can always send the results of the hash tables General and Specific. Ive found something like $General.GetEnumerator() | Out-File -FilePath does the trick. Remember, the output will write to the file path on the TPP server where you are running the Adaptable App script from. Hope that helps!

L2 Linker
Thanks for the replys, support came back to me and advised that in order for the Extract-Certificate function to run file validation has to be enabled on the application.
  • 92 Views
  • 4 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!