Code Monkey home page Code Monkey logo

Comments (7)

vania-pooh avatar vania-pooh commented on June 24, 2024

@MohamedBenighil you need to make sure that CA certificate used to issue Moon TLS certificate is trusted in node.js settings. https://stackoverflow.com/questions/29283040/how-to-add-custom-certificate-authority-ca-to-nodejs

from moon.

MohamedBenighil avatar MohamedBenighil commented on June 24, 2024

@vania-pooh please notice i have just tls.crt & tls.key on my secret file ( --default-ssl-certificate=default/cert-secret ). And I DON'T have CA certificate.

apiVersion: v1
data:
  tls.crt: QmF......K               <== HERE
  tls.key: LS0tLS.....S0tLS0tCg==   <== AND HERE (tls.crt & tls.key are all i have )
kind: Secret
metadata:
  creationTimestamp: "2023-05-15T13:33:13Z"
  name: cert-secret
  namespace: default
  resourceVersion: "25502736"
  uid: 10295bd4-a764-4407-a204-d8caae8129df
type: kubernetes.io/tls

from moon.

vania-pooh avatar vania-pooh commented on June 24, 2024

@MohamedBenighil usually certification authority is provided by organization or person who actually generated these two files. E.g. this could be CA certificates of let's encrypt or another TLS certification provider.

from moon.

MohamedBenighil avatar MohamedBenighil commented on June 24, 2024

@vania-pooh I used NODE_EXTRA_CA_CERTS=ca/ca-pfx.pem npm test and the error was changed.

Now, i got :

> [email protected] test
> node index.js

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

browserType.connect: unable to get issuer certificate
    at C:\Users\mbenighil\OneDrive - MYDOMAIN\Bureau\git\moon-cloud-playwright-example\index.js:22:35
    at Object.<anonymous> (C:\Users\mbenighil\OneDrive - MYDOMAIN\Bureau\git\moon-cloud-playwright-example\index.js:28:3) {
  name: 'Error'
}

Node.js v18.16.0

any help please ?
PS: Moon is running on AKS

from moon.

vania-pooh avatar vania-pooh commented on June 24, 2024

@MohamedBenighil this is still related to TLS CA config of NPM. Probably you are providing an intermediary CA and not root CA.

from moon.

MohamedBenighil avatar MohamedBenighil commented on June 24, 2024

@vania-pooh how can i get root CA ?

I created tls.key and tls.crt using the following commands :

# private key
openssl pkcs12 -in aks-qa-fr.COMPANY.net_2022.pfx -nocerts -out key-file.key

#decrypt
openssl rsa -in key-file.key -out tls.key

# get crt
openssl pkcs12 -in aks-qa-fr.COMPANY.net_2022.pfx -clcerts -nokeys -out tls.crt

# create kubernetes secret
kubectl create secret tls cert-secret --cert tls.crt --key tls.key # <==The secret is used at Nginx Ingress Controller as i said before  

Notice my input entry is : aks-qa-fr.COMPANY.net_2022.pfx
I would like to know what i am messing please ?

from moon.

vania-pooh avatar vania-pooh commented on June 24, 2024

@MohamedBenighil something like this should work: https://deliciousbrains.com/ssl-certificate-authority-for-local-https-development/

from moon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.