abedra / libvault

A C++ library for Hashicorp Vault
MIT License
34 stars 26 forks source link

New: Add JwtAuthPointStrategy for authentication module #118

Closed hovo1994 closed 1 year ago

hovo1994 commented 1 year ago

Hello,

I am looking to add some functionality to allow a user to configure the jwt endpoint. This is what I came up with and got working with my local vault instance. Is this something we can get added to the main repo? If not, is there a better way to do this?

awesome library! Thanks for putting this together.

abedra commented 1 year ago

Hi @hovo1994,

Thank you for your submission. Are you looking to use the https://developer.hashicorp.com/vault/api-docs/auth/jwt auth strategy under a different configured name?

hovo1994 commented 1 year ago

Yes, it is the same JWT auth strategy, but the url endpoint is different for different scenarios. My jwt auth endpoint needs to be configurable for my use case. instead of being hardcoded like this: /auth/jwt/login I need this /auth/{AuthPoint}/login

hovo1994 commented 1 year ago

@abedra do you now if you will be able to include this in your next release?

abedra commented 1 year ago

Yes, it is the same JWT auth strategy, but the url endpoint is different for different scenarios. My jwt auth endpoint needs to be configurable for my use case. instead of being hardcoded like this: /auth/jwt/login I need this /auth/{AuthPoint}/login

Understood, thanks. In this case I think it's best to modify the current JWT strategy to allow a configurable mount. I believe this is already done in a few other places.

abedra commented 1 year ago

@abedra do you now if you will be able to include this in your next release?

I don't think this PR specifically should go out with the next release, but the functionality as stated above can.

abedra commented 1 year ago

This is now supported in https://github.com/abedra/libvault/releases/tag/0.58.0