# Security Baked Into the JVM: DirtyChai scales vertically, JGDMS scales horizontally

DevFeed: [Security Baked Into the JVM: DirtyChai scales vertically, JGDMS scales horizontally](<https://devfeed.tech/articles/security-baked-into-the-jvm-dirtychai-scales-vertically-jgdms-scales-horizontally-99745.md>)

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

Author: Peter Firmstone

Published: 2026-10-25T00: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>), [Access Control](<https://devfeed.tech/topics/access-control.md>), [least privilege](<https://devfeed.tech/topics/least-privilege.md>), [Process](<https://devfeed.tech/topics/process.md>), [openjdk](<https://devfeed.tech/topics/openjdk.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [3](<https://devfeed.tech/tags/3.md>), [allowed](<https://devfeed.tech/tags/allowed.md>), [audit](<https://devfeed.tech/tags/audit.md>), [cache](<https://devfeed.tech/tags/cache.md>), [call](<https://devfeed.tech/tags/call.md>), [capacity](<https://devfeed.tech/tags/capacity.md>), [client](<https://devfeed.tech/tags/client.md>), [code](<https://devfeed.tech/tags/code.md>), [constraint](<https://devfeed.tech/tags/constraint.md>), [dirtychai](<https://devfeed.tech/tags/dirtychai.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>), [load](<https://devfeed.tech/tags/load.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [production](<https://devfeed.tech/tags/production.md>), [remote](<https://devfeed.tech/tags/remote.md>), [security](<https://devfeed.tech/tags/security.md>), [series](<https://devfeed.tech/tags/series.md>), [technical](<https://devfeed.tech/tags/technical.md>), [test](<https://devfeed.tech/tags/test.md>), [thread](<https://devfeed.tech/tags/thread.md>)

## AI overview

The article argues that DirtyChai scales within one JVM while JGDMS scales across a fleet, and describes mechanisms intended to keep the security checks practical. DirtyChai gives virtual threads the creator's immutable security context, uses value-based ProtectionDomain identity to reuse cached contexts, and runs policy checks concurrently against immutable grants; reported permission-check costs are about 1.9 µs on platform threads and 4.7 µs on virtual threads under a least-privilege policy. JGDMS adds capacity by registering stateless bytecode-analysis engines, publishes SAFE only after a configured quorum agrees, and keys verdicts by artifact digest. Replicated lookup services and leased registrations support availability; a TTL-bounded cache of signed verdicts can delay revocation during an outage but cannot upgrade a verdict. Authenticated discovery and a bootstrap proxy establish trust and obtain a SAFE verdict before clients unmarshal a full proxy.

## Source excerpt

Nobody runs a SecurityManager in production. The usual reason given is that it does not survive a load test, and every guarantee in this series was bought with a check: a constraint on each call, an audit before each load, a principal set on each thread, a digest on each grant. Part 1 declared constraints on a remote call. Part 2 vetted code before a client loaded it. Part 3 and Part 4 established who is calling and carried that chain across the wire.