-
Notifications
You must be signed in to change notification settings - Fork 62
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
SSL cert issue with rustify >0.5.3 #98
Comments
I think that's related to this change from rustify. |
Looking some more into this, the system is not able to automatically pick up the CA cert from the OS cert store. If I set |
Thanks for taking the time to look into it again. vault server -dev-root-token-id=root -dev -dev-tls -dev-tls-cert-dir /tmp/vcert -dev-tls-san localhost I created a quick rust project that haste the following code in it: use vaultrs::client::{VaultClient, VaultClientSettingsBuilder};
#[tokio::main]
async fn main() {
let client = VaultClient::new(
VaultClientSettingsBuilder::default()
.address("https://127.0.0.1:8200")
.token("root")
.build()
.unwrap(),
)
.unwrap();
vaultrs::sys::health(&client).await.unwrap();
} Then I started a new terminal and copied the directory $ VAULT_CAPATH=/tmp/certs/ cargo run
Compiling vtest v0.1.0 (/tmp/vtest)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.99s
Running `target/debug/vtest`
thread 'main' panicked at src/main.rs:13:41:
called `Result::unwrap()` on an `Err` value: RestClientError { source: RequestError { source: error sending request for url
(https://127.0.0.1:8200/v1/sys/health): error trying to connect: invalid peer certificate: UnknownIssuer
Caused by:
0: error trying to connect: invalid peer certificate: UnknownIssuer
1: invalid peer certificate: UnknownIssuer, url: "https://127.0.0.1:8200/v1/sys/health", method: "GET" } }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace And the program panics. Can you send me your |
Okay, I see what's going on here. If I export
|
Our Vault uses certs signed by our CA and the client has the CA certs in the host trust store. I was able to pin rustify to 0.5.3 and things work just fine, but removing the pin causes this error.
The text was updated successfully, but these errors were encountered: