-
Notifications
You must be signed in to change notification settings - Fork 486
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
Fix: only one of trust_bundle_path, trust_bundle_url, or insecure_bootstrap can be set #4532
Conversation
4f1a92c
to
59fc39c
Compare
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.
Thanks!! it looks great just some minor nits
59fc39c
to
66897f7
Compare
Hey @MarcosDY, thank you for the review. I addressed your comments. Could you take a second look at it? |
66897f7
to
d8be6af
Compare
…tstrap can be set @mnp reported in issue 4530 that it was possible to set trust_bundle_url and insecure_bootstrap in the Agent configuration. There was a test for this case. However, the test was just checking if there was an error. There was an error but not the expected one. This commit also adds expectErrorContains to the test case struct so tests can check the expected error message. Also, more tests added. Signed-off-by: Matteus Silva <silvamatteus@lsd.ufcg.edu.br>
d8be6af
to
fbf4c14
Compare
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.
Thanks!!!
…tstrap can be set (spiffe#4532) @mnp reported in issue 4530 that it was possible to set trust_bundle_url and insecure_bootstrap in the Agent configuration. There was a test for this case. However, the test was just checking if there was an error. There was an error but not the expected one. This commit also adds expectErrorContains to the test case struct so tests can check the expected error message. Also, more tests added. Signed-off-by: Matteus Silva <silvamatteus@lsd.ufcg.edu.br> Signed-off-by: Faisal Memon <fymemon@yahoo.com>
@mnp reported in issue #4530 that it was possible to set trust_bundle_url and insecure_bootstrap in the Agent configuration. There was a test for this case. However, the test was just checking if there was an error. There was an error but not the expected one. This commit also adds expectErrorContains to the test case struct so tests can check the expected error message. Also, more tests added.
Pull Request check list
Affected functionality
SPIRE Agent config validation.
Description of change
Now, the validation code checks when the insecure bootstrap option is used with trust bundle config options and returns proper error messages. Tests were updated.
Which issue this PR fixes
#4530