influxdata / influxdata/influxdb

Use `Authorization` subject in gRPC and HTTP authz

Open
#26,440 0 comments 0 reactions 0 assignees View on GitHub
v3
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

### Context

Following https://github.com/influxdata/influxdb/pull/26429, upstream changes to the `Authorizer` trait and related types were brought in that introduce the ability to associate a "subject" with a set of permissions. This is accomplished by the [`Authorization`](https://github.com/influxdata/influxdb3_core/blob/fd0e474a6c0af5ba867399d753f5df18f59907cb/authz/src/authorization.rs#L3-L10) type returned by the [`Authorizer::authorize`](https://github.com/influxdata/influxdb3_core/blob/fd0e474a6c0af5ba867399d753f5df18f59907cb/authz/src/authorizer.rs#L13-L37) method.

The subject was left as `None` in https://github.com/influxdata/influxdb/pull/26429.

### Purpose of this issue

Determine the correct use of the `subject` and make consistent use of it in gRPC and HTTP authz flows.

### Suggestions

* Stringified `TokenId` of the token associated with the permissions
* The name of the token associated with the permissions

Contributor guide

Open the contributing guide

Research direction

Start by reading the Authorization type and Authorizer::authorize method referenced in the issue, then trace how authorization is handled in the gRPC and HTTP flows. Determine the intended subject value, document the decision, and make its use consistent across both flows.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, rust
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.