I have configured backstage to use HTTPS mode and used the below document to configure the same:
https://github.com/backstage/backstage/blob/6b466acbadf30503cb35469f1a78d40e76b7f6fa/contrib/docs/tutorials/enable-ssl-self-signed.md?plain=1#L34
Post the configuration the backend fails to start with the below error:
Duration":"PT15M"} type=taskManager task=search_index_techdocs
2023-10-10T16:03:26.777Z search info Collating documents for software-catalog via DefaultCatalogCollatorFactory type=plugin documentType=software-catalog
2023-10-10T16:03:26.787Z search info Collating documents for techdocs via DefaultTechDocsCollatorFactory type=plugin documentType=techdocs
2023-10-10T16:03:26.796Z search warn Index for software-catalog was not created: an error was encountered type=plugin documentType=software-catalog
2023-10-10T16:03:26.796Z search error Collating documents for software-catalog failed: FetchError: request to https://localhost:7777/api/catalog/entities?offset=0&limit=500 failed, reason: unable to verify the first certificate type=plugin documentType=software-catalog
2023-10-10T16:03:26.797Z backstage error request to https://localhost:7777/api/catalog/entities?offset=0&limit=500 failed, reason: unable to verify the first certificate type=system task=search_index_software_catalog errno=UNABLE_TO_VERIFY_LEAF_SIGNATURE code=UNABLE_TO_VERIFY_LEAF_SIGNATURE stack=FetchError: request to https://localhost:7777/api/catalog/entities?offset=0&limit=500 failed, reason: unable to verify the first certificate
at ClientRequest.<anonymous> (/data/test_backstage/backstage1/backstage/node_modules/node-fetch/lib/index.js:1501:11)
at ClientRequest.emit (node:events:514:28)
at TLSSocket.socketErrorListener (node:_http_client:501:9)
at TLSSocket.emit (node:events:514:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
2023-10-10T16:03:26.799Z search warn Index for techdocs was not created: an error was encountered type=plugin documentType=techdocs
This is definitely not an error with certificates as the backend should start with the hostname but somehow it is automatically converted to localhost which then fails with the certs.
If i trigger the api directly with the actual hostname in the certificate it works without any errors. At this point I'm unsure how the backend for docs is converting automatically to local host
Any help why the backstage is behaving this way is greatly appreciated.
Thank you, Anish