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

privilege: add min TLS version for LDAP #50527

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

bb7133
Copy link
Member

@bb7133 bb7133 commented Jan 17, 2024

What problem does this PR solve?

Issue Number: ref #36036

Problem Summary:

What changed and how does it work?

TLS1.0/1.1 has security issues, remove the support of them.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

remove TLS1.0, TLS1.1 support

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue labels Jan 17, 2024
@bb7133 bb7133 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 17, 2024
Copy link

codecov bot commented Jan 17, 2024

Codecov Report

Merging #50527 (1872544) into master (9b4cf39) will decrease coverage by 16.4189%.
Report is 43 commits behind head on master.
The diff coverage is 100.0000%.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #50527         +/-   ##
=================================================
- Coverage   72.1075%   55.6886%   -16.4189%     
=================================================
  Files          1452       1567        +115     
  Lines        347481     590420     +242939     
=================================================
+ Hits         250560     328797      +78237     
- Misses        76609     238833     +162224     
- Partials      20312      22790       +2478     
Flag Coverage Δ
integration 37.1647% <0.0000%> (?)
unit 70.2505% <100.0000%> (-1.8571%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 54.0269% <ø> (-2.2860%) ⬇️
parser ∅ <ø> (∅)
br 56.6679% <ø> (+4.4747%) ⬆️

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 18, 2024
@hawkingrei hawkingrei self-requested a review January 18, 2024 01:20
@@ -123,6 +123,8 @@ func (impl *ldapAuthImpl) tryConnectLDAPThroughStartTLS(address string) (*ldap.C
err = ldapConnection.StartTLS(&tls.Config{
RootCAs: impl.caPool,
ServerName: impl.ldapServerHost,
MinVersion: tls.VersionTLS12,
Copy link
Member

Choose a reason for hiding this comment

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

Should we make it as a config such as grpc?

https://github.com/dfawley/grpc-go/blob/aa13a323eeff39203a2e20ab534d675e2360e425/credentials/tls.go#L176

GRPC makes it as a config. if you don't set it, it will use tls1.2

Copy link
Member Author

@bb7133 bb7133 Jan 22, 2024

Choose a reason for hiding this comment

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

Good point! We do have a config related to TLS version(https://docs-archive.pingcap.com/tidb/v7.2/tidb-configuration-file#tls-version), maybe we should control it using the config.

Copy link
Member

Choose a reason for hiding this comment

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

let us update this in the next PR.

@hawkingrei hawkingrei self-requested a review January 18, 2024 05:22
@bb7133 bb7133 force-pushed the bb7133/fix_min_tls branch from 7bdbda7 to f0efcba Compare January 22, 2024 18:29
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 22, 2024
@bb7133 bb7133 force-pushed the bb7133/fix_min_tls branch 3 times, most recently from 7a08d9c to 34220ed Compare January 22, 2024 19:34
@bb7133 bb7133 force-pushed the bb7133/fix_min_tls branch from 34220ed to 1872544 Compare January 22, 2024 19:45
@bb7133 bb7133 removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 23, 2024
Copy link

ti-chi-bot bot commented Jan 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawkingrei, YangKeao

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [YangKeao,hawkingrei]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 23, 2024
Copy link

ti-chi-bot bot commented Jan 23, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-01-18 01:20:36.518002451 +0000 UTC m=+405278.082300156: ☑️ agreed by hawkingrei.
  • 2024-01-23 02:25:04.738023754 +0000 UTC m=+841146.302321461: ☑️ agreed by YangKeao.

@YangKeao
Copy link
Member

/retest

@ti-chi-bot ti-chi-bot bot merged commit 90fc814 into pingcap:master Jan 23, 2024
22 checks passed
bb7133 added a commit to bb7133/tidb that referenced this pull request Jan 31, 2024
@bb7133 bb7133 deleted the bb7133/fix_min_tls branch February 2, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants