[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown x509 certificate #12

Open
llegolas opened this issue Jan 17, 2019 · 4 comments
Open

Unknown x509 certificate #12

llegolas opened this issue Jan 17, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@llegolas
Copy link

Staring it against https keycloak i get this error.
2019/01/17 11:26:54 OIDC provider setup failed: Get https://sso-keycloak-sso.cloudapps02.euan-hume-02-ocp.svcs.dxc.com/auth/realms/kubeflow/.well-known/openid-configuration: x509: certificate signed by unknown authority

@llegolas
Copy link
Author
llegolas commented Jan 20, 2019

Adding at least the default k8s/openshift CA.crt to the trust is nice feature to have. Will the below work?:

        rootCAs, _ := x509.SystemCertPool()
	if rootCAs == nil {
		rootCAs = x509.NewCertPool()
	}

	certs, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/ca.crt")
	if err != nil {
		log.Fatalf("Failed to append /var/run/secrets/kubernetes.io/serviceaccount/ca.crt to RootCAs: %v", err)
	}

	if ok := rootCAs.AppendCertsFromPEM(certs); !ok {
		log.Println("No certs appended, using system certs only")
	}

	config := &tls.Config{
		RootCAs:            rootCAs,
	}

@ajmyyra ajmyyra added the enhancement New feature or request label Jan 21, 2019
@ajmyyra
Copy link
Owner
ajmyyra commented Jan 21, 2019

Hi! Might be good to add support for both the service account as well as a 'disregard certificate validity' option, through Golangs InsecureSkipVerify: true. I'll look into this soon.

@llegolas
Copy link
Author

You can also add support for custom certificates provided with volume mounts(backed by secrets). For example if file /tmp/custom-ca.crt exists append the it too.

@templarfelix
Copy link
templarfelix commented Jan 21, 2020

I don't use self signed cert, and errors occurred.

image

Workarround: https://www.getambassador.io/reference/filter-reference/#installing-self-signed-certificates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants