Skip to content

Add a method to read static roles in the database engine #1009

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

Conversation

mimato
Copy link
Contributor

@mimato mimato commented Jun 20, 2023

Currently, the database backend does not provide a way to read static roles, only dynamic roles. This PR adds a method to read static roles as well.

Vault API doc: https://developer.hashicorp.com/vault/api-docs/secret/databases#read-static-role

Add a method to read static roles in the database engine
@mimato mimato requested a review from a team as a code owner June 20, 2023 16:46
@briantist briantist added enhancement a new feature or addition secrets engines generally related to a Vault secrets engine database database secrets engine labels Jun 21, 2023
@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Merging #1009 (e7b63c1) into main (3b4e5ca) will increase coverage by 0.13%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##             main    #1009      +/-   ##
==========================================
+ Coverage   83.59%   83.72%   +0.13%     
==========================================
  Files          65       65              
  Lines        3023     2992      -31     
==========================================
- Hits         2527     2505      -22     
+ Misses        496      487       -9     
Impacted Files Coverage Δ
hvac/api/secrets_engines/database.py 35.59% <33.33%> (-0.13%) ⬇️

... and 8 files with indirect coverage changes

@briantist briantist self-assigned this Jun 21, 2023
@briantist briantist added this to the 1.2.0 milestone Jun 21, 2023
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.

Hi @mimato , welcome and thanks very much for this contribution! I was going to ask if you might be able to add tests for the new method... and then realized we don't have tests for this engine at all 😔 so I can't reasonably ask for that as a pre-requisite on this PR!

The code looks great though, if you're interested we have lots more we can use help with, thanks again!

@briantist briantist merged commit 2786bb8 into hvac:main Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database database secrets engine enhancement a new feature or addition secrets engines generally related to a Vault secrets engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants