Niranjan Kulkarni
04/13/2026, 5:25 PMRocky
04/13/2026, 5:26 PMsql
CREATE SECURITY INTEGRATION oauth2_integration
PROPERTIES (
"type" = "authentication_oauth2",
"auth_server_url" = "https://<your_idp>/auth",
"token_server_url" = "https://<your_idp>/token",
"client_id" = "<your_client_id>",
"client_secret" = "<your_client_secret>",
"redirect_url" = "http://<starrocks_fe_ip>:<fe_http_port>/api/oauth2",
"jwks_url" = "https://<your_idp>/certs",
"principal_field" = "preferred_username"
);
Then, create users identified with this integration:
sql
CREATE USER '<mailto:your_email@company.com|your_email@company.com>' IDENTIFIED WITH authentication_oauth2;
B. Setup in Tableau
Tableau connects to StarRocks using the StarRocks Tableau JDBC Connector.
* Driver: You must use the MySQL JDBC driver.
* Plugin: To support the OAuth 2.0 handshake (opening the browser), you should use the starrocks-jdbc-oauth2-plugin. This plugin is a wrapper that automatically launches the browser for login when Tableau initializes the connection.
C. Setup in Power BI
Power BI can connect via the official StarRocks Power BI Connector or a generic ODBC/JDBC connection.
* For OAuth 2.0, the recommended path in v3.5 is using the JDBC connection with the OAuth2 plugin mentioned above.
* Note: While StarRocks supports the protocol, Power BI's "Sign In" button (Microsoft Account) is typically reserved for AAD-native integrations. For StarRocks, you will likely use the JDBC driver's ability to trigger a system browser popup for the OAuth flow.
Important Notes:
* Version Requirement: Ensure you are on v3.5.0 or later. Earlier versions (v3.2–v3.4) support LDAP and JWT but do not have the full OAuth 2.0 Authorization Code flow for BI tools.
* Redirect URL: The redirect_url must be accessible by the user's browser and correctly point to the StarRocks FE HTTP port.
* MySQL Client 9.2+: If you are using native MySQL protocols (rather than JDBC), the client version must be 9.2 or later to support the OpenID pluggable authentication.
References
• administration/user_privs/authentication/oauth2_authentication.md
• integrations/BI_integrations/Tableau_Desktop.md