yashwanthsai.k
09/07/2026, 7:00 AMRocky
09/07/2026, 7:00 AMfe.conf or by creating a SECURITY INTEGRATION (recommended for v3.1+):
sql
CREATE SECURITY INTEGRATION ldap_migration
PROPERTIES (
"type" = "authentication_ldap_simple",
"authentication_ldap_simple_server_host" = "your_ldap_host",
"authentication_ldap_simple_server_port" = "389",
"authentication_ldap_simple_bind_base_dn" = "ou=users,dc=example,dc=com",
"authentication_ldap_simple_user_search_attr" = "uid",
"authentication_ldap_simple_bind_root_dn" = "cn=admin,dc=example,dc=com",
"authentication_ldap_simple_bind_root_pwd" = "admin_password"
);
2. Data Synchronization (The Migration Tool)
LDAP only handles users and groups. To sync the actual data (tables/metadata) between your "coupled" (Shared-nothing) clusters, you should use the official StarRocks Cross-cluster Data Migration Tool (starrocks-cluster-sync).
* How it works: It is a standalone binary that reads metadata from the source FE and orchestrates data movement between the source and target BEs.
* Recommendation: Install the tool on the target cluster's FE node or a dedicated migration server.
* Workflow:
1. Enable legacy compatibility on the target cluster: ADMIN SET FRONTEND CONFIG("enable_legacy_compatibility_for_replication" = "true");.
2. Configure the sync.yaml with your source and target FE/BE details.
3. Run the tool to start the background synchronization.
3. Which LDAP tool to choose?
* OpenLDAP: Best for high-performance, production-grade stability and extensive community support in Linux ecosystems.
* Apache Directory: Best if you prefer an all-in-one Java-based solution with a robust graphical management tool (Apache Directory Studio), which can simplify the initial setup of complex OUs (Organizational Units) for your migration.
Summary for your "DS Cluster" Migration
1. Identity: Centralize users in OpenLDAP/Apache Directory and connect both clusters to it.
2. Data: Use the StarRocks Cluster Sync Tool to replicate data from your source cluster to the target cluster.
3. Permissions: If you use Group Provider (available from v3.1), you can map LDAP groups to StarRocks roles so that permissions "follow" the users to the new cluster automatically.
References
• administration/stargo.md
• deployment/plan_cluster.md
• deployment/deployment_overview.mdyashwanthsai.k
09/07/2026, 7:19 AMRocky
09/07/2026, 7:19 AMsql
CREATE SECURITY INTEGRATION openldap_integration
PROPERTIES (
"type" = "authentication_ldap_simple",
"authentication_ldap_simple_server_host" = "10.0.0.5", -- Your OpenLDAP IP/Host
"authentication_ldap_simple_server_port" = "389",
"authentication_ldap_simple_bind_base_dn" = "ou=users,dc=example,dc=com",
"authentication_ldap_simple_user_search_attr" = "uid",
"authentication_ldap_simple_bind_root_dn" = "cn=admin,dc=example,dc=com",
"authentication_ldap_simple_bind_root_pwd" = "your_admin_password"
);
2. Map Users to OpenLDAP
Since your users are stored in OpenLDAP, you simply need to tell StarRocks to authenticate them against the LDAP service. You have two options when creating users:
* Manual Mapping (Explicit DN):
sql
CREATE USER 'alice'@'%' IDENTIFIED WITH authentication_ldap_simple AS 'uid=alice,ou=users,dc=example,dc=com';
* Automatic Search (Dynamic): If you configured bind_root_dn and user_search_attr in Step 1, StarRocks can find the DN automatically based on the username:
sql
CREATE USER 'alice'@'%' IDENTIFIED WITH authentication_ldap_simple;
3. Sync Roles via Group Provider (Recommended)
To ensure users have the same permissions on both clusters after migration without manual grant statements, use the LDAP Group Provider (v3.1+).
1. Create a Group Provider:
sql
CREATE GROUP PROVIDER ldap_groups
PROPERTIES (
"type" = "ldap",
"ldap_group_search_base" = "ou=groups,dc=example,dc=com",
"ldap_group_search_filter" = "(memberUid={uid})", -- Standard OpenLDAP filter
"ldap_group_name_attr" = "cn"
);
2. Bind Group to Role:
sql
-- Users in the 'analytics' LDAP group automatically get the 'read_only' role
CREATE ROLE read_only;
GRANT ROLE read_only TO GROUP 'analytics' IN PROVIDER ldap_groups;
4. Migration Checklist
* Consistency: Use the exact same Security Integration and Group Provider configurations on both clusters.
* Metadata: Use the StarRocks Cluster Sync Tool to migrate your tables and views.
* SSL: If your OpenLDAP requires TLS (LDAPS), set "authentication_ldap_simple_ssl_conn_allow_insecure" = "false" and provide the trust_store_path in the Security Integration properties.
References
• administration/user_privs/authentication/ldap_authentication.md
• administration/user_privs/authentication/security_integration.md
• sql-reference/sql-statements/account-management/CREATE_USER.md
References
• administration/user_privs/authentication/ldap_authentication.md
• administration/user_privs/authentication/security_integration.md
• sql-reference/sql-statements/account-management/CREATE_USER.md