Content Hub – SSL Errors When Adding Applications


After creating content hub, in process of adding applications from VMware marketplace it’s ends with errors.

2024-09-26 10:12:12,257 | ERROR    | content-library-activity-pool5 | RestClientBase                 | REST client error: 400 BAD_REQUEST - access-control-allow-credentials=[false];access-control-allow-headers=[Origin, X-Requested-With, Content-Type, Accept, csp-auth-token, id-token];access-control-allow-origin=[*];cache-control=[no-store];content-security-policy=[script-src 'self'];content-type=[application/json; charset=utf-8];date=[Thu, 26 Sep 2024 10:12:12 GMT];etag=[W/"55-zXneTbayqPURlCcx0J1a80SLvcs"];vary=[Accept-Encoding];x-content-type-options=[nosniff];x-dns-prefetch-control=[off];x-download-options=[noopen];x-xss-protection=[1; mode=block];strict-transport-security=[max-age=63072000; includeSubDomains];x-frame-options=[DENY];transfer-encoding=[chunked]; - 

>{"response":{"message":"Failed to subscribe products: Failed to fetch user details"}}. | 

The URL of VCD is not included in the allowed origins list. So the logs are throwing CORS error. All the URLs with https should also be included in the allowed origins.

Refer: Modifying the “webapp.allowed.origins” configuration on version 10.3 and later.

Modifying the “webapp.allowed.origins”

Resolution Steps


To modify the CORS settings, you will need to use the Cloud API.

https://{{base-url}}/cloudapi/1.0.0/site/settings/cors

This API and the majority of all /cloudapi/ APIs can be interacted with via the API Explorer.

https://{{base-url}}/api-explorer/provider#/cors

NOTE: This, like the UI will require a valid System Administration set of credentials to access.

Within the cors section of the API Explorer, there will be 2 APIs you will need to levage.

GET /1.0.0/site/settings/cors

PUT /1.0.0/site/settings/cors

Whilst the API Explorer will contain examples, be sure to add three entries for every endpoint.

  1. FQDN
  2. HTTP
  3. HTTPS

Example: vcd.domain.local

{
      "origin": "vcd.domain.local"
},
{
      "origin": "http://vcd.domain.local"
},
{
      "origin": "https://vcd.domain.local"
}

Leave a Reply

Your email address will not be published. Required fields are marked *

I’m Aigars

Welcome to Virtualisation Alley, my cozy corner of the internet dedicated to VMware. Here, I invite you to join me on a journey into virtual world. Let’s go.

Let’s connect