{"action":"created","issue":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/issues/326","repository_url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/issues/326/labels{/name}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/issues/326/comments","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/issues/326/events","html_url":"https://github.com/spring-cloud/spring-cloud-consul/issues/326","id":238917912,"number":326,"title":"Unable to deregister a service when using ACLs","user":{"login":"sergiords","id":4243186,"avatar_url":"https://avatars2.githubusercontent.com/u/4243186?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiords","html_url":"https://github.com/sergiords","followers_url":"https://api.github.com/users/sergiords/followers","following_url":"https://api.github.com/users/sergiords/following{/other_user}","gists_url":"https://api.github.com/users/sergiords/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiords/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiords/subscriptions","organizations_url":"https://api.github.com/users/sergiords/orgs","repos_url":"https://api.github.com/users/sergiords/repos","events_url":"https://api.github.com/users/sergiords/events{/privacy}","received_events_url":"https://api.github.com/users/sergiords/received_events","type":"User","site_admin":false},"labels":[{"id":153210521,"url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/milestones/28","html_url":"https://github.com/spring-cloud/spring-cloud-consul/milestone/28","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/milestones/28/labels","id":3151781,"number":28,"title":"2.0.0.M7","description":null,"creator":{"login":"spencergibb","id":594085,"avatar_url":"https://avatars3.githubusercontent.com/u/594085?v=4","gravatar_id":"","url":"https://api.github.com/users/spencergibb","html_url":"https://github.com/spencergibb","followers_url":"https://api.github.com/users/spencergibb/followers","following_url":"https://api.github.com/users/spencergibb/following{/other_user}","gists_url":"https://api.github.com/users/spencergibb/gists{/gist_id}","starred_url":"https://api.github.com/users/spencergibb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencergibb/subscriptions","organizations_url":"https://api.github.com/users/spencergibb/orgs","repos_url":"https://api.github.com/users/spencergibb/repos","events_url":"https://api.github.com/users/spencergibb/events{/privacy}","received_events_url":"https://api.github.com/users/spencergibb/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":1,"state":"open","created_at":"2018-02-28T21:16:27Z","updated_at":"2018-02-28T21:16:49Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2017-06-27T16:58:37Z","updated_at":"2018-02-28T21:16:49Z","closed_at":"2018-02-28T21:16:48Z","author_association":"NONE","body":"When using a Consul configured with ACLs service gets properly registrated:\r\n```sh\r\n18:29:19.062 DEBUG org.apache.http.headers http-outgoing-2 >> PUT /v1/agent/service/register?token=xxxx-xxxx-xxxx-xxxxx HTTP/1.1\r\n18:29:19.062 DEBUG org.apache.http.headers http-outgoing-2 >> Content-Length: 162\r\n18:29:19.062 DEBUG org.apache.http.headers http-outgoing-2 >> Content-Type: text/plain; charset=UTF-8\r\n18:29:19.062 DEBUG org.apache.http.headers http-outgoing-2 >> Host: localhost:8500\r\n18:29:19.063 DEBUG org.apache.http.headers http-outgoing-2 >> Connection: Keep-Alive\r\n18:29:19.063 DEBUG org.apache.http.headers http-outgoing-2 >> User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_121)\r\n18:29:19.063 DEBUG org.apache.http.headers http-outgoing-2 >> Accept-Encoding: gzip,deflate\r\n18:29:19.065 DEBUG org.apache.http.headers http-outgoing-2 << HTTP/1.1 200 OK\r\n```\r\n\r\nHowever when application is shutdown service is not deregistrated due to lack of permission (token is not passed, neither in parameter, nor in header).\r\n\r\n```sh\r\n18:45:02.442 DEBUG org.apache.http.headers http-outgoing-2 >> GET /v1/agent/service/deregister/my-service HTTP/1.1\r\n18:45:02.442 DEBUG org.apache.http.headers http-outgoing-2 >> Host: localhost:8500\r\n18:45:02.442 DEBUG org.apache.http.headers http-outgoing-2 >> Connection: Keep-Alive\r\n18:45:02.442 DEBUG org.apache.http.headers http-outgoing-2 >> User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_121)\r\n18:45:02.442 DEBUG org.apache.http.headers http-outgoing-2 >> Accept-Encoding: gzip,deflate\r\n18:45:02.442 DEBUG org.apache.http.headers http-outgoing-2 << HTTP/1.1 403 Forbidden\r\n```\r\n\r\nPlus, client uses a GET method instead of a PUT method as documented in [Consul API](https://www.consul.io/api/agent/service.html#deregister-service)"},"comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/issues/comments/369385698","html_url":"https://github.com/spring-cloud/spring-cloud-consul/issues/326#issuecomment-369385698","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/issues/326","id":369385698,"user":{"login":"spencergibb","id":594085,"avatar_url":"https://avatars3.githubusercontent.com/u/594085?v=4","gravatar_id":"","url":"https://api.github.com/users/spencergibb","html_url":"https://github.com/spencergibb","followers_url":"https://api.github.com/users/spencergibb/followers","following_url":"https://api.github.com/users/spencergibb/following{/other_user}","gists_url":"https://api.github.com/users/spencergibb/gists{/gist_id}","starred_url":"https://api.github.com/users/spencergibb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencergibb/subscriptions","organizations_url":"https://api.github.com/users/spencergibb/orgs","repos_url":"https://api.github.com/users/spencergibb/repos","events_url":"https://api.github.com/users/spencergibb/events{/privacy}","received_events_url":"https://api.github.com/users/spencergibb/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T21:16:48Z","updated_at":"2018-02-28T21:16:48Z","author_association":"MEMBER","body":"Closed via #401"}}
{"actor":{"display_login":"spencergibb"}}