-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP API does not work with tokens when registering services through the catalog #1034
Comments
Hi @jacobat, Was this working previously? I don't think we have supported the
I can see how the inconsistency with the other methods is a bit confusing. We could maybe support the |
I've updated the documentation to include the current |
I've only just tried this today and was surprised that the token query param did not work. It would indeed be nice if Consul had a uniform way of passing tokens. |
May I suggest a header then, such as |
I agree that a header would be ideal. I also ran into this when attempting to register a service via the catalog api. |
+1 for the HTTP Header for the uniform mechanism |
apparently in consul 0.7.0, the header X-Consul-Token works but WriteRequest method does not work anymore (it used to work in 0.6.3) |
Ok, I'm really confused - apparently ...?token=mytoken does work in 0.7.0 and as @kamaradclimber points out, WriteRequest no longer does... |
Sorry for the confusion - this was fixed in #1893 which ended up overwriting what was specified in |
I'm running a Consul server with ACL's enabled, defaulting to deny all access, and having a master token of "secret".
I have an
agent_service.json
file:and I can use it to register a service through the HTTP API:
I also have a
catalog_service.json
file:but when I try to register it through the API:
I get "Permission denied".
Logs:
I'm thinking this may possibly be related to #891.
The text was updated successfully, but these errors were encountered: