GitLab project sync fails with "Invalid certificate in the requested target" in VMware Aria Automation
search cancel

GitLab project sync fails with "Invalid certificate in the requested target" in VMware Aria Automation

book

Article ID: 433790

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

When attempting to perform a "project sync" within VMware Aria Automation for a GitLab integration, the operation fails. The following error is observed in the UI or integration logs:
Invalid certificate in the requested target
This issue typically occurs after the GitLab server's SSL certificate has been renewed or replaced, leaving the integration point with outdated security credentials.

Environment

Aria Automation 8.18.x

Git Lab

Cause

The integration properties for the GitLab endpoint in VMware Aria Automation are holding a stale or expired certificate. Aria Automation requires the stored certificate content to match the target server's certificate to establish a secure connection.

Resolution

To resolve this issue, you must manually update the certificate stored in the integration properties using the Aria Automation IaaS API.

  • Retrieve the new GitLab certificate:

Run the following command from a terminal to capture the certificate in a single-line format suitable for API transmission:

openssl s_client -connect <GitLab_FQDN>:443 2> /dev/null | openssl x509 | awk 'NF {sub(/\r/, "");  printf "%s\\n",$0;}'

(Replace <GitLab_FQDN> with the FQDN of your GitLab server).

  • Identify the Integration ID:

Locate the id for your GitLab integration via the Aria Automation UI or by performing a GET /iaas/api/integrations API call.

  • Patch the integration:

Use the following curl command to update the integration with the certificate content obtained in Step 1:

curl -v -k -X PATCH "https://$VRA/iaas/api/integrations/<Integration_ID>?apiVersion=2021-07-15" \
-H "Accept: application/json" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $TOKEN" \
--data-raw '{"integrationProperties": {"certificate":"<Certificate_content_from_Step_1>"}}'