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

[core] Add HTTPS support #1055

Merged
merged 2 commits into from Oct 2, 2019
Merged

[core] Add HTTPS support #1055

merged 2 commits into from Oct 2, 2019

Conversation

raylu
Copy link
Contributor

@raylu raylu commented Sep 12, 2019

We have collectors deployed behind an AWS NLB that does TLS termination so we'd like HTTPS support.

This will have conflicts with #1054.

@raylu raylu requested a review from a team as a code owner September 12, 2019 23:54
@raylu raylu force-pushed the https branch 3 times, most recently from f59d3b9 to 7f02d68 Compare September 13, 2019 00:31
jd
jd previously approved these changes Sep 13, 2019
Copy link
Contributor

@jd jd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brettlangdon now you wish we were using URL ;)

@raylu
Copy link
Contributor Author

raylu commented Sep 13, 2019

rebasing on top of what got merged this morning (LMK if this is not necessary)

EDIT: oof, didn't realize that would un-approve my PR. I should probably just leave this alone...

@raylu
Copy link
Contributor Author

raylu commented Sep 16, 2019

(@berkowitzi fixed passing the agent_https config through so we could actually turn it on)

api = API('localhost', 8126, '/path/to/uds')
assert str(api) == '/path/to/uds'
assert str(api) == 'http:///path/to/uds'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be unix:///path/to/uds?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that was my initial plan, but then how do you signify HTTPS + UDS? should it just not be allowed?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https means HTTP over TLS. AFAIK, TLS runs normally on TCP.
So I don't think we should care about Unix Domain Socket + TLS.

By the way, unix:///path/to/uds is not accurate. In fact, we speak HTTP over Unix Domain Socket. So we should probably write http+unix or something.
unix:///path/to/uds is an abbreviated notation.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just want to make sure that this PR is consistent with #1054.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. I went with unix:// for both HTTP and HTTPS

Copy link
Contributor

@jd jd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good except the weird comment change :)

@@ -193,8 +193,7 @@ def put(self, item):
Queue.put(self, item, block=False)
except Full:
# If the queue is full, replace a random item. We need to make sure
# the queue is not emptied was emptied in the meantime, so we lock
# check qsize value.
# the queue was not in the meantime, so we lock and check qsize.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undid this change

Copy link
Member

@brettlangdon brettlangdon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@brettlangdon
Copy link
Member

I merged down from master so we'll wait on tests to pass, and for @jd to give one last look through.

@brettlangdon brettlangdon merged commit 65d36d8 into DataDog:master Oct 2, 2019
@majorgreys majorgreys added this to the 0.30.0 milestone Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants