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

Protect against version downgrade in secrets tune command #5788

Closed
wants to merge 3 commits into from

Conversation

catsby
Copy link
Contributor

@catsby catsby commented Nov 14, 2018

Fixed #5237 by guarding against removing the version option in secrets backends.

I'm not 100% confident in the placement of the test, I struggled constructing one in logical_system_test.go where maybe it makes more sense to be.

The test is currently in command/secrets_tune_test.go, I was able to construct a test that reproduces the regression and verifies it's fixed by 27f008b .

@briankassouf briankassouf added this to the 1.0 milestone Nov 14, 2018
@calvn
Copy link
Contributor

calvn commented Nov 14, 2018

This is semi-related since you're working with the options param:

"options": map[string]interface{}{"test": "true"},
and
"options": map[string]interface{}{"test": "true"},
should be removed since where's testing for the absence of the values after it's being unset. The current logic doesn't let you unset the options map once that's set since we are only writing to storage if len(options) > 0.

We should either remove that part if we don't support unsetting, or change it so that we can unset (but still preserve options["version"] when doing a complete unset to prevent downgrade). However, this would sort of revert #4325.

@calvn calvn mentioned this pull request Nov 16, 2018
@catsby
Copy link
Contributor Author

catsby commented Nov 19, 2018

Closing in favor of #5809

@catsby catsby closed this Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants