You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: kubernetesLogin uses {{kubernetesPath}} mustache variable but it's not passed, causing /auth//login path in v0.10.10 #300
In version 0.10.10, the kubernetesLogin command uses a mustache template for its path: /auth/{{mount_point}}{{^mount_point}}{{kubernetesPath}}{{/mount_point}}/login. However, the kubernetesPath variable is not passed to the template context (it is present only on the client object, not in the args), resulting in an incomplete path like /auth//login instead of the expected /auth/kubernetes/login.
To reproduce
Use node-vault v0.10.10.
Attempt a Kubernetes login using vault.kubernetesLogin({role: 'my-role', jwt: 'my-jwt'}) without manually specifying kubernetesPath.
The resulting path for the API request is /auth//login (missing the mount point).
In src/index.js, only user args are passed to mustache, not client.kubernetesPath.
Expected behavior
The library should supply kubernetesPath correctly in the template context, defaulting to 'kubernetes', so the POST goes to /auth/kubernetes/login unless overridden.
Actual behavior
Unless kubernetesPath is manually passed, path renders as /auth//login due to missing template context.
Workaround
Pass kubernetesPath: 'kubernetes' explicitly in the login args when using v0.10.10:
The documentation should mention this as a known bug affecting v0.10.10 and related versions, with advice for users to upgrade or use the workaround above.
Activity