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

Fix issue where --insecure didn't propogate to Fleet Server ES connection #27969

Merged
merged 2 commits into from
Sep 16, 2021

Conversation

blakerouse
Copy link
Contributor

@blakerouse blakerouse commented Sep 16, 2021

What does this PR do?

Propogates the --insecure flag to the Fleet Server process, so it can communicate with elasticsearch insecurely.

Why is it important?

Previously it was not possible to instruct Fleet Server to communicate insecurely with elasticsearch. Now if you are bootstrapping a Fleet Server and using --insecure it will also make communication with elasticsearch insecure.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

@blakerouse blakerouse added Team:Elastic-Agent Label for the Agent team backport-v7.14.0 Automated backport with mergify backport-v7.15.0 Automated backport with mergify backport-v7.16.0 Automated backport with mergify labels Sep 16, 2021
@blakerouse blakerouse self-assigned this Sep 16, 2021
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Sep 16, 2021
@blakerouse blakerouse marked this pull request as ready for review September 16, 2021 12:32
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 16, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-09-16T12:32:46.828+0000

  • Duration: 77 min 6 sec

  • Commit: b3168b9

Test stats 🧪

Test Results
Failed 0
Passed 7044
Skipped 16
Total 7060

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 7044
Skipped 16
Total 7060

Copy link
Contributor

@michel-laterman michel-laterman left a comment

Choose a reason for hiding this comment

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

lgtm

@blakerouse blakerouse merged commit cbbe8c2 into elastic:master Sep 16, 2021
@blakerouse blakerouse deleted the agent-fs-insecure branch September 16, 2021 17:49
mergify bot pushed a commit that referenced this pull request Sep 16, 2021
…tion (#27969)

* Fix issue where --insecure didn't propogate to Fleet Server ES connection.

* Add changelog.

(cherry picked from commit cbbe8c2)
mergify bot pushed a commit that referenced this pull request Sep 16, 2021
…tion (#27969)

* Fix issue where --insecure didn't propogate to Fleet Server ES connection.

* Add changelog.

(cherry picked from commit cbbe8c2)
mergify bot pushed a commit that referenced this pull request Sep 16, 2021
…tion (#27969)

* Fix issue where --insecure didn't propogate to Fleet Server ES connection.

* Add changelog.

(cherry picked from commit cbbe8c2)
blakerouse added a commit that referenced this pull request Sep 16, 2021
…tion (#27969) (#27977)

* Fix issue where --insecure didn't propogate to Fleet Server ES connection.

* Add changelog.

(cherry picked from commit cbbe8c2)

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
blakerouse added a commit that referenced this pull request Sep 16, 2021
…tion (#27969) (#27979)

* Fix issue where --insecure didn't propogate to Fleet Server ES connection.

* Add changelog.

(cherry picked from commit cbbe8c2)

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
blakerouse added a commit that referenced this pull request Sep 16, 2021
…tion (#27969) (#27978)

* Fix issue where --insecure didn't propogate to Fleet Server ES connection.

* Add changelog.

(cherry picked from commit cbbe8c2)

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
michalpristas added a commit to michalpristas/beats that referenced this pull request Sep 20, 2021
michalpristas added a commit that referenced this pull request Sep 20, 2021
mergify bot pushed a commit that referenced this pull request Sep 20, 2021
…S connection (#27969)" (#27997)

This reverts commit cbbe8c2.

(cherry picked from commit 88b29b5)
mergify bot pushed a commit that referenced this pull request Sep 20, 2021
…S connection (#27969)" (#27997)

This reverts commit cbbe8c2.

(cherry picked from commit 88b29b5)
mergify bot pushed a commit that referenced this pull request Sep 20, 2021
…S connection (#27969)" (#27997)

This reverts commit cbbe8c2.

(cherry picked from commit 88b29b5)
v1v added a commit to v1v/beats that referenced this pull request Sep 20, 2021
* upstream/master: (658 commits)
  Add complete k8s metadata through composable provider (elastic#27691)
  Revert "Fix issue where --insecure didn't propogate to Fleet Server ES connection (elastic#27969)" (elastic#27997)
  Remove deprecated kafka fields (elastic#27938)
  [Filebeat] Add Base64 encoded HMAC & UUID template functions to httpjson input (elastic#27873)
  Improve httpjson template function join (elastic#27996)
  Remove kubernetes.container.image alias (elastic#27898)
  [Elastic Agent] Golden files for program tests (elastic#27862)
  [Elastic Agent] Disable modules.d in metricbeat (elastic#27860)
  libbeat/common/seccomp: provide default policy for linux arm64 (elastic#27955)
  Fix logger statement in aws-s3 input (elastic#27982)
  Fix wrong merge (elastic#27976)
  Fix issue where --insecure didn't propogate to Fleet Server ES connection (elastic#27969)
  Forward-port 7.14.2 changelog to master (elastic#27975)
  [Filebeat] Removing duplicate modules (aliases) Observability (elastic#27919)
  Fix path in vagrant windows script (elastic#27966)
  [Filebeat] Removing duplicate modules (aliases) and Cyberark (elastic#27915)
  No changelog for 8.0.0-alpha2 (elastic#27961)
  Add write access to 'url.value' from 'request.transforms'. (elastic#27937)
  Docker: remove deprecated fields (elastic#27933)
  Filebeat: Make all filesets disabled in default configuration (elastic#27762)
  ...
michalpristas added a commit that referenced this pull request Sep 21, 2021
…S connection (#27969)" (#27997) (#28004)

This reverts commit cbbe8c2.

(cherry picked from commit 88b29b5)

Co-authored-by: Michal Pristas <michal.pristas@gmail.com>
michalpristas added a commit that referenced this pull request Sep 21, 2021
…S connection (#27969)" (#27997) (#28003)

This reverts commit cbbe8c2.

(cherry picked from commit 88b29b5)

Co-authored-by: Michal Pristas <michal.pristas@gmail.com>
michalpristas added a commit that referenced this pull request Sep 21, 2021
…S connection (#27969)" (#27997) (#28002)

This reverts commit cbbe8c2.

(cherry picked from commit 88b29b5)

Co-authored-by: Michal Pristas <michal.pristas@gmail.com>
Icedroid pushed a commit to Icedroid/beats that referenced this pull request Nov 1, 2021
…tion (elastic#27969)

* Fix issue where --insecure didn't propogate to Fleet Server ES connection.

* Add changelog.
Icedroid pushed a commit to Icedroid/beats that referenced this pull request Nov 1, 2021
@dikshachauhan-qasource
Copy link

Hi Eric

We have regressed this issue on 7.16 BC3 on Stack Environment in lieu of #27956 under merged PR at #27969. Following is our observation:

Pre-conditions:

  • Kibana is running and up.
  • CA certs are available.

Steps followed:

  1. Downloaded Elastic agent and extracted it.
  2. To make CA certs as expired, we manually updated machines time and date setting to Future date.
  3. We ran the Fleet server install command with CA certs.

Observations: Agent installed successfully.

After waiting for few mins and resetting the time to current zone, we navigated back to Kibana and Observed agent was available with Last activity value as " in 2 years".

Further, No logs were available on UI side.

Please find further details in below screenshots:

  1. Updated machine time to expire ca cert
    1

  2. On access Kibana agent showed yp last activity as "in 2years"
    2

  3. Integrations under agent policy:
    3

  4. No Logs recorded on UI
    4

  5. Data streams generated:
    5

  6. Discover tab records:
    6

Build details:
BUILD 45816
COMMIT acaa761f4ce46680fd7cfbeba03a652c72dc786b
https://staging.elastic.co/7.16.0-8dc8b6a1/summary-7.16.0.html

Logs attached for reference:
logs-cacerts.zip

Kindly let us know if we are missing anything.

Thanks
QAS

@EricDavisX
Copy link
Contributor

I spoke with Diksha and Michal and we are synced up on the best way to test this, the above isn't quite right. We'll post back and expect (and hope) the issue remains fixed as intended, and we can document steps to validate it moving forwards.

leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…tion (elastic#27969) (elastic#27978)

* Fix issue where --insecure didn't propogate to Fleet Server ES connection.

* Add changelog.

(cherry picked from commit 576be96)

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…S connection (elastic#27969)" (elastic#27997) (elastic#28003)

This reverts commit 576be96.

(cherry picked from commit b5ffc57)

Co-authored-by: Michal Pristas <michal.pristas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.14.0 Automated backport with mergify backport-v7.15.0 Automated backport with mergify backport-v7.16.0 Automated backport with mergify Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Elastic-agent] --insecure flag doesn't work as expected
5 participants