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
Changing the default path of auth login like kubernetes #143
The solution we used was basically not use this library for auth login. We made a rest call instead to the endpoint we wanted. And then used this lib after auth.
@MPV could you share how you got it to work with a custom path?
We have not been able to get the custom path to work with the vault.kubernetesLogin() method and have been making our own request as @EZEDSEA has suggested.
enableAuth makes a POST request to /sys/auth/{{mount_point}} to create an auth method on the Vault server. This seems like it a) would require authenticating as a privileged user via a different auth method before enableAuth() could succeed, and b) does not address the more common use case of authenticating against an existing auth method with a non-standard mount point. But I could just be misunderstanding the example.
where I can apply the configuration so that my Vault agent authenticates in an API request, for example at: http://vault.vault.svc:8200/v1/auth/kubernetes/myk8s/login instead of: http:// vault.vault.svc:8200/v1/auth/kubernetes/login
since its quite old cannot says you can use it now but to any one new you can use the fix i did. You can download the repo in your local and run npm pack
use the tarball created in your projects with entry in package.json using the tarball for node vault
Activity
whatever555 commentedon Feb 11, 2020
having a similar issue here @EZEDSEA. Did you ever find a solution?
EZEDSEA commentedon Feb 12, 2020
The solution we used was basically not use this library for auth login. We made a rest call instead to the endpoint we wanted. And then used this lib after auth.
MPV commentedon Nov 18, 2020
I might have run into this also, not sure yet (still troubleshooting).
The way I interpret the documentation, it seems to indicate that this should be supported though?
https://github.com/kr1sp1n/node-vault/blob/master/features.md#vaultkuberneteslogin
Edit: Got it to work by using that feature.
bchrobot commentedon Jan 7, 2021
@MPV could you share how you got it to work with a custom path?
We have not been able to get the custom path to work with the
vault.kubernetesLogin()method and have been making our own request as @EZEDSEA has suggested.wsierakowski commentedon Jan 15, 2021
This can be controlled by the param mount_point as in the example here: https://github.com/kr1sp1n/node-vault/blob/70097269d35a58bb560b5290190093def96c87b1/example/auth_kubernetes.js#L17
The other issue I have is that I would like to add a namespace to the URL as well - like here:
<vault_domain>/v1/<name_space>/auth/<mountpoint>/login.wsierakowski commentedon Jan 15, 2021
ok it looks like support for namespaces have been added already: #137
bchrobot commentedon Jan 21, 2021
enableAuthmakes a POST request to/sys/auth/{{mount_point}}to create an auth method on the Vault server. This seems like it a) would require authenticating as a privileged user via a different auth method beforeenableAuth()could succeed, and b) does not address the more common use case of authenticating against an existing auth method with a non-standard mount point. But I could just be misunderstanding the example.aviadhahami commentedon Nov 10, 2022
Hey folks :)
I'm trying to cleanup all the issues;
Is this issue still a thing? is a feature/fix needed?
erivandosena commentedon Apr 17, 2023
hi!
where I can apply the configuration so that my Vault agent authenticates in an API request, for example at: http://vault.vault.svc:8200/v1/auth/kubernetes/myk8s/login instead of: http:// vault.vault.svc:8200/v1/auth/kubernetes/login
erivandosena commentedon Apr 17, 2023
As you did ?
vault.kubernetesLogin
POST /auth/{{mount_point}}{{^mount_point}}kubernetes{{/mount_point}}/login
fix for nodevault#143
pankaj-jain11 commentedon Feb 8, 2024
since its quite old cannot says you can use it now but to any one new you can use the fix i did. You can download the repo in your local and run npm pack
use the tarball created in your projects with entry in package.json using the tarball for node vault
"node-vault": "file:<generated-in-above.tgz>"
aviadhahami commentedon Feb 15, 2024
@pankaj-jain11 heya!
would you be able to PR this? I'll merge it asap
pjlucy commentedon Feb 29, 2024
@aviadhahami #245
fix for #143
aviadhahami commentedon Feb 29, 2024
@pjlucy merged this - thanks!
edit --> one of the CIs failed (the trufflehog🐖 ); please ignore it as I fixed it in 922f847
aviadhahami commentedon Feb 29, 2024
@pjlucy can I close this issue?
pjlucy commentedon Feb 29, 2024
Thanks for the merge :)
pjlucy commentedon Feb 29, 2024
This can be closed