Skip to content

Releases: SomeBlackMagic/vault-manager

v0.4.0

Choose a tag to compare

@wirwolf wirwolf released this 07 Oct 15:06

What's Changed

  • Add structured logging with configurable levels and formats by @wirwolf in #5

Full Changelog: v0.3.0...v0.4.0

v0.3.0

Choose a tag to compare

@wirwolf wirwolf released this 16 Sep 07:26

What's Changed

  • Add comprehensive documentation for sync commands and Docker usage by @wirwolf in #3

Full Changelog: v0.2.2...v0.3.0

v0.2.2

Choose a tag to compare

@wirwolf wirwolf released this 20 Mar 07:15

Full Changelog: v0.2.1...v0.2.2

v0.2.1

Choose a tag to compare

@wirwolf wirwolf released this 19 Mar 14:20

Full Changelog: v0.2.0...v0.2.1

v0.2.0

Choose a tag to compare

@wirwolf wirwolf released this 19 Mar 13:32

Full Changelog: v0.1.0-rc1...v0.2.0

v0.1.0-rc1: fix: address Go clean architecture and concurrency rule violations

Choose a tag to compare

@wirwolf wirwolf released this 19 Feb 18:41

fix: address Go clean architecture and concurrency rule violations

- Fix critical bug: capture error from vault.client.Delete in vault/tree.go
- Fix panics for control flow: convert Curl and SetURL to return errors
- Fix reflection usage: replace reflect.ValueOf in Secret.Keys() with direct map iteration
- Fix error wrapping: use %w instead of %s throughout all .go files
- Fix error string comparison: add UsageError sentinel type, use errors.As in main.go
- Fix global variables in rc/config.go: introduce CleanupManager struct
- Fix fire-and-forget goroutine: remove inline signal handler from writeTempCACerts
- Fix missing error handling: handle os.WriteFile error in rc/config.go Write()
- Add comment explaining build-time Version variable in main.go
- Replace manual errChan with errgroup in vault/tree.go constructTree
- Update all SetURL callers in cmd_admin.go to handle returned error

feat: Phase 4 — rename module to github.com/SomeBlackMagic/vault-cli-manager

- Update module directive in go.mod from github.com/starkandwayne/safe
- Replace all 29 internal import occurrences across 15 .go files
- Run go mod tidy to sync module cache
- Verified: go build ., go vet ./..., go test ./... all pass

feat: Phase 3 — upgrade Go 1.14 → 1.24, fix all deprecations

- go.mod: bump go directive to 1.24, add toolchain go1.24.7
- Replace all io/ioutil usages (20 calls, 11 files) with os.ReadFile,
  os.WriteFile, os.CreateTemp, io.ReadAll
- Remove math/rand.Seed (auto-seeded since Go 1.20) from names.go
- Replace golang.org/x/crypto/ssh/terminal with golang.org/x/term
  in sig.go, prompt/prompt.go, vault/rekey.go
- Replace x509.ParseCRL + pkix.CertificateList with
  x509.ParseRevocationList + x509.RevocationList + x509.CreateRevocationList
  in vault/x509.go (full type migration incl. RevokedCertificateEntries)
- Fix go vet issues: buffered signal channel in rc/config.go,
  non-constant format string in vault/vault.go
- Update deps: golang.org/x/term, crypto, net to latest;
  vaultkv v0.5.0→v0.7.0, mattn/go-isatty, yaml.v2; go mod tidy
- Makefile: add unit-test target, fix deprecated go get → go install
- ci/pipeline.yml: go version 1.16 → 1.24

All unit tests pass: go test ./...

feat: Phase 2 — split monolithic main.go and vault/vault.go

Split main.go (4,484 lines) into 10 domain-specific cmd_*.go files in
package main, each with a registerXxxCommands(r *Runner, opt *Options)
registration function. main.go is reduced to 385 lines containing only
Options struct, connect(), getVaultURL(), and a slim main() dispatcher.

Split vault/vault.go (1,151 lines) into 4 domain-specific files:
- vault/read_write.go: Read, Write, List
- vault/delete.go: Delete, DeleteTree, DeleteVersions, DestroyVersions, Undelete
- vault/copy_move.go: Copy, Move, MoveCopyTree
- vault/pki.go: CertOptions, CreateSignedCertificate, RevokeCertificate,
  CheckPKIBackend, RetrievePem, FindSigningCA, SaveSealKeys
vault/vault.go reduced to 301 lines with core Vault struct and helpers.

All existing tests pass: go build ., go test ./...

feat: add Phase 1 unit tests for base functionality

Add comprehensive unit test coverage for all core packages using
Ginkgo/Gomega framework as safety net before refactoring in Phases 2-6.

New test files (10):
- vault/errors_test.go: error types and predicates
- vault/secret_test.go: Secret CRUD, JSON/YAML, Format, Password
- vault/tree_test.go: PathLessThan, Sort, Merge, Paths, Basename
- rc/rc_suite_test.go: Ginkgo bootstrap for rc package
- rc/config_test.go: Config operations, Find, Apply, Read/Write
- main_suite_test.go: Ginkgo bootstrap for package main
- util_test.go: duration parsing, uniq deduplication
- names_test.go: RandomName format and word list validation
- runner_test.go: Runner dispatch, execute, help output
- ui_test.go: parseKeyVal for k=v, k@file, bare key syntax

Extended:
- vault/utils_test.go: EscapePathSegment, EncodePath, PathHasKey,
  PathHasVersion, Canonicalize

Total: 213 test specs (135 vault + 28 rc + 50 main), 1 skipped
(os.Exit in Help).