Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing certificate authentication mechanism #206

Open
sudiptosarkar opened this issue Nov 18, 2022 · 1 comment
Open

Missing certificate authentication mechanism #206

sudiptosarkar opened this issue Nov 18, 2022 · 1 comment
Assignees

Comments

@sudiptosarkar
Copy link
Contributor

We are missing TLS based authentication here. The documentation for the same can be found here: TLS Certificates - Auth Methods.

This is needed to get the token. Right now, we can create the client to use the client certificate and private key, but there's nothing to get the token:

const client = vault({ apiVersion: 'v1', endpoint: 'https://localhost:8200', requestOptions: { key: fs.readFileSync('./config/vaultClientAuthKey.pem'), cert: fs.readFileSync('./config/vaultClientAuthCert.pem'), ca: fs.readFileSync('./config/vaultCaCert.pem') } });

We need to add support for certAuth, so we can get the token, something like this:

client.certLogin(res => client.token = res.auth.client_token);
@aviadhahami
Copy link
Collaborator

Hey @sudiptosarkar
Saw your PR, lgtm

We're in the middle of a handover so this will get merged asap; Thx for yur contribution!

@aviadhahami aviadhahami self-assigned this Nov 20, 2022
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

No branches or pull requests

2 participants