Skip to content

Cherry-pick #23661 to 7.x: Use hostname check from verify.go to handle patterns in TLS certs#23675

Merged
kvch merged 1 commit intoelastic:7.xfrom
kvch:backport_23661_7.x
Jan 26, 2021
Merged

Cherry-pick #23661 to 7.x: Use hostname check from verify.go to handle patterns in TLS certs#23675
kvch merged 1 commit intoelastic:7.xfrom
kvch:backport_23661_7.x

Conversation

@kvch
Copy link
Copy Markdown
Contributor

@kvch kvch commented Jan 26, 2021

Cherry-pick of PR #23661 to 7.x branch. Original message:

What does this PR do?

Previously, DNSNames in x509 certs with wildcards were not accepted. The function from Golang's verify.go is taken, so the check remains the same between Golang versions.

Why is it important?

Wildcards in DNSNames were not accepted. Now the are.

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.

…astic#23661)

Previously, DNSNames in x509 certs with wildcards were not accepted. The function from Golang's `verify.go` is taken, so the check remains the same between Golang versions.

(cherry picked from commit 6291419)
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 26, 2021
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/agent (Team:Agent)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 26, 2021
Copy link
Copy Markdown
Contributor

@michalpristas michalpristas left a comment

Choose a reason for hiding this comment

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

Backport looks ok

@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Build Failed

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

Expand to view the summary

Build stats

  • Build Cause: Pull request #23675 opened

    • Start Time: 2021-01-26T08:18:19.351+0000
  • Duration: 49 min 25 sec

  • Commit: 1efddd1

Test stats 🧪

Test Results
Failed 0
Passed 17304
Skipped 1373
Total 18677

Steps errors 2

Expand to view the steps failures

`x-pack/packetbeat-Lint - mage check;

mage update;`

  • Took 1 min 17 sec . View more details on here
  • Description: mage check;mage update;
Error signal
  • Took 0 min 0 sec . View more details on here
  • Description: Error 'hudson.AbortException: script returned exit code 1'

Log output

Expand to view the last 100 lines of log output

[2021-01-26T09:07:16.779Z] 24.44s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_000_activemq
[2021-01-26T09:07:16.779Z] 17.41s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_098_o365
[2021-01-26T09:07:16.779Z] 16.95s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_221_snort
[2021-01-26T09:07:16.779Z] 16.42s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_102_o365
[2021-01-26T09:07:16.779Z] 11.04s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_143_ibmmq
[2021-01-26T09:07:16.779Z] 10.99s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_289_oracle
[2021-01-26T09:07:16.779Z] 10.77s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_009_cyberark
[2021-01-26T09:07:16.779Z] 10.70s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_130_panw
[2021-01-26T09:07:16.779Z] 10.66s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_141_ibmmq
[2021-01-26T09:07:16.780Z] 10.55s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_008_netscout
[2021-01-26T09:07:16.780Z] 10.53s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_153_cisco
[2021-01-26T09:07:16.780Z] 10.52s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_165_cisco
[2021-01-26T09:07:16.780Z] 10.51s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_010_infoblox
[2021-01-26T09:07:16.780Z] 10.51s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_132_panw
[2021-01-26T09:07:16.780Z] 10.41s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_134_panw
[2021-01-26T09:07:16.780Z] 10.11s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_007_tomcat
[2021-01-26T09:07:16.780Z] 10.01s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_284_oracle
[2021-01-26T09:07:16.780Z] 9.79s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_262_f5
[2021-01-26T09:07:16.780Z] 9.77s call     x-pack/filebeat/tests/system/test_xpack_modules.py::XPackTest::test_fileset_file_240_zscaler
[2021-01-26T09:07:16.780Z] ================ 305 passed, 292 warnings in 1446.36s (0:24:06) ================
[2021-01-26T09:07:16.780Z] >> python test: Integration Testing Complete
[2021-01-26T09:07:21.451Z] Client: Docker Engine - Community
[2021-01-26T09:07:21.451Z]  Version:           20.10.2
[2021-01-26T09:07:21.451Z]  API version:       1.41
[2021-01-26T09:07:21.451Z]  Go version:        go1.13.15
[2021-01-26T09:07:21.451Z]  Git commit:        2291f61
[2021-01-26T09:07:21.451Z]  Built:             Mon Dec 28 16:17:32 2020
[2021-01-26T09:07:21.451Z]  OS/Arch:           linux/amd64
[2021-01-26T09:07:21.451Z]  Context:           default
[2021-01-26T09:07:21.451Z]  Experimental:      true
[2021-01-26T09:07:21.451Z] 
[2021-01-26T09:07:21.451Z] Server: Docker Engine - Community
[2021-01-26T09:07:21.451Z]  Engine:
[2021-01-26T09:07:21.451Z]   Version:          20.10.2
[2021-01-26T09:07:21.451Z]   API version:      1.41 (minimum version 1.12)
[2021-01-26T09:07:21.451Z]   Go version:       go1.13.15
[2021-01-26T09:07:21.451Z]   Git commit:       8891c58
[2021-01-26T09:07:21.451Z]   Built:            Mon Dec 28 16:15:09 2020
[2021-01-26T09:07:21.451Z]   OS/Arch:          linux/amd64
[2021-01-26T09:07:21.451Z]   Experimental:     false
[2021-01-26T09:07:21.451Z]  containerd:
[2021-01-26T09:07:21.451Z]   Version:          1.4.3
[2021-01-26T09:07:21.451Z]   GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
[2021-01-26T09:07:21.451Z]  runc:
[2021-01-26T09:07:21.451Z]   Version:          1.0.0-rc92
[2021-01-26T09:07:21.451Z]   GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
[2021-01-26T09:07:21.451Z]  docker-init:
[2021-01-26T09:07:21.451Z]   Version:          0.19.0
[2021-01-26T09:07:21.451Z]   GitCommit:        de40ad0
[2021-01-26T09:07:21.451Z] Unable to find image 'alpine:3.4' locally
[2021-01-26T09:07:22.020Z] 3.4: Pulling from library/alpine
[2021-01-26T09:07:22.280Z] c1e54eec4b57: Pulling fs layer
[2021-01-26T09:07:22.543Z] c1e54eec4b57: Verifying Checksum
[2021-01-26T09:07:22.543Z] c1e54eec4b57: Download complete
[2021-01-26T09:07:22.802Z] c1e54eec4b57: Pull complete
[2021-01-26T09:07:22.802Z] Digest: sha256:b733d4a32c4da6a00a84df2ca32791bb03df95400243648d8c539e7b4cce329c
[2021-01-26T09:07:22.802Z] Status: Downloaded newer image for alpine:3.4
[2021-01-26T09:07:25.668Z] + python .ci/scripts/pre_archive_test.py
[2021-01-26T09:07:28.210Z] Copy ./x-pack/filebeat/build into build/x-pack/filebeat/build
[2021-01-26T09:07:28.240Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-23675/src/github.com/elastic/beats/build
[2021-01-26T09:07:28.598Z] + rm -rf ve
[2021-01-26T09:07:28.598Z] + find . -type d -name vendor -exec rm -r {} ;
[2021-01-26T09:07:28.634Z] Recording test results
[2021-01-26T09:07:29.924Z] [Checks API] No suitable checks publisher found.
[2021-01-26T09:07:30.424Z] Client: Docker Engine - Community
[2021-01-26T09:07:30.424Z]  Version:           20.10.2
[2021-01-26T09:07:30.424Z]  API version:       1.41
[2021-01-26T09:07:30.424Z]  Go version:        go1.13.15
[2021-01-26T09:07:30.424Z]  Git commit:        2291f61
[2021-01-26T09:07:30.424Z]  Built:             Mon Dec 28 16:17:32 2020
[2021-01-26T09:07:30.424Z]  OS/Arch:           linux/amd64
[2021-01-26T09:07:30.424Z]  Context:           default
[2021-01-26T09:07:30.424Z]  Experimental:      true
[2021-01-26T09:07:30.424Z] 
[2021-01-26T09:07:30.424Z] Server: Docker Engine - Community
[2021-01-26T09:07:30.424Z]  Engine:
[2021-01-26T09:07:30.424Z]   Version:          20.10.2
[2021-01-26T09:07:30.424Z]   API version:      1.41 (minimum version 1.12)
[2021-01-26T09:07:30.424Z]   Go version:       go1.13.15
[2021-01-26T09:07:30.424Z]   Git commit:       8891c58
[2021-01-26T09:07:30.424Z]   Built:            Mon Dec 28 16:15:09 2020
[2021-01-26T09:07:30.424Z]   OS/Arch:          linux/amd64
[2021-01-26T09:07:30.424Z]   Experimental:     false
[2021-01-26T09:07:30.424Z]  containerd:
[2021-01-26T09:07:30.424Z]   Version:          1.4.3
[2021-01-26T09:07:30.424Z]   GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
[2021-01-26T09:07:30.424Z]  runc:
[2021-01-26T09:07:30.424Z]   Version:          1.0.0-rc92
[2021-01-26T09:07:30.424Z]   GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
[2021-01-26T09:07:30.424Z]  docker-init:
[2021-01-26T09:07:30.424Z]   Version:          0.19.0
[2021-01-26T09:07:30.424Z]   GitCommit:        de40ad0
[2021-01-26T09:07:42.612Z] Stage "Packaging" skipped due to earlier failure(s)
[2021-01-26T09:07:42.731Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-23675/src/github.com/elastic/beats
[2021-01-26T09:07:43.155Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-23675
[2021-01-26T09:07:43.282Z] [INFO] getVaultSecret: Getting secrets
[2021-01-26T09:07:43.376Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-01-26T09:07:44.258Z] + chmod 755 generate-build-data.sh
[2021-01-26T09:07:44.258Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-23675/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-23675/runs/1 FAILURE 2964633
[2021-01-26T09:07:44.809Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-23675/runs/1/steps/?limit=10000 -o steps-info.json

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 17304
Skipped 1373
Total 18677

@kvch kvch merged commit 1bee345 into elastic:7.x Jan 26, 2021
@zube zube bot removed the [zube]: Done label Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Team:Elastic-Agent Label for the Agent team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants