diff --git a/CHANGELOG.md b/CHANGELOG.md index 14f0e56..e30340c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## v?.??.? (Unreleased) +IMPROVEMENTS + +- Added `cluster_address` field to `LeaderStatus` response from `sys/leader` endpoint [GH-204] + BUG FIXES - Fixed `encode_path` incorrectly encoding hyphens (`-`), which caused 403 errors on Vault 1.15+ [GH-350, GH-343] diff --git a/lib/vault/api/sys/leader.rb b/lib/vault/api/sys/leader.rb index fbf0f22..439a500 100644 --- a/lib/vault/api/sys/leader.rb +++ b/lib/vault/api/sys/leader.rb @@ -18,6 +18,11 @@ class LeaderStatus < Response # @return [String] field :leader_address, as: :address + # @!attribute [r] cluster_address + # URL where the cluster leader is running. + # @return [String] + field :leader_cluster_address, as: :cluster_address + # @deprecated Use {#ha_enabled?} instead def ha?; ha_enabled?; end @@ -35,7 +40,7 @@ class Sys # Determine the leader status for this vault. # # @example - # Vault.sys.leader #=> # + # Vault.sys.leader #=> # # # @return [LeaderStatus] def leader diff --git a/spec/integration/api/sys/leader_spec.rb b/spec/integration/api/sys/leader_spec.rb index 87585f4..75cd174 100644 --- a/spec/integration/api/sys/leader_spec.rb +++ b/spec/integration/api/sys/leader_spec.rb @@ -17,6 +17,7 @@ module Vault expect(result.is_leader?).to be(false) expect(result.leader?).to be(false) expect(result.address).to eq("") + expect(result.cluster_address).to eq("") end end