influxdata / influxdata/influxdb

Tokens created via CLI with orgs read access can't list orgs via HTTP API

Open
#21,138 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/2.x area/api area/api-docs area/auth kind/bug
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.

1. Create a token with orgs read access via the influx cli. For instance,
```sh
influx auth create --read-orgs
```
2. Use this token to authenticate with the GET `/api/v2/orgs` endpoint

__Expected behavior:__
I expect to receive a list of the organizations.

__Actual behavior:__
I receive an empty list.

__Environment info:__

* System info: Linux 4.15.0-128-generic x86_64
* InfluxDB version: InfluxDB 2.0.4 (git: 4e7a59bb9a) build_date: 2021-02-08T17:47:02Z
* Other relevant environment details: server running on Kubernetes in a Docker container

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

Reproduce the problem with `influx auth create --read-orgs`, then use the token against GET `/api/v2/orgs` and inspect the CLI and HTTP API authentication paths. Done means a token created with organizations read access returns the expected organization list instead of an empty list.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, authentication, authorization, cli
Issue type
Bug
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.