# Is possible to set a ACL token just for view the web UI?

**URL:** <https://discuss.hashicorp.com/t/is-possible-to-set-a-acl-token-just-for-view-the-web-ui/37035>\
**Category:** Consul\
**Created:** [March 14, 2022, 9:39pm UTC](https://discuss.hashicorp.com/t/is-possible-to-set-a-acl-token-just-for-view-the-web-ui/37035 "2022-03-14T21:39:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cheyuxuanll](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/cheyuxuanll/32/23974_2.png) [@cheyuxuanll](https://discuss.hashicorp.com/u/cheyuxuanll)\
**Post date:** [March 14, 2022, 9:39pm UTC](https://discuss.hashicorp.com/t/is-possible-to-set-a-acl-token-just-for-view-the-web-ui/37035/1 "2022-03-14T21:39:00Z")

</div>

Currently, I log in to the web UI with my global management token, which may not be safe. Is there any that I can set up an ACL token that can be used to view the web UI only?

Thanks  
Yuxuan

---

<div class="post-metadata">

**Author:** ![blake](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/blake/32/27620_2.png) [@blake](https://discuss.hashicorp.com/u/blake)\
**Post date:** [March 23, 2022, 5:13pm UTC](https://discuss.hashicorp.com/t/is-possible-to-set-a-acl-token-just-for-view-the-web-ui/37035/2 "2022-03-23T17:13:49Z")

</div>

Hi @cheyuxuanll,

Consul does not provide a way to create an ACL token that only works for the UI, but does not work for the API. The UI is a client-side web application that queries the HTTP API to retrieve and display resources.

You can create a policy with read-only permissions so that it can view services and nodes in Consul the UI, but not the ability to make changes to those resources via the CLI or API.

```nohighlight
node_prefix "" {
  policy = "read"
}

service_prefix "" {
  policy = "read"
}

```

If you want to grant this token access to view the KV store, you will also need `key:read` permission.

```nohighlight
key_prefix "" {
  policy = "read"
}

```

See [https://learn.hashicorp.com/tutorials/consul/access-control-setup-production#consul-ui-token](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production#consul-ui-token) for more information.
