Hi Consul Team,
I have integrated Consul with SpringBoot application. Initially, I have connected Consul and SpringBoot application and did some testing. Everything was working good. Now, I have enabled ACLs, added the tokens (anonymous, Bootstrap Token (Global Management), Agent Token) and the required policies too.
To connect to Consul with ACL enabled from my SpringBoot application, I have added the property below in the bootstrap.yml of my application.
spring.cloud.consul.config.acl-token
I have provided the Agent Token value for this property. The application is not booting up, giving the error below.
Caused by: com.ecwid.consul.v1.OperationException: OperationException(statusCode=403, statusMessage=‘Forbidden’, statusContent=‘Permission denied: token with AccessorID ‘00000000-0000-0000-0000-000000000002’ lacks permission ‘service:write’ on “AppName”’)
I have added the write policy too under the anonymous token but I am not able to understand why it is using the anonymous token even though I have mentioned the Agent token. Even under the anonymous token, I have created the policy. But still, receiving this error and blocking our progress.
Please help me to resolve this issue.
Thanks & Regards,
Santosh.