# Confused over applying basic ACLs

**URL:** <https://discuss.hashicorp.com/t/confused-over-applying-basic-acls/3805>\
**Category:** Consul\
**Created:** [November 8, 2019, 7:31pm UTC](https://discuss.hashicorp.com/t/confused-over-applying-basic-acls/3805 "2019-11-08T19:31:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsujp](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/tsujp/32/2454_2.png) [@tsujp](https://discuss.hashicorp.com/u/tsujp)\
**Post date:** [November 8, 2019, 7:31pm UTC](https://discuss.hashicorp.com/t/confused-over-applying-basic-acls/3805/1 "2019-11-08T19:31:07Z")

</div>

I’ve read the ACL guides on Hashicorp learn and the docs on configuring Consul and I still don’t really get it, and the things I have applied don’t seem to be working.

I have two agents in my cluster both capable of being clients and servers. Thus I want both to have unlimited permissions to do whatever they want.

Should I just apply the inherent `global-management` policy or should I roll my own policies? I tried rolling my own which is:

```auto
acl = "write"

# cluster-wide Consul information
operator = "write"

# node API
agent_prefix "" {
  policy = "write"
}

# service API
service "" {
  policy = "write"
}

# key/value API – https://www.consul.io/api/kv.html
key_prefix "" {
  policy = "write"
}

# agent API – https://www.consul.io/api/agent.html
agent_prefix "" {
  policy = "write"
}

# event API – https://www.consul.io/api/event.html
event_prefix "" {
  policy = "write"
}

```

And I created tokens based on that policy using

```auto
consul acl token create -description "consul-server-one agent token" \
  -policy-name agent-trusted

```

But in my consul logs on each agent all I see are things like

```auto
[ERR] agent: failed to sync remote state: ACL not found
registration blocked by ACLs

```

And the like.

Here are my agent configurations

```auto
primary_datacenter = "TEST-1" # needed for ACLs
datacenter = "TEST-1"
data_dir = "/opt/consul"
disable_keyring_file = true # only use what we have in `encrypt`
encrypt = "my_key_here"
performance {
  raft_multiplier = 1
}
retry_join = [
  "IP_1",
  "IP_2"
]
acl {
  enabled = true
  default_policy = "deny" # change to `deny` after bootstrapping
  down_policy = "extend-cache"
  enable_token_persistence = true
  tokens {
    agent = EACH_AGENTS_SECRET_TOKEN_ID_HERE
  }
}

```

---

<div class="post-metadata">

**Author:** ![kaitlincarter-hc](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/kaitlincarter-hc/32/1306_2.png) [@kaitlincarter-hc](https://discuss.hashicorp.com/u/kaitlincarter-hc)\
**Post date:** [November 8, 2019, 9:32pm UTC](https://discuss.hashicorp.com/t/confused-over-applying-basic-acls/3805/2 "2019-11-08T21:32:23Z")

</div>

Hi Jordan,

It’s generally better to create custom policies for tokens you’ll want to rotate or update, rather than using `global-management`.

It looks like your policy is missing `node_prefix`. The ACL [rules page](https://www.consul.io/docs/acl/acl-rules.html#node-rules) for `node` says: “Agents need to be configured with an acl.tokens.agent with at least “write” privileges to their own node name in order to register their information with the catalog,”

I recently wrote two new ACL guides: 1) to help users [discover the minimum required privileges](https://learn.hashicorp.com/consul/security-networking/managing-acl-policies) 2) [troubleshooting the ACL system](https://learn.hashicorp.com/consul/security-networking/acl-troubleshooting)

Let me know if you find either useful!  
Kaitlin
