Skip to content

Add alias_name_source for Kubernetes Auth create_role #1039

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

Merged
merged 7 commits into from
Sep 2, 2023

Conversation

michael-diggin
Copy link
Contributor

@michael-diggin michael-diggin commented Sep 2, 2023

For the Kubernetes auth method, Vault's create role API endpoint accepts alias_name_source as part of the payload (https://developer.hashicorp.com/vault/api-docs/auth/kubernetes#alias_name_source). This PR adds that as an optional argument to the create_role python method. Defaults to not set so no change to existing behaviour (as this param was only added in Vault 1.9)

@michael-diggin michael-diggin requested a review from a team as a code owner September 2, 2023 10:04
@briantist briantist self-assigned this Sep 2, 2023
@briantist briantist added enhancement a new feature or addition auth methods generally related to a Vault auth method kubernetes Kubernetes auth method labels Sep 2, 2023
@codecov
Copy link

codecov bot commented Sep 2, 2023

Codecov Report

Merging #1039 (a2d33d8) into main (9172473) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1039   +/-   ##
=======================================
  Coverage   84.99%   85.00%           
=======================================
  Files          65       65           
  Lines        3133     3135    +2     
=======================================
+ Hits         2663     2665    +2     
  Misses        470      470           
Files Changed Coverage Δ
hvac/api/auth_methods/kubernetes.py 89.79% <100.00%> (+0.43%) ⬆️

@briantist briantist added this to the 1.2.0 milestone Sep 2, 2023
@briantist
Copy link
Contributor

Hi @michael-diggin welcome and thanks for putting this up!

I made two small suggestions but it otherwise looks good. I'm trying to get v1.2.0 out imminently and we can probably get this included. If you're ok with the suggestions, you can commit them directly from the GitHub UI, or make them locally, or let me know and I can commit the changes as well.

@briantist briantist mentioned this pull request Sep 2, 2023
michael-diggin and others added 2 commits September 2, 2023 17:20
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
@michael-diggin
Copy link
Contributor Author

Hi @briantist, thanks for the quick review! I've accepted both suggestions and it would be great to get this into v1.2.0!

Copy link
Contributor

@briantist briantist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed one, will commit it for expediency

Copy link
Contributor

@briantist briantist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michael-diggin looks great! thanks very much for adding tests as well. Hope you might stick around with more contributions if you're able, we're actively seeking help on the project. Cheers!

@briantist briantist merged commit 31b5379 into hvac:main Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth methods generally related to a Vault auth method enhancement a new feature or addition kubernetes Kubernetes auth method
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants