Skip to content

Fix health status namespace header#398

Open
eagle27272 wants to merge 1 commit into
rajanadar:masterfrom
eagle27272:agent/fix-health-namespace-header
Open

Fix health status namespace header#398
eagle27272 wants to merge 1 commit into
rajanadar:masterfrom
eagle27272:agent/fix-health-namespace-header

Conversation

@eagle27272

Copy link
Copy Markdown

Summary

  • stop sending X-Vault-Namespace for GetHealthStatusAsync requests
  • add an internal request helper flag that defaults to preserving existing namespace behavior for all other APIs
  • add a changelog entry for the fix

Why

HashiCorp documents /sys/health as a restricted endpoint and states that clients must call it from the root namespace: https://developer.hashicorp.com/vault/api-docs/system/health

When VaultClientSettings.Namespace is configured, VaultSharp currently sends X-Vault-Namespace on health checks, which makes the request target a namespace even though the endpoint is only valid at root.

Validation

  • dotnet build src/VaultSharp/VaultSharp.csproj -f netstandard2.0 --no-restore

Notes

  • CONTRIBUTING.MD asks contributors to run the VaultSharp.Samples console app. I did not run it here because it requires a local Vault server at http://localhost:8200 with the sample setup.

@eagle27272
eagle27272 marked this pull request as ready for review July 10, 2026 13:55
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

Successfully merging this pull request may close these issues.

1 participant