-
Notifications
You must be signed in to change notification settings - Fork 535
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
Don't overwrite vault_namespace path with response value. #396
Don't overwrite vault_namespace path with response value. #396
Conversation
Hi @williams-brian , thanks for working on this! First question, would you be willing to add a test that duplicates the issue, and then shows that this code solves it? Also, @petems , would you want to take a look at this one too? |
@tyrannosaurus-becks I have attempted to add a test case which demonstrates the issue, but I am not sure how to run the tests with Vault enterprise, so I haven't been able to verify that it works correctly. I hope my explanation of the issue is clear. After running |
Overwriting the path with the one returned by Vault causes an invalid namespace to be set when using nested namespaces. ex: namespace-b which is inside namespace-a will have the path overwritten with namespace-a/namespace-b/ when the correct value is namespace-b/
@tyrannosaurus-becks, I figured out how to run Vault Enterprise locally and use that for acceptance tests. The new test case should properly illustrate the issue. Running the test before this change:
Running the test after this change:
|
Good catch, I forgot to remove the logic around removing slashes after we added the validation function, which would break nested namespaces. This solution makes sense to me! 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@williams-brian wonderful! Thank you!
Don't overwrite vault_namespace path with response value.
Overwriting the path with the one returned by Vault causes an invalid namespace to be set when using nested namespaces.
ex:
namespace-b
which is insidenamespace-a
will have the path overwritten withnamespace-a/namespace-b/
when the correct value isnamespace-b/