You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That double request is pretty clearly an HTTP→HTTPS redirect. Wireshark confirms as much. Oddly, whatever the default for host is doesn't do this, but I didn't realize until much later that setting host isn't required, see the Additional Context section. Initially, I was under the impression that configuration of what DD tenant I was was required.
Expected behavior
TLS is enabled by default … and ideally only switch off very explicitly. Certainly overriding things like hostname don't then also remove TLS, in addition…
Environment and Versions (please complete the following information):
A clear and precise description of your setup:
version for this project in use: 2.19.0
services, libraries, languages and tools list and versions: the minimal example above
Additional context
I ended up setting host almost by accident. Initially, I was getting 403 Forbidden from the API, and wasn't sure why; I was using the "Getting Started" example, and setting an API key. It turns out DD requires both an API key and an "app" key (the README does note this, but I missed that in my first pass), which is somewhat unusual. So, AFAICT, I wasn't authenticated, but since the wrong HTTP status was getting returned, that never clicked, and I tried other things (such as configuring my host) prior to returning to the what-if of "perhaps it is, indeed, authn?"
I'm not clear on why one can construct a DD client without (full) credentials without error in the first place.
The text was updated successfully, but these errors were encountered:
I think the confusion is that host is supposed to be a base path. Maybe we can enforce that, as the name is fairly confusing, but you don't really have any reason to use this and not the regular server name for API usage?
This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.
If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of this project.
Comment that the issue is still reproducible and include updated details requested in the issue template.
Describe the bug
Setting
host
in theConfiguration
ctor causes credentials to be sent in the clear.To Reproduce
Take this example:
You can tell from the debug output that we're not doing TLS:
That double request is pretty clearly an HTTP→HTTPS redirect. Wireshark confirms as much. Oddly, whatever the default for
host
is doesn't do this, but I didn't realize until much later that settinghost
isn't required, see the Additional Context section. Initially, I was under the impression that configuration of what DD tenant I was was required.Expected behavior
TLS is enabled by default … and ideally only switch off very explicitly. Certainly overriding things like hostname don't then also remove TLS, in addition…
Environment and Versions (please complete the following information):
A clear and precise description of your setup:
Additional context
I ended up setting
host
almost by accident. Initially, I was getting 403 Forbidden from the API, and wasn't sure why; I was using the "Getting Started" example, and setting an API key. It turns out DD requires both an API key and an "app" key (the README does note this, but I missed that in my first pass), which is somewhat unusual. So, AFAICT, I wasn't authenticated, but since the wrong HTTP status was getting returned, that never clicked, and I tried other things (such as configuring my host) prior to returning to the what-if of "perhaps it is, indeed, authn?"I'm not clear on why one can construct a DD client without (full) credentials without error in the first place.
The text was updated successfully, but these errors were encountered: