influxdata / influxdata/influxdb

Unable to create buckets using new token

Open
#21,453 2 comments 0 reactions 0 assignees View on GitHub
area/2.x area/api area/auth area/cli
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 new user
influx user create -n abc -p svwuevcw -t supersecretadmintoken
2. create token for new user with all permissions
influx auth create -t supersecretadmintoken -u abc --read-buckets --read-checks --read-dashboards --read-dbrps --read-notificationEndpoints --read-notificationRules --read-tasks --read-orgs --read-telegrafs --read-user --skip-verify --write-buckets --write-checks --write-dashboards --write-dbrps --write-notificationEndpoints --write-notificationRules --write-orgs --write-tasks --write-telegrafs --write-user -d newToken2 -o myorg

3. create bucket using new generated token
influx bucket create -n abccvw -t P-SkqtZPrLs7ByAADWDtg9pXAf1qUgbhlKE7pyrVjFUFVLE2zAYuFejLiVnVJAikE39UQo9ZkMJmCWnJYAGKYA== -o myorg

__Expected behavior:__
user should be able to create new bucket using new token

__Actual behavior:__
i get below error
Error: Failed to get ID for org 'myorg' (do you have org-level read permission?): organization not found.
See 'influx bucket create -h' for help

__Environment info:__

* System info: linux
* InfluxDB version: 2.0.6
* Other relevant environment details: Container runtime **docker**

__Config:__
Copy any non-default config values here or attach the full config as a gist or file.

__Logs:__
Include snippet of errors in log.

__Performance:__
Generate profiles with the following commands for bugs related to performance, locking, out of memory (OOM), etc.

```sh
# Commands should be run when the bug is actively happening.
# Note: This command will run for ~30 seconds.
curl -o profiles.tar.gz "http://localhost:8086/debug/pprof/all?cpu=30s"
iostat -xd 1 30 > iostat.txt
# Attach the `profiles.tar.gz` and `iostat.txt` output files.
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported user, token, and bucket commands in the Docker-based Linux environment, starting with the CLI's organization lookup and token permission handling. Trace why the generated token cannot read the organization, and consider the issue complete when the new token can create a bucket in myorg without the organization-not-found error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, linux
Domain
authentication, authorization, cli, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.