Undocumented difference between the /v1/catalog/register and /v1/agent/service/register
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
#### Overview of the Issue
When we use the [Consul ESM](https://github.com/hashicorp/consul-esm#usage) we follow the instructions on the main page, and push changes to the consul catalog directly. In the past we've noticed some fields in the catalog don't work as we would expect them to work as when we push to the agent end point.
The `tls_skip_verify` flag for the HTTP check definition seems to be one of them. In the code I see the Catalog end point decodes this as `TLSSkipVerify`
https://github.com/hashicorp/consul/blob/master/agent/structs/structs.go#L1377
The agent end point hoever decodes this as `tls_skip_verify`
https://github.com/hashicorp/consul/blob/master/agent/structs/check_definition.go#L36
The Catalog end-point [documentation](https://www.consul.io/api-docs/catalog#parameters) seem to imply that `tls_skip_verify` should work.
Could the difference be documented, or could `tls_skip_verify` be supported on the catalog end point (in addition to `TLSSkipVerify` so as not to break compatibility)?
#### Reproduction Steps
Steps to reproduce this issue, eg:
1. Create a consul cluster (no need for an ESM to reproduce, dev mode should be fine too)
1. Run the register command as in https://github.com/hashicorp/consul-esm#usage, however add `"tls_skip_verify": true` to the HTTP Check `Definition` section. The registration will succeed.
1. Query the /v1/health/node/foo end point on the consul cluster you will see that the tls_skip_verify option is not present.
Contributor guide
Assessment
This issue has not been assessed yet.