tmkms icon indicating copy to clipboard operation
tmkms copied to clipboard

Hashicorp feature tmkms

Open mkaczanowski opened this issue 1 year ago • 22 comments

TL;DR

This is a rebased version of https://github.com/iqlusioninc/tmkms/pull/613 with some changes:

  1. integration tests works now
  2. VAULT_CACERT and VAULT_SKIP_VERFIY are now configurable
  3. config changed slightly

Test plan

I've tested this live and also via unittests and integration test:

$ ./tests/support/start_vault.sh

$ cargo test --features hashicorp,softsign
...
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.20s

mkaczanowski avatar Jan 13 '24 09:01 mkaczanowski

Huh, there is no fix for: https://rustsec.org/advisories/RUSTSEC-2023-0071 yet

(but it is optional dependency anyway)

EDIT: I need to fix the CI tests (integration test requires running vault)

mkaczanowski avatar Jan 13 '24 09:01 mkaczanowski

@tony-iqlusion it's ready for review :pray:

mkaczanowski avatar Jan 14 '24 12:01 mkaczanowski

@mkaczanowski may I ask if you considered vault disconnection issues? Will it reconnect? I noticed that even if I have multiple vault instances, when I restart one of them, tmkms wont try to connect to another. But this is an old version in my fork, maybe its addressed already.

helder-moreira avatar Jan 17 '24 16:01 helder-moreira

I was unable to reproduce the connection issues

mkaczanowski avatar Jan 17 '24 17:01 mkaczanowski

@tony-iqlusion any ETA on merging this?

helder-moreira avatar Jan 30 '24 11:01 helder-moreira

I should have some time to review it soon. Please be patient.

tony-iqlusion avatar Feb 01 '24 15:02 tony-iqlusion

Note: I would still like to get this into the v0.14 release but my time on TMKMS has been taken up by vote extension signing support. I hope to be able to review it soon when other TMKMS-related work is done.

tony-iqlusion avatar Mar 18 '24 19:03 tony-iqlusion

@mkaczanowski I am currently testing this PR, and it seems that CA certificate does not work:

Message:  Unable to connect to Vault at https://vault.vault.svc.cluster.local:8200
Location: src/commands/hashicorp/upload.rs:145

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.

Works fine if I set vault_skip_verify = true. Can you double check this?

helder-moreira avatar Apr 08 '24 12:04 helder-moreira