Repository navigation
Fix ACL token propagation for Consul events - #1042
Conversation
Signed-off-by: 98001yash <yashchauhan.gaya@gmail.com>
ryanjbaxter
left a comment
There was a problem hiding this comment.
eventList should also pass the token. The tests should also cover eventList, the watch call, the default token, and property binding
Signed-off-by: 98001yash <yashchauhan.gaya@gmail.com>
|
Thanks for the feedback! I have updated the implementation to propagate the ACL token to both the The binder module tests are passing now. Please take another look when you get a chance. |
| } | ||
|
|
||
| public String getAclToken() { | ||
| return this.properties != null ? this.properties.getAclToken() : null; |
There was a problem hiding this comment.
If this.properties.getAclToken() is an empty string I think we should return null as well to maintain the previous behavior
Signed-off-by: 98001yash <yashchauhan.gaya@gmail.com>
|
Thanks for pointing this out! I've made the change and added a test for it. All binder tests are passing now. |
Summary
Fixes [#709](#709) by propagating the Consul ACL token to event firing API calls.
Previously, the ACL token was not included when firing Consul events, causing requests to fail when ACL enforcement was enabled.
Changes
ConsulBinderProperties.ConsulBinderConfiguration.EventServiceto pass the ACL token when firing events.ConsulSendingHandlerto include the ACL token in outbound event messages.EventServiceandConsulSendingHandler.Testing
./mvnw -pl spring-cloud-consul-binder -am testCloses #709