influxdata / influxdata/influxdb
POST to /write with no token comes back as 401 instead of 403
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
STR:
1) Send a POST to /write that includes valid line protocol but no token.
-expected result: The API responds a 403 http response code.
-actual result: The API responds with a 401.
Note: sending a POST to /write with valid line protocol and an invalid token responds with 401 which is expected.
Note: I'm noticed this while running the test on the following images:
```
Kevins-MBP:influxdb kevin$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bf2730025139 sourcegraph/codeintel-go "/sbin/tini -- /usr/…" 45 hours ago Up 45 hours k8s_codeintel-go_codeintel-go-6878988cc8-xqvxt_sourcegraph_a1513178-fe6f-11e8-bba9-025000000001_1
e01923f75507 quay.io/influxdb/influxdb "/entrypoint.sh infl…" 45 hours ago Up 45 hours k8s_influxdb_influxdb-0_monitoring_a001d9b5-fe6f-11e8-bba9-025000000001_1
f3210003bf58 sourcegraph/codeintel-typescript "/sbin/tini -- node …" 2 days ago Up 2 days k8s_codeintel-typescript_codeintel-typescript-9dd9fdfd5-rxrcq_sourcegraph_a1654181-fe6f-11e8-bba9-025000000001_0
67abc8cd86bf dcb563c5444e "/entrypoint.sh kapa…" 2 days ago Up 2 days k8s_kapacitor_kapacitor-845bd6f559-4r225_monitoring_a00a6fdd-fe6f-11e8-bba9-025000000001_0
5968aada478b 9d040c8e9daa "/sbin/tini -- /usr/…" 2 days ago Up 2 days k8s_sourcegraph_sourcegraph-0_sourcegraph_a13f6ef8-fe6f-11e8-bba9-025000000001_0
a817a6b111d0 df3645bd3d01 "/usr/bin/chronograf…" 2 days ago Up 2 days k8s_chronograf_chronograf-5c85dd45f6-qqrqw_monitoring_9ff482ef-fe6f-11e8-bba9-025000000001_0
```
Contributor guide
Research direction
Start by reproducing a POST to /write with valid line protocol, first without a token and then with an invalid token. Trace the /write authentication entry point to determine why the two cases differ; done means the no-token request returns 403 while the invalid-token request continues to return 401.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, authentication, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100