spring-cloud / spring-cloud-consul

Spring Cloud Consul
http://cloud.spring.io/spring-cloud-consul/
Apache License 2.0
813 stars 541 forks source link

ACL token is not sent with events #709

Open kevinimbrechts opened 3 years ago

kevinimbrechts commented 3 years ago

Hi there.

I am using Consul 1.6.1 with CAS 6.3.2 (Apereo) with cas-server-support-consul-client (https://mvnrepository.com/artifact/org.apereo.cas/cas-server-support-consul-client/6.3.2) and it seems that Spring Cloud doesn't send the ACL token (spring.cloud.consul.discovery.acl-token) for events (PUT /v1/event/fire/serviceThemeResolverSupportedBrowsers-out-0 for exemple). CAS use cas-server-support-consul-client (org.apereo.cas)

I think the problem comes from this class: https://github.com/spring-cloud/spring-cloud-consul/blob/master/spring-cloud-consul-binder/src/main/java/org/springframework/cloud/consul/binder/ConsulSendingHandler.java

I see a TODO to send headers, and Consul use Authorization or CONSUL_HTTP_TOKEN headers.

Can you confirm that the problem is there?

Many thanks.