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

configuration - allow setting CA for self-signed cert #14

Open
lnogol opened this issue Mar 29, 2020 · 4 comments
Open

configuration - allow setting CA for self-signed cert #14

lnogol opened this issue Mar 29, 2020 · 4 comments

Comments

@lnogol
Copy link

lnogol commented Mar 29, 2020

By default kube-arango generates a self signed certificate.

The arango javascript driver allows setting CA, but arangomigo doesn't. Means we can't run migrations against arango deployed this way.

https://www.arangodb.com/docs/stable/drivers/js-reference-database.html#new-database

@virmundi
Copy link
Contributor

virmundi commented Feb 4, 2021

Interesting. I'll take a look. Just to make sure, is https://github.com/arangodb/arangojs/blob/a993de1afb3a39824870990c5f1ee9248a4fb3a6/README.md#nodejs-with-self-signed-https-certificates the JS equivalent? If so, I think the go-driver is limited here. I don't see a way to make it take a self-signed cert.

@lnogol
Copy link
Author

lnogol commented Feb 4, 2021

correct, that's the JS equivalent

I don't see a way to make it take a self-signed cert

I don't know Go, but judging by this:

https://www.arangodb.com/docs/stable/drivers/go-connection-management.html#secure-connections-ssl

conn, err := http.NewConnection(http.ConnectionConfig{
    Endpoints: []string{"https://localhost:8529"},
    TLSConfig: &tls.Config{InsecureSkipVerify: true},
})

https://pkg.go.dev/github.com/arangodb/go-driver/http#ConnectionConfig

// TLSConfig holds settings used to configure a TLS (HTTPS) connection.
// This is only used for endpoints using the HTTPS scheme.
TLSConfig *tls.Config

https://golang.org/pkg/crypto/tls/#Config

// RootCAs defines the set of root certificate authorities
// that clients use when verifying server certificates.
// If RootCAs is nil, TLS uses the host's root CA set.
RootCAs *x509.CertPool

I believe it should be possible

either way, we've switched from arangomigo to something else in the meantime

@maja42
Copy link

maja42 commented Nov 22, 2021

Unfortunately, I'm also not able to use arangomingo if I can't supply a custom TLSConfig or, maybe even better, use a client from the official ArangoDB driver

@grahamlyons
Copy link

Addressed in #24

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

No branches or pull requests

4 participants