hashicorp / hashicorp/consul

acl: remove aclAccessorID methods

Open
#12,233 0 comments 0 reactions 0 assignees View on GitHub
theme/acls theme/internal-cleanup
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

More context in #12166. In that PR we removed two of the `aclAccessorID` methods.

The two remaining methods are `agent.Agent.aclAccessorID` and `agent/local.Sate.aclAccessorID`. These two are now slightly more expensive because they build a full Authorizer (although that can be cached, so may not be that much more expensive).

In the near future we are planning on improving the ACL permission denied error to include the accessor ID. Once that change is complete we no longer need the `aclAccessorID` methods, because the id they are looking up will already be in the error message.

This issue is to remind us to remove these extra `aclAccessorID` methods once they are no longer needed.

Contributor guide

Open the contributing guide

Research direction

First confirm that the planned ACL permission-denied error change includes the accessor ID. Then inspect agent.Agent.aclAccessorID and agent/local.Sate.aclAccessorID and their callers; remove both methods once they are no longer needed, and verify the relevant Go tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authorization
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.