4 minutes
The Payara Monthly Catch – December 2025
As we kick off the new year, this January edition of The Monthly Catch looks back at everything that […]
Zero Trust security has moved from buzzword to necessity. The principle is simple: never trust, always verify. But implementing it? That’s where most developers hit a wall.
The good news: you don’t need custom security frameworks or vendor lock-in to build Zero Trust applications. Jakarta EE 11 and MicroProfile 6.1 provide everything you need through standardized, portable APIs.
Zero Trust rests on three pillars, each mapping directly to Jakarta EE capabilities:
Verify explicitly – Jakarta Security’s IdentityStore integrates with OAuth2/OIDC providers like Keycloak. Your application never handles passwords directly. MicroProfile JWT automatically validates tokens, checking signatures, issuers, audiences, and expiration—no custom parsing code required.
Least privilege access – Start with @RolesAllowed for coarse-grained control. Layer on custom interceptors for attribute-based decisions. A doctor might have the right role, but can they access patients outside their department? Combine both approaches for defense in depth.
Assume breach – Jakarta Interceptors enable comprehensive audit logging. Every data access gets recorded with full context: who, what, when, from where, and whether it succeeded. Bean Validation ensures malformed data never reaches your business logic.
The power comes from composing security layers. A single endpoint might look like this:
@GET
@Path("/{id}")
@RolesAllowed({"DOCTOR", "NURSE"})
@RequireAttribute(name = "department", value = "Cardiology")
@Audited(action = "VIEW_PATIENT", level = CRITICAL)
@Encrypted(requireTls = true)
public Response getPatient(@PathParam("id") String id) {
// Business logic only executes after all checks pass
}
Each annotation adds an independent security control. Authentication verifies identity. Role checks confirm broad permissions. Attribute checks enforce fine-grained rules. Audit logging captures everything. TLS enforcement protects transit. Input validation guards against injection.
Bypassing one layer doesn’t grant access—all must pass.
If you prefer to see these patterns in action, we recently hosted a webinar covering the same Zero Trust concepts with live walkthroughs and practical examples.
In the session, we explore:
The webinar complements this article by adding architectural context and implementation detail you can apply immediately.
Watch the full webinar here:
Real Zero Trust implementations need more than authentication and authorization:
Multi-factor authentication – Generate time-based OTPs with cryptographic randomness. Enforce single-use with five-minute expiration windows. For production, integrate with Twilio, AWS SNS, or authenticator apps.
Rate limiting – Sliding window algorithms prevent brute force attacks. Track attempts by both IP address and username. Different limits for different threat models: five attempts per minute by IP, ten per five minutes by user.
Session management – While JWT enables stateless auth, sessions add capabilities pure stateless approaches can’t match: forced logout, concurrent access detection, activity pattern analysis for anomaly detection.
Security events – CDI’s event system provides the backbone. Every security action fires events. Monitoring components observe asynchronously without coupling to enforcement code. Track patterns, detect anomalies, trigger alerts.
Demo code and production code differ in critical ways. The patterns shown work at scale, but infrastructure needs hardening:
Consider specialized libraries for high-throughput scenarios. Bucket4j provides production-grade rate limiting with token bucket algorithms, distributed cache support, and predictable performance.
Comprehensive security doesn’t require sacrificing developer productivity. Standard APIs mean your code stays portable across Jakarta EE runtimes. Declarative annotations make security requirements explicit and auditable. Separation of concerns prevents security logic from scattering through business code.
These patterns apply beyond healthcare examples. Any enterprise application requiring strong security can use these techniques. The APIs are standardized, the patterns are proven, and the implementations are portable.
Want the complete implementation? Download the full “Zero Trust Architecture with Jakarta EE and MicroProfile – Developer Guide” for detailed code examples, production deployment considerations, and step-by-step instructions for building secure enterprise applications.
The guide includes:
Download the Full Guide and start building production-ready Zero Trust applications today.
4 minutes
As we kick off the new year, this January edition of The Monthly Catch looks back at everything that […]
1 minute
We’re excited to introduce Scalable Enterprise Java for the Cloud, a new free eBook created through a close collaboration […]
3 minutes
When legacy systems approach end-of-life (EOL), enterprise IT teams typically face the choice of moving forward at all costs […]