# Security Baked Into the JVM: two Subjects, one call

DevFeed: [Security Baked Into the JVM: two Subjects, one call](<https://devfeed.tech/articles/security-baked-into-the-jvm-two-subjects-one-call-18930.md>)

Original publisher: [Read original article](<https://blog.frankel.ch/security-baked-into-jvm/3/>)

Author: Peter Firmstone

Published: 2026-08-09T00:00:00Z

Content type: article

Language: en

Sources: [Nicolas Fränkel](<https://devfeed.tech/sources/nicolas-frankel.md>)

Topics: [Security](<https://devfeed.tech/topics/security.md>), [Next-Gen Identity Security](<https://devfeed.tech/topics/next-gen-identity-security.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [bearer](<https://devfeed.tech/tags/bearer.md>), [call](<https://devfeed.tech/tags/call.md>), [certificates](<https://devfeed.tech/tags/certificates.md>), [client](<https://devfeed.tech/tags/client.md>), [code](<https://devfeed.tech/tags/code.md>), [constraint](<https://devfeed.tech/tags/constraint.md>), [credentials](<https://devfeed.tech/tags/credentials.md>), [dirtychai](<https://devfeed.tech/tags/dirtychai.md>), [dispatch](<https://devfeed.tech/tags/dispatch.md>), [filter](<https://devfeed.tech/tags/filter.md>), [fleet](<https://devfeed.tech/tags/fleet.md>), [frameworks](<https://devfeed.tech/tags/frameworks.md>), [identity](<https://devfeed.tech/tags/identity.md>), [java](<https://devfeed.tech/tags/java.md>), [jgdms](<https://devfeed.tech/tags/jgdms.md>), [jini](<https://devfeed.tech/tags/jini.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [pipeline](<https://devfeed.tech/tags/pipeline.md>), [security](<https://devfeed.tech/tags/security.md>), [technical](<https://devfeed.tech/tags/technical.md>), [thread](<https://devfeed.tech/tags/thread.md>), [token](<https://devfeed.tech/tags/token.md>), [verify](<https://devfeed.tech/tags/verify.md>)

## AI overview

DirtyChai separates process workload identity from human user identity. A JVM-wide process Subject carries a SPIFFE SVID and is available across requests; a per-request user Subject carries identities established through JWT/OIDC, with Kerberos retained for legacy deployments. The excerpt says SPIRE issues short-lived X.509 SVIDs through a local agent, avoiding long-lived keystores, and that DirtyChai is replacing legacy JAAS subject handling with explicit identity and privilege boundaries. It also warns that JAAS doAsPrivileged can shed the enclosing user identity as a side effect. The supplied excerpt ends during the SPIRE component description, so later implementation details are not available.

## Source excerpt

The constraint system stops a bad call before it leaves the JVM. The Safe Codebase Audit Pipeline stops bad code before a client ever loads it. What remains is identity: who is calling, and can you verify it? Most frameworks answer with a token check at the door. A filter validates a bearer token, sets a thread-local variable, and hopes that nothing downstream forgets to look at it. DirtyChai answers differently.