-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Fleet] Use 9243 as default port for cloud URLs #98670
Conversation
Pinging @elastic/fleet (Team:Fleet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick turnaround!
@@ -5,6 +5,8 @@ | |||
* 2.0. | |||
*/ | |||
|
|||
const CLOUD_DEFAULT_PORT = '9243'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of scope for this PR, but this kind of information seems like it should be exported from cloud
plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes actually the whole decode_cloud_id
service should probably exported by the cloud plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (will just mention that when it was discussed yesterday in a similar context, @simitt was in favor of hiding the port if it was ==443
)
Yes we hide it. |
Ugh so I did some digging and the old beats code treats the default port as 443 :/ https://github.com/elastic/beats/blob/23e4403ae093fcc8f7905345cad2c7ad256976d8/libbeat/cloudid/cloudid.go#L34 @nchaulet did you say you had seen a case where the port wasn't present and it should have been 9243? (eg an ECE instance) I'm digging up an ECE instance now to check |
Looks like there is one case here #98356 not sure what the cloud ID was |
I am headed out the door, but wanted to add some background. The original PR #65366 said
Which seems to use 443 (but I'm not able to really process & be sure right now) Happy to see this ship if it's what we want now. Just linking for more context |
I found this in an internal knowledgebase:
|
I found a better specification of what is going on:
So there are two different "defaults" here:
Therefore I believe the code as it was before this PR is correct. 1000 apologies for the confusion |
Probably no need for that |
Summary
Resolve #98356
In Fleet we are populating the ES hosts and Fleet server hosts used by the agent to communicate with ES or Fleet Server from the cloud ID.
If there is no default port in the cloud ID we were defaulting to
443
but after some discussions looks like the default port both for ECE and ESS is9243
. That PR makes the change.