The Simplest Way to Make Jetty and Teamcity Work Like They Should
Jetty and TeamCity work together to build, test, and run Java web apps. TeamCity compiles your code and sends the finished package to your Jetty server. This workflow lets teams ship updates fast without manual file copies. Your build server handles the heavy work while your web server runs the app. When you set up both tools well, every code push triggers a clean test. Passing builds then move straight to your live or staging servers. How jetty and teamcity share identity and data TeamCity
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Jetty and TeamCity work together to build, test, and run Java web apps. TeamCity compiles your code and sends the finished package to your Jetty server.
This workflow lets teams ship updates fast without manual file copies. Your build server handles the heavy work while your web server runs the app. When you set up both tools well, every code push triggers a clean test. Passing builds then move straight to your live or staging servers.
How jetty and teamcity share identity and data
TeamCity uses build agents to compile code and run tests. Once a build passes, the agent needs to talk to your Jetty server. This step requires a clear trust path between the build agent and the host.
In most setups, the build agent logs in using an SSH key or token. It copies the new web archive file into the Jetty app folder. Jetty watches that folder or gets a signal to load the new version. Data flows in one direction from the build agent to the web server.
Jetty also needs its own identity to read databases or call other services. TeamCity should never pass raw database passwords inside the build file itself. Instead, the build server should only have rights to drop the file and restart the app. The web server keeps its own separate role for runtime data reads.
Common failures with shared accounts and wide permissions
Many teams take shortcuts when they first wire up their build pipelines. They give the TeamCity agent root rights on the Jetty host machine. This mistake means a broken build script can wipe out the whole server. If an attacker steals that build key, they own your live web host.
Shared service accounts create another big blind spot for your team. When ten pipelines use one login key, your logs show the same user. You cannot tell which project or person changed a live setting. Audits fail when you cannot tie a server change to a real person.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
To fix this, give each build agent a tight, scoped role on the host. Create a dedicated system user on the Jetty machine just for file drops. Lock that user to the single web app folder it needs to update. Block the build agent from reading private server logs or other app folders.
You should also lock down the network path between the two tools. Only allow traffic from known build agent IP addresses to reach your deploy port. Rotate your deploy keys often so old credentials do not sit around for months.
Keeping live server checks safe and clear
Even with good build pipelines, engineers still need to check live Jetty hosts. A deploy might fail, or an app might run out of memory under load. When this happens, a developer often logs into the host to read logs. They might also run a quick check on the database behind the app.
Giving every developer a permanent SSH key to the Jetty host breaks your safety model. People leave keys on laptops and forget to remove old test files. You lose track of who ran which command during a late-night fix. Teams need a safer way to inspect live apps and data during an incident.
A strong setup separates automated build paths from human debug sessions. Build agents follow a strict, narrow path to drop files. Humans log in with their own work identity and get temporary rights. When sensitive data like emails or card numbers appears in results, masking rewrites matched fields in results.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.
First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
How should TeamCity push files to a Jetty server?
TeamCity agents should use a scoped SSH user or a dedicated deploy API. That user should only have write rights to the specific Jetty app directory.
Should Jetty and TeamCity run on the same machine?
No, keep them on separate hosts in production. Build jobs use heavy CPU and memory, which will slow down your live web app.
How do we handle app secrets during a TeamCity build?
Do not bake database keys or API tokens into your build files. Store secrets on the target host or in a secret store that Jetty reads at startup.
Related guides
In this post