hashicorp / hashicorp/consul

New acl_down_policy: read-only

Open
#4,139 0 comments 0 reactions 0 assignees View on GitHub
theme/acls type/enhancement
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

#### Feature Description

There are currently 3 `acl_down_policy` options:
* allow
* deny
* extend-cache

`read-only` could be useful add on to that list

#### Use Case(s)

We ran into a situation where, when retrieving the list of nodes from the Catalog API or a list of keys from the K/V API, the list would come empty (https://github.com/hashicorp/consul/issues/4103)

We discovered the situation arises when the cluster has no leader and the server serving the request hasn't had the chance to cache any ACL token (we have `acl_down_policy: extend-cache`).

Obviously, a solution would be to set the `acl_down_policy` to `allow`, but we find it too permissive.

We think having a `read-only` policy would help in these situations, specially when you rely on Consul as a source of truth for your infrastructure.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how acl_down_policy is handled for requests to the Catalog API and K/V API, especially when the cluster has no leader and no ACL token is cached. Define the read-only policy's permitted and denied operations and verify that it resolves the empty-list behavior without granting unrestricted access.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, authorization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.