cedardevs / onestop

OneStop is a data discovery system being built by CIRES researchers on a grant from the NOAA National Centers for Environmental Information. We welcome contributions from the community!
GNU General Public License v2.0
42 stars 20 forks source link

CedarDevs Unable_To_Verify_Leaf_Signature certificate error #1505

Open uniyalVJ opened 3 years ago

uniyalVJ commented 3 years ago

Bug Description Upon booting up sitemap pod it is unable to connect to the cedardevs API URL: This seems to be not strictly related to sitemap and a long time existing bug regarding cedardevs

https://cedardevs.org/onestop/api/search/search/collection/

Platform/Environment Mac OS

Severity Severity: HIGH (High/Medium/Low) Priority: MEDIUM (High/Medium/Low)

To Reproduce Steps to reproduce the behavior:

  1. Branch 726-sitemap-review-cron
  2. Run skaffold with sitemap profile
  3. After search pod is up and running, sitemap pod will crash and output logs on skaffold showing UNABLE_TO_VERIFY_LEAF_SIGNATURE

Expected Result Connects to cedardevs API & runs sitemap script properly to generate sitemap files.

Actual Result See screenshots.

Screenshots If applicable, add screenshots to help explain your problem.

image.png

image.png

Additional context Add any other context about the problem here.

uniyalVJ commented 3 years ago

In order to narrow down the scope of the issue I implemented by setting the environment variable inside of my CLI

process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0

This disables Node from rejecting self-signed certificates by allowing ANY unauthorized certificate. Although it is an insecure approach if it worked it would show that it is directly a certificate issue. It didn't work meaning that this is not a simple problem of having the correct certificates.