Mitigation Strategy: Druid Configuration Hardening
-
Description:
- Review Druid Configuration: Examine your Druid configuration file (e.g.,
druid.properties
,application.yml
) and identify all configurable settings. - Disable Unnecessary Druid Features: Disable Druid features not essential for your application's core functionality. Examples include:
StatFilter
andResetStatFilter
if not actively used for production monitoring.- Potentially less used SQL parser extensions if your application uses a limited SQL subset.
- Restrict Druid Monitoring Access: Secure access to Druid's monitoring pages (e.g.,
/druid/index.html
) by implementing strong authentication and authorization. Limit access to authorized administrators/developers. Configure web server or application server to protect these endpoints. - Carefully Configure
stat
andreset-stat
Interceptors: IfStatFilter
andResetStatFilter
are enabled, ensure they are configured with strict access controls. Consider disabling them in production if not actively needed. - Limit SQL Parser Capabilities (If Possible): Explore Druid's configuration options to restrict the SQL parser's capabilities if your application uses a limited subset of SQL features. This reduces the risk from complex SQL syntax vulnerabilities.
- Review Druid Configuration: Examine your Druid configuration file (e.g.,
-
List of Threats Mitigated:
- Reduced Attack Surface (Low Severity, Cumulative Impact): Disabling features reduces potential entry points.
- Information Disclosure (Medium Severity): Restricting monitoring access prevents unauthorized viewing of sensitive database/application info.
- Privilege Escalation (Low Severity): Limiting exposed information indirectly reduces potential for escalation.
-
Impact:
- Reduced Attack Surface: Low Risk Reduction - Each disabled feature contributes to a smaller attack surface.
- Information Disclosure: Medium Risk Reduction - Significantly reduces risk of unauthorized monitoring data access.
- Privilege Escalation: Low Risk Reduction - Indirectly reduces escalation risk.
-
Currently Implemented:
- Location:
ResetStatFilter
is disabled in production (druid.properties
). HTTP Basic Authentication is on/druid/*
endpoints in production (Nginx).
- Location:
-
Missing Implementation:
- Location:
StatFilter
is still enabled in all environments. SQL parser capabilities are not restricted. Role-based authorization for Druid monitoring is missing (currently only basic auth).
- Location:
Mitigation Strategy: SQL Firewall (Wall Filter) Configuration and Customization
-
Description:
- Enable Druid Wall Filter: Ensure
WallFilter
is enabled in Druid configuration (e.g., infilters
section). - Review Default Wall Filter Rules: Understand the default rules of
WallFilter
and what SQL syntax/operations are blocked. - Customize Wall Filter Rules: Tailor
WallFilter
to your application's SQL usage:- Add Custom Rules: Block specific SQL keywords, functions, or patterns not needed by your application.
- Modify Existing Rules: Adjust severity/behavior of default rules if needed.
- Whitelist Allowed SQL: Whitelist legitimate SQL syntax used by your application that might be flagged by default rules.
- Test Wall Filter Effectiveness: Test to ensure it blocks malicious SQL but allows legitimate application queries.
- Regularly Update Wall Filter Rules: Review and update rules as application evolves and new SQL injection techniques emerge.
- Enable Druid Wall Filter: Ensure
-
List of Threats Mitigated:
- SQL Injection (Medium to High Severity): Provides a secondary defense layer against SQL injection by blocking malicious SQL queries.
-
Impact:
- SQL Injection: Medium to High Risk Reduction -
WallFilter
can block many SQL injection attempts, especially when customized. Impact depends on rule comprehensiveness and attack sophistication.
- SQL Injection: Medium to High Risk Reduction -
-
Currently Implemented:
- Location: Druid
WallFilter
is enabled in global configuration (druid.properties
) for all environments with default rules.
- Location: Druid
-
Missing Implementation:
- Location: Customization of
WallFilter
rules is missing. Default rules are used without application-specific tailoring. Consider reviewing and customizing rules for enhanced protection.
- Location: Customization of
Mitigation Strategy: Druid Version Management and Patching
-
Description:
- Track Druid Releases: Monitor official Druid project website, GitHub, or mailing lists for new releases and security announcements.
- Review Release Notes: Review release notes for security fixes, vulnerability patches, and security changes.
- Plan Upgrades: Plan regular upgrades to the latest stable Druid version as part of application maintenance.
- Test Upgrades Thoroughly: Test upgrades in staging/testing before production to ensure compatibility and identify issues.
- Automate Dependency Updates (If Possible): Use dependency management tools to streamline Druid and dependency updates.
-
List of Threats Mitigated:
- Exploitation of Known Vulnerabilities (High Severity): Reduces risk of exploiting patched vulnerabilities in older Druid versions.
-
Impact:
- Exploitation of Known Vulnerabilities: High Risk Reduction - Staying up-to-date is crucial for mitigating known vulnerabilities.
-
Currently Implemented:
- Location: Druid version managed via Maven (currently
1.2.8
).
- Location: Druid version managed via Maven (currently
-
Missing Implementation:
- Location: No formal process for regularly checking for new Druid releases and planning upgrades. Dependency updates are reactive. Implement a process for regular Druid release reviews and proactive upgrade planning.