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

Report secret version as a hash of the input and contents #148

Merged
merged 6 commits into from
May 5, 2022

Conversation

tomhjp
Copy link
Contributor

@tomhjp tomhjp commented Feb 23, 2022

Closes #146

  • Generate a version based on the secret inputs and contents so that downstream consumers can tell the secret has been rotated
  • Generate an error when duplicate object names are used so that we can confidently use object name as the key for versions we return - this was essentially a bug we didn't catch before because it results in overwriting files
  • Create a higher level unit test with mocked HTTP servers so we can verify the version behaviour nearer the API level.

This PR also deletes some unused code (writeSecret() and validateFilePath()) along with their tests now that the provider no longer supports writing secrets itself. Happy to split that out into a separate PR if it makes the diff tricky to read.

@hashicorp-cla
Copy link

hashicorp-cla commented Mar 12, 2022

CLA assistant check
All committers have signed the CLA.

@tomhjp tomhjp requested review from tvoran and swenson May 4, 2022 11:24
internal/config/config.go Outdated Show resolved Hide resolved
Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
@tomhjp tomhjp merged commit e7677e0 into main May 5, 2022
@tomhjp tomhjp deleted the hash-versions branch May 5, 2022 12:29
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

Successfully merging this pull request may close these issues.

SecretProviderClassPodStatus doesn't update status because version is hard-coded to 0
3 participants