consul-alerts icon indicating copy to clipboard operation
consul-alerts copied to clipboard

Permission denied with consul 1.4.2

Open fuero opened this issue 5 years ago • 2 comments

Just tried consul-alerts with consul 1.4.2, it dies with (output from consul monitor):

[ERR] http: Request GET /v1/session/create?dc=dc1&token=, error: method GET not allowed from=x.x.x.x [ERR] http: Request GET /v1/agent/self?dc=dc1, error: Permission denied from=

According to the docs, it's supposed to be a PUT request instead of GET for the session API and the agent API doesn't accept parameters.

For completion's sake, here's the policy I used:

{
  "node_prefix": {
    "": {
      "policy": "write"
    }
  },
  "service_prefix": {
    "": {
      "policy": "read"
    }
  },
  "key_prefix": {
    "consul-alerts": {
      "policy": "write"
    }
  },
  "agent_prefix": {
    "": {
      "policy": "write"
    }
  },
  "session_prefix": {
    "": {
      "policy": "write"
    }
  },
  "event_prefix": {
    "": {
      "policy": "read"
    }
  }
}

fuero avatar Feb 21 '19 15:02 fuero

Anyone got a fix for this? I'm seeing the same problem with consul 1.5.1.

I'm using the following ACL policy:

key_prefix "consul-alerts/" {
  policy = "write"
}

service_prefix "" {
  policy = "read"
}

session_prefix "" {
  policy = "write"
}

agent_prefix "" {
    policy = "read"
}

And I'm seeing: [ERR] http: Request GET /v1/agent/self?dc=argosy, error: Permission denied

far-blue avatar Aug 12 '19 10:08 far-blue

This is related to #270 and is due to an old Consul API dep.

far-blue avatar May 27 '20 11:05 far-blue