Skip to content

Experiment: native (no-JVM) openvox-server on CRuby - #513

Draft
slauger wants to merge 3 commits into
developfrom
experiment/native-cruby-server
Draft

slauger wants to merge 3 commits into
developfrom
experiment/native-cruby-server

Conversation

@slauger

@slauger slauger commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Experimental, additional server image that runs the server role (catalog compilation) on plain CRuby instead of the JRuby pool + JVM.

Shape:

agent --mTLS--> Go edge (auth) --localhost--> Puma cluster --> CRuby + openvox gem
  • cmd/edge (openvox-edge): small Go reverse proxy that terminates mTLS and does authorization from a JSON ruleset (EDGE_AUTH_RULES) modeled on the operators builtinAuthRules. Supports the dynamic allow "$1"catalog rule (client CN must equal the certname), literal certnames,, allow_unauthenticated, and pp_cli_auth/pp_cert-extension matching. Forwards the verified identity to the backend viaX-Client-*` headers.
  • images/openvox-server-native: Go edge + a Puma/CRuby compile backend (backend/config.ru drives the same node=plain / catalog=compiler indirections as openvox-servers compiler.rb). OpenVox is installed as the openvoxgem into a self-containedGEM_HOME(no RPM); the Ruby interpreter comes from the ubiruby:3.3module (Ruby 3.3.12). Keeps the rootless/OpenShift conventions and:8140` mTLS surface of the JVM image.

Scope / intent:

  • Additional, swappable image for server-only pods. The CA role stays on the JVM puppetserver image - the CA is left as-is.
  • No RPM install of OpenVox (gem-based, tarball-equivalent for the Ruby side).
  • Auth is config-driven, so the operator could later render auth-rules.json from the same authorization model it already renders as HOCON auth.conf.

Verified locally (standalone docker run, self-bootstrapped PoC PKI):

  • matching client CN -> 200 + a real catalog compiled by CRuby (openvox 8.28.1)
  • wrong CN -> 403 (the dynamic allow "$1" rule)
  • no client cert -> 401
  • benign TLS handshake noise (probe EOF / reset) filtered; real bad/unknown-cert errors still logged

Known gaps vs. the JVM server: CA endpoints delegated to the JVM CA, only a subset of the v3 API (catalog/node/file/report/environments/status), no PuppetDB termini wiring, and CRuby copy-on-write sharing erodes under GC at scale. Draft / proof-of-concept - opening for discussion, not for merge yet.

slauger added 3 commits August 5, 2026 23:47
openvox-edge is a small Go reverse proxy that terminates mTLS and enforces
auth.conf-style authorization from a JSON ruleset (EDGE_AUTH_RULES) modeled on
the operator's builtinAuthRules. It supports the dynamic allow "$1" catalog
rule (client CN must equal the certname capture), literal certnames, "*",
allow_unauthenticated, and pp_cli_auth/pp_* certificate-extension matching, then
forwards the verified identity to a localhost backend via X-Client-* headers.

This is the authorization front for the experimental non-JVM native server.
openvox-server-native pairs the openvox-edge Go proxy with a Puma/CRuby compile
backend (backend/config.ru drives the same node=plain / catalog=compiler
indirections as openvox-server's compiler.rb) to serve the SERVER role without
JRuby or the JVM. OpenVox is installed as the openvox gem into a self-contained
GEM_HOME (no RPM), the Ruby interpreter comes from the ubi ruby:3.3 module, and
the image keeps the rootless/OpenShift conventions and :8140 mTLS surface of the
JVM server. The CA role stays on the JVM puppetserver image, so this can be
swapped in for server-only pods. Ships a demo control repo and self-bootstraps a
PoC PKI when no operator certificate is mounted.
Suppress http.Server "TLS handshake error ... EOF / connection reset / broken
pipe" lines from clients that close the socket before completing the handshake
(health probes, port scans, load-balancer checks). Real mTLS failures -- bad or
unknown client certificates -- are still logged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant