Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InfluxDB 2: Cannot find authorization by user #16833

Closed
bednar opened this issue Feb 12, 2020 · 1 comment · Fixed by #16835
Closed

InfluxDB 2: Cannot find authorization by user #16833

bednar opened this issue Feb 12, 2020 · 1 comment · Fixed by #16835
Assignees
Labels
area/api kind/bug team/compute v2-prod-bug Trying to track all issues in V2 Prod to check code quality

Comments

@bednar
Copy link
Contributor

bednar commented Feb 12, 2020

The Internal Server Error occurs when I try find authorizations by userId.

# Create authorization
--> POST http://127.0.0.1:9999/api/v2/authorizations
--> {"orgID":"5876b32f6bbbaf02","permissions":[{"action":"read","resource":{"type":"users","orgID":"5876b32f6bbbaf02"}}],"status":"active"}
<-- 201 Created http://127.0.0.1:9999/api/v2/authorizations 
<-- {"id":"053a1903d5f19000","token":"SqZhaTZzM0mjIkpZsomD-3Go3n9_semXYZVbPMoinMlP85pKh0WCcMl2GNfNH0WhS1QdLUtH3epQf8RF4e3hEA==","status":"active","description":"","orgID":"5876b32f6bbbaf02","org":"my-org","userID":"053a17f5ac719000","user":"my-user","permissions":[{"action":"read","resource":{"type":"users","orgID":"5876b32f6bbbaf02","org":"my-org"}}],"links":{"self":"/api/v2/authorizations/053a1903d5f19000","user":"/api/v2/users/053a17f5ac719000"},"createdAt":"2020-02-12T07:56:57.5592168Z","updatedAt":"2020-02-12T07:56:57.5592168Z"}

# Delete authorization
--> DELETE http://127.0.0.1:9999/api/v2/authorizations/053a1903d5f19000
<-- 204 No Content http://127.0.0.1:9999/api/v2/authorizations/053a1903d5f19000 

# Find authorization by `userId`
--> GET http://127.0.0.1:9999/api/v2/authorizations?userID=053a17f5ac719000
<-- 500 Internal Server Error http://127.0.0.1:9999/api/v2/authorizations?userID=053a17f5ac719000 
<-- {"code":"internal error","message":"key not found"}

Steps to reproduce:

  1. Create authorization
  2. Delete this authorization
  3. Find authorizations by user

Expected behavior:
Return authorizations for user.

Actual behavior:

INFO: <-- 500 Internal Server Error http://127.0.0.1:9999/api/v2/authorizations?userID=053a17f5ac719000 (2ms)
INFO: {"code":"internal error","message":"key not found"}

Environment info:

  • InfluxDB version: docker v2.0.0-beta.3

Probably caused by #16818

cc @GeorgeMac

bednar added a commit to influxdata/influxdb-client-python that referenced this issue Feb 12, 2020
bednar added a commit to influxdata/influxdb-client-java that referenced this issue Feb 12, 2020
bednar added a commit to influxdata/influxdb-client-csharp that referenced this issue Feb 12, 2020
bednar added a commit to influxdata/influxdb-client-python that referenced this issue Feb 12, 2020
@GeorgeMac
Copy link
Contributor

Thanks @bednar I will get on this right away

@GeorgeMac GeorgeMac self-assigned this Feb 12, 2020
@cmd-influx cmd-influx added the v2-prod-bug Trying to track all issues in V2 Prod to check code quality label Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api kind/bug team/compute v2-prod-bug Trying to track all issues in V2 Prod to check code quality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants