Join our Newsletter — 33% off our NHI Course
Home› FAQ› Cyber Security› What are the key Tomcat Security best practices?
Cyber Security

What are the key Tomcat Security best practices?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 17, 2026 Domain: Cyber Security

Tomcat security best practices are to remove default samples, restrict management access, run with the least privilege needed, and keep TLS and patching current. Review connector exposure, strong authentication for admin functions, and application deployment permissions. Monitor logs for unauthorised configuration changes, suspicious deployment activity, and requests to administrative paths.

What Tomcat security actually means in practice

Tomcat security is mostly about reducing the number of ways an attacker, careless administrator, or overly broad deployment process can reach runtime, management, or configuration surfaces. That means hardening the server itself, tightening the deployment path, and treating webapps, connectors, and admin functions as separate trust zones rather than one flat host.

The most important distinction is between application risk and server risk. A vulnerable app can expose data, but a weak Tomcat setup can expose the whole container, its deployed applications, and sometimes the underlying host. That is why removal of sample content, reduction of exposed management functions, and separation of duties matter as much as patching.

Tomcat also inherits risk from adjacent controls such as TLS termination, OS permissions, logging, and secrets handling. A secure deployment is not only about the servlet engine version, but about what the process can read, what it can start, where it listens, and who can change its configuration files and deployment artefacts.

Which Tomcat settings and deployment choices deserve the most attention?

Start with the visible attack surface: remove default examples, documentation, and sample applications from production builds, then confirm that management and administrative paths are not publicly reachable. If access to the manager or host-manager app is required, restrict it to trusted source networks or a private admin path and pair that with strong authentication.

Next, tighten what Tomcat can do on disk and at runtime. The service account should only read and write the directories it genuinely needs, and application deployment permissions should be narrower than the permissions used by the operating system itself. If Tomcat can modify its own configuration or deploy code from a writable location that an application can influence, the server becomes much easier to subvert.

TLS and connector exposure also deserve deliberate review. Use the secure connector configuration that matches the deployment model, disable unused connectors and protocols, and avoid leaving administrative interfaces exposed on the same network segment as user traffic. For a practical hardening baseline, pair Tomcat review with CIS Benchmarks for the host and with the vendor documentation for the current Tomcat release.

How do you detect weak Tomcat hygiene before it becomes an incident?

The first indicators are usually configuration drift and unexpected deployment activity. Watch for changes to server.xml, context descriptors, web.xml, startup scripts, and any directory that holds deployed applications or expanded archives. A legitimate change process should be able to explain who changed what, when, and why.

Log review matters because Tomcat compromise often looks like ordinary administration at first. Focus on requests to /manager, /host-manager, and other administrative paths, plus repeated authentication failures, unusual upload or deploy actions, and configuration edits that occur outside approved maintenance windows. If those events appear together, treat them as a possible precursor to web shell placement or malicious redeployment.

Patch discipline and TLS hygiene should be validated continuously, not only during quarterly reviews. The operational question is whether the server is running the versions and cipher settings your organisation expects, and whether the patch cadence is fast enough to stay ahead of exposed server-side flaws. Use NIST SP 800-53 Rev 5 Security and Privacy Controls as a reference point for access control, auditability, and configuration management expectations.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

CIS Controls v8, NIST SP 800-53 Rev 5 and OWASP ASVS set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
CIS Controls v8CIS-5 — Account ManagementTomcat admin access and service accounts require tight account governance.
Recommendation — Restrict Tomcat admin and service accounts to only the access they need.
NIST SP 800-53 Rev 5AC-6 — Least PrivilegeLeast privilege is central to limiting Tomcat runtime and deployment impact.
AU-2 — Event LoggingTomcat security depends on logging administrative and deployment activity.
CM-6 — Configuration SettingsHardening Tomcat requires controlled secure settings and removal of defaults.
Recommendation — Limit Tomcat process and admin permissions to the minimum required. Log Tomcat admin actions, deployments, and configuration changes. Standardise Tomcat hardening settings and remove insecure defaults.
OWASP ASVSV13 — ConfigurationTomcat hardening is fundamentally about secure server and deployment configuration.
Recommendation — Verify Tomcat runtime and deployment configuration against a hardened baseline.

Practitioner Guidance

What to prioritise: Treat public management exposure, writable deployment paths, and over-permissive service accounts as the highest-risk conditions, because they turn a routine web server into a control-plane target.

What to verify: Confirm that the admin interfaces are not internet-facing, that only approved identities can deploy or reconfigure applications, and that log review can distinguish normal deployments from suspicious ones.

Common mistake: Teams often harden the application and forget the container. In Tomcat, weak file permissions or an exposed manager app can undermine otherwise well-built web applications.

Practitioner takeaway: A secure Tomcat deployment is one where configuration, deployment, and administration are intentionally harder to abuse than the application itself.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 17, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org