letsencrypt / letsencrypt/boulder

Allow per-method instead of per-service gRPC permissions

Open
#8,220 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5.8k
Forks
649
Avg merge
3d 23h
Merged PRs (30d)
24

Description

We currently have a gRPC authInterceptor that checks whether the client calling a given gRPC method has permission to call methods on that service:
https://github.com/letsencrypt/boulder/blob/69ba857d5e52ea188011271ac5697401f9391414/grpc/interceptors.go#L509

We would like to make this more fine-grained, so that we can control these permissions at the method level, instead of the service level.

Within the actual validation method (linked above) this will be quite simple: don't drop the method name on the floor, and check a map that includes the method name. The harder part is deciding on a config format and exploding that config out into an easy-to-check map.

Config options include:

  • a map of method name to list of allowed client SANs (pro: easy to convert into final map; con: potentially lots of repetition in the config)
  • a map of client SAN to list of allowed methods (pro: easy to add a new client which only accesses a few methods; con: potentially lots of repetition in the config)
  • either of the above, with a list of defaults at the top (pro: reduces repetition; con: easier to make mistakes, might not reduce repetition in certain circumstances)

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 in grpc/interceptors.go at the authInterceptor validation method linked in the issue, and trace how the current service-level permission configuration reaches it. Decide on and document a method-level config format, then make the configuration available as a map keyed by method and client SAN. Done means permissions can be controlled per gRPC method without discarding the method name.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.