chef / chef/chef-server

Improve permission denied error messages to specify client vs user

Open
#96 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Good First Issue Triage: Confirmed Type: Enhancement
Dominant language
Erlang
Stars
303
Forks
211
Avg merge
1d 8h
Merged PRs (30d)
5

Description

Currently, when the user performs an unauthorized action, they receive a message such as the following:

ERROR: Server responded with error 403 "Forbidden"
ERROR: Error Body: {"error":["missing read permission"]}

While this is clear enough in many cases, it could be improve by:

  1. Specifying the identity of the actor in question. "missing read permission for client[NAME]" or "missing read permission for user[NAME]". This will help users who might have a client and user with the same name and are accidentally using the client rather than the user.

  2. Specifying the object that they don't have permission on.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Erlang code that formats 403 permission errors and inspect any existing tests for those messages. Done means the error identifies whether the missing permission belongs to a client or user and names the object involved.

Written by the indexing model from the issue text.

Assessment

Tech stack
erlang
Domain
authorization, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.