influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
29.04k stars 3.56k forks source link

POST to /write with no token comes back as 401 instead of 403 #11622

Open kevinhogan111 opened 5 years ago

kevinhogan111 commented 5 years ago

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
stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.

stephanie-engel commented 4 years ago

This is still an issue.