zhenyue-xu opened a new pull request, #9667:
URL: https://github.com/apache/seatunnel/pull/9667

   
   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code 
changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
     - Make sure that the pull request corresponds to a [GITHUB 
issue](https://github.com/apache/seatunnel/issues).
     - Name the pull request in the form "[Feature] [component] Title of the 
pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix 
typo in README.md doc`.
   -->
   
   ### Purpose of this pull request
   
   This pull request enhances the Doris connector with three key improvements:
   
   1. **Custom Driver Support**: Added the ability to specify a custom JDBC 
driver class through the `driver` configuration option, providing users with 
flexibility to choose their preferred MySQL driver version.
   
   2. **Automatic Driver Detection**: Implemented intelligent driver 
enumeration and fallback mechanism that automatically tries available JDBC 
drivers when the specified driver fails, improving connection reliability and 
user experience.
   
   3. **LDAP Authentication Support**: Added comprehensive LDAP authentication 
support for enterprise environments through the `enableLdap` configuration 
option. This is particularly important for large enterprises that require 
centralized authentication management and enhanced security compliance.
   
   The LDAP support includes:
   - Custom authentication plugin for MySQL 5.x drivers (`MySQL5LdapPlugin`)
   - Automatic configuration of required LDAP authentication properties
   - Support for both MySQL 5.x and 8.x drivers (with appropriate warnings for 
MySQL 8.x limitations)
   
   These enhancements address the growing need for enterprise-grade 
authentication in production environments where LDAP integration is mandatory 
for security and compliance requirements.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, this PR introduces the following user-facing changes:
   
   **New Configuration Options:**
   - `driver`: Optional string parameter to specify the JDBC driver class name
   - `enableLdap`: Optional boolean parameter (default: false) to enable LDAP 
authentication
   
   **Enhanced Connection Behavior:**
   - The connector now automatically attempts to use available JDBC drivers if 
the specified driver fails
   - When LDAP is enabled, the connector automatically configures the necessary 
authentication plugins for MySQL drivers
   
   **Documentation Updates:**
   - Added documentation for the new configuration options in both English and 
Chinese versions
   - Included notes about MySQL driver compatibility with LDAP authentication
   
   **Backward Compatibility:**
   - All existing configurations continue to work without changes
   
   ### How was this patch tested?
   
   This patch was tested through multiple approaches:
   
   1. **Unit Tests**: Added comprehensive test cases in 
`DorisCatalogConnectionTest.java` covering:
      - Basic driver connection functionality
      - Driver fallback mechanism when specified driver fails
      - LDAP authentication connection scenarios
   
   2. **Integration Testing**: Tested against real Doris clusters with:
      - Standard username/password authentication
      - LDAP-enabled environments using both MySQL 5.x and 8.x drivers
      - Various driver configurations and fallback scenarios
   
   ### Check list
   
   * [x] If any new Jar binary package adding in your PR, please add License 
Notice according
     [New License 
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [x] If necessary, please update the documentation to describe the new 
feature. https://github.com/apache/seatunnel/tree/dev/docs
   * [ ] If you are contributing the connector code, please check that the 
following files are updated:
     1. Update 
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties)
 and add new connector information in it
     2. Update the pom file of 
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
     3. Add ci label in 
[label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
     4. Add e2e testcase in 
[seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
     5. Update connector 
[plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
   
   Note: This is an enhancement to an existing connector, so steps 1-5 in the 
connector checklist are not applicable as no new connector is being added.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to