Mike Chan
09/07/2026, 4:20 PMRocky
09/07/2026, 4:20 PMldap_group_filter or ldap_group_dn defined in the CREATE GROUP PROVIDER statement.
2. Member Extraction: It extracts members from the group using the attribute specified in ldap_group_member_attr (usually member for AD or memberUid for POSIX).
3. Matching: It checks if the authenticated user's DN (Distinguished Name) or username exists in that member list.
Why Nested Groups are usually not supported by default
In Microsoft Active Directory, the member attribute of a group only contains the immediate members (direct users or direct child groups). It does not automatically list users belonging to those child groups.
To support nested groups in LDAP, a system must either:
* Recursively expand members (the StarRocks documentation does not indicate that the Group Provider performs this recursion).
* Use the AD-specific OID filter 1.2.840.113556.1.4.1941 (Matching Rule In Chain). However, the ldap_group_filter in StarRocks is used to locate the group object itself, not to perform a membership check against a specific user during the search phase.
Summary
* Direct Groups: Supported. Users who are direct members of the specified LDAP/AD group will be correctly identified and mapped to StarRocks roles.
* Nested Groups: Likely not supported natively. Users in a subgroup will not appear in the member attribute of the parent group, and StarRocks will not see them as part of the parent group.
Recommendation:
If you require nested group support, you may need to:
1. Flatten your group structure in AD so users are direct members.
2. Explicitly add the child groups to the ldap_group_dn list if they are few in number.
3. Verify with the StarRocks community or maintainers on GitHub if there are plans to support recursive group resolution or the AD-specific memberOf recursive filter.
For further verification, you can refer to the official documentation on Authenticating User Groups.
References
• administration/user_privs/authentication/ldap_authentication.md
• administration/user_privs/group_provider.mdMike Chan
09/07/2026, 7:23 PMMike Chan
09/07/2026, 7:24 PMRocky
09/07/2026, 7:24 PMprincipal_field, defaults to sub) and matches it to a StarRocks user.
Group Providers for OAuth
When using OAuth, StarRocks does not currently have a dedicated "OAuth Group Provider" that extracts group information directly from JWT claims (like a groups or roles claim). Instead, you should use one of the standard Group Providers to manage user-to-group mappings:
1. LDAP Group Provider (Recommended): Even if you authenticate via OAuth, StarRocks can look up the user's groups in your LDAP/AD server. This is the most common enterprise setup.
2. File Group Provider: Useful for static mappings where you define groups and their members (usernames) in a local configuration file on the FE.
3. Unix Group Provider: Maps users based on Linux system groups.
Configuration Example
To use OAuth with an external group (e.g., an LDAP group named analysts), the workflow is:
1. Create an LDAP Group Provider:
sql
CREATE GROUP PROVIDER my_ldap_groups PROPERTIES("type"="ldap", ...);
2. Grant roles to the external group:
sql
GRANT reports_role TO EXTERNAL GROUP analysts;
3. Authentication: When a user tom logs in via OAuth, StarRocks identifies him as tom, queries the my_ldap_groups provider to see if tom belongs to analysts, and if so, grants him the reports_role for that session.
Note: Ensure that the principal_field extracted from the OAuth token matches the username/UID format expected by your chosen Group Provider.
References
• administration/user_privs/authentication/oauth2_authentication.md
• administration/user_privs/group_provider.md
• administration/user_privs/authentication/security_integration.md
References
• administration/user_privs/authentication/security_integration.md
• administration/user_privs/group_provider.mdRocky
09/07/2026, 7:24 PMiss (issuer) and aud (audience).
5. Principal Identification: StarRocks extracts a "username" from the JWT using the principal_field (default is sub). This username must match the username created in StarRocks (e.g., CREATE USER tom IDENTIFIED WITH authentication_oauth2).
Which Group Provider to Use?
Currently, StarRocks supports three types of group providers: LDAP, Unix, and File.
Crucially, StarRocks does not yet have a native "OAuth Group Provider" that extracts groups directly from JWT claims (like a groups claim in the token). Instead, you must use one of the existing providers to "bridge" the identity from the token to actual group memberships:
1. LDAP Group Provider (Recommended): Use this if your OAuth server (like Keycloak or Okta) has a corresponding LDAP/AD interface. StarRocks will take the principal_field from the JWT and look it up in LDAP to find the user's groups.
2. File Group Provider: Use this for smaller setups where you can manually maintain a mapping of OAuth usernames to groups in a flat file (e.g., admin_group:user_sub_id_1,user_sub_id_2).
3. Unix Group Provider: Use this if the users authenticated via OAuth also exist as local Unix users on the FE host.
Configuration Workflow:
1. Create the Group Provider: Define how to fetch groups (e.g., CREATE GROUP PROVIDER my_ldap ...).
2. Create the Security Integration: Define the OAuth 2.0 properties.
3. Link Them: Use ALTER SECURITY INTEGRATION to bind the group provider to your OAuth setup:
sql
ALTER SECURITY INTEGRATION my_oauth_integration SET
(
"group_provider" = "my_ldap_provider",
"permitted_groups" = "bi_users, data_admins" -- Optional login filter
);
Once linked, whenever a user logs in via OAuth, StarRocks identifies them by their JWT sub and automatically fetches their groups from the associated provider for use in authorization (e.g., in Apache Ranger).
References
• administration/user_privs/authentication/oauth2_authentication.md
• administration/user_privs/group_provider.md
• administration/user_privs/authentication/security_integration.md
References
• administration/user_privs/authentication/jwt_authentication.md
• administration/user_privs/group_provider.md
• administration/management/FE_configuration.md