spring-cloud / spring-cloud/spring-cloud-consul

ACL token is not sent with events

Open
#709 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
Java
Stars
822
Forks
539
Avg merge
9h 31m
Merged PRs (30d)
7

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with spring-cloud-consul-binder/src/main/java/org/springframework/cloud/consul/binder/ConsulSendingHandler.java and inspect the TODO about sending headers. Trace how spring.cloud.consul.discovery.acl-token is handled for Consul event requests; done when the configured ACL token is sent with events.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.