Yes, I have set ca_file in the config. I have used http instead of https as the certificate is not recognized in the console.
Below is the command output:
consul ACL policy read -name "deny_anonymous_read"
Error determining policy ID: Get http://127.0.0.1:8500/v1/acl/policies: net/http: HTTP/1.x transport connection broken: malformed HTTP response “\x15\x03\x01\x00\x02\x02”
However, the below command helped with listing policies:
curl --header "X-Consul-Token: my-master-token" http://127.0.0.1:8400/v1/acl/policies
[
{
…
},
{
“ID”: “3c2660d5-383c-2628-2978-e3707cad7ecb”,
“Name”: “deny_anonymous_read”,
“Description”: “”,
“Datacenters”: null,
“Hash”: “token-policy-hash”,
“CreateIndex”: 65519316,
“ModifyIndex”: 65521198
},
{
…
},
{
…
}
]
curl --header "X-Consul-Token: my-master-token" http://127.0.0.1:8400/v1/agent/members
[
{
“Name”: “my-app-node”,
“Addr”: “node-ip-address”,
“Port”: 8301,
“Tags”: {
“acls”: “1”,
“build”: “1.4.0:0bddfa23”,
“dc”: “dc1”,
“id”: “some-node-id”,
“role”: “node”,
“segment”: “”,
“vsn”: “2”,
“vsn_max”: “3”,
“vsn_min”: “2”
},
“Status”: 1,
“ProtocolMin”: 1,
“ProtocolMax”: 5,
“ProtocolCur”: 2,
“DelegateMin”: 2,
“DelegateMax”: 5,
“DelegateCur”: 4
},
{…},
{…} ]
curl http://127.0.0.1:8400/v1/catalog/nodes
[
{
“ID”: “my-app-node-id”,
“Node”: “my-app-node”,
“Address”: “node-ip-address”,
“Datacenter”: “dc1”,
“TaggedAddresses”: {
“lan”: “node-ip-address”,
“wan”: “node-ip-address”
},
“Meta”: {
“consul-network-segment”: “”
},
“CreateIndex”: 65504848,
“ModifyIndex”: 65504848
},
{…},
{…} ]