Skip to content

Add mTLS support - #18

Merged
sspaink merged 4 commits into
open-policy-agent:mainfrom
sspaink:mtls
Jun 16, 2026
Merged

Add mTLS support#18
sspaink merged 4 commits into
open-policy-agent:mainfrom
sspaink:mtls

Conversation

@sspaink

@sspaink sspaink commented May 15, 2026

Copy link
Copy Markdown
Member

resolve: #2

Adds mTLS support for service-to-server traffic (bundle downloads, decision-log uploads, status reports, discovery). Mirrors Go-OPA's services.<name>.tls and services.<name>.credentials.client_tls blocks so existing OPA configs port over.

Additional changes:

  • Bundle polling now uses jittered [min, max] delay (matching Go-OPA) instead of the prior scheduleAtFixedRate(maxDelay).

  • BundlePlugin.validate now flags references to unknown services up front instead of only logging on first download.

    Config additions

services:
  acmecorp:
    url: https://policy.example.com
    tls:
      ca_cert: /etc/ssl/corp-ca.pem
      system_ca_required: true        # also trust JVM defaults
    credentials:
      client_tls:
        cert: /etc/ssl/client.pem
        private_key: /etc/ssl/client-key.pem    # PKCS#8 only
        private_key_passphrase: "..."           # optional
        cert_reread_interval_seconds: 3600      # optional, for
rotation
    headers:                          # optional, applied via
setHeader
      X-Caller-Identity: "..."

Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>

@johanfylling johanfylling left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Mostly comments and nits; but it would be nice to not pull in the bouncycastle dependency.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread opa-services/build.gradle.kts Outdated
Comment thread opa-services/README.md Outdated
Comment thread opa-services/README.md Outdated
Comment thread opa-services/src/test/java/io/github/open_policy_agent/opa/config/ConfigTest.java Outdated
sspaink added 3 commits June 15, 2026 17:46
# Conflicts:
#	opa-services/build.gradle.kts
Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>
Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>
@sspaink
sspaink merged commit f49d515 into open-policy-agent:main Jun 16, 2026
10 checks passed
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.

Add mTLS support

2 participants