Skip to content

Conversation

araujof
Copy link
Member

@araujof araujof commented Sep 30, 2025

Description

This PR adds support for configuring the OPA policy file path and related settings via environment variables, making the OPA server and plugin easier to customize in different deployment environments.

Changes

  • plugins/external/opa/README.md

    • Expanded documentation with new configuration options.
    • Added instructions for customizing the OPA server container using environment variables
    • Clarified instructions for example (policy.rego).
  • plugins/external/opa/opaserver/rego/policy.rego

    • Renamed sample policy file (policy.rego) as the default.
  • plugins/external/opa/run-server.sh

    • Updated script to respect POLICY_PATH env var when launching the OPA server.

Summary

  • Enables flexible OPA policy file placement across environments.
  • Simplifies containerized and runtime deployments.
  • Improves documentation for OPA plugin setup and configuration.
  • Maintains backward compatibility with existing defaults.

@araujof araujof added this to the Release 0.8.0 milestone Sep 30, 2025
@araujof araujof requested a review from monshri September 30, 2025 15:57
@araujof araujof self-assigned this Sep 30, 2025
@araujof araujof added enhancement New feature or request plugins labels Sep 30, 2025
@araujof araujof force-pushed the feat/opa_server_path_config branch from fc89491 to 34a1b93 Compare October 1, 2025 03:08
@araujof araujof requested a review from motou October 2, 2025 13:36
@araujof araujof force-pushed the feat/opa_server_path_config branch from 68af134 to 8427592 Compare October 2, 2025 13:38
Copy link
Member

@motou motou left a comment

Choose a reason for hiding this comment

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

Looks good!

araujof and others added 5 commits October 4, 2025 02:09
Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
Co-authored-by: Zhen Wang <motou77@gmail.com>
Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
@crivetimihai crivetimihai force-pushed the feat/opa_server_path_config branch from 8427592 to 1178027 Compare October 4, 2025 01:09
- Add proper quoting to shell variables in run-server.sh to prevent
  word splitting and globbing issues (SC2086)
- Add missing is_running() method to MockStdio in test_concurrent_requests
  to match StdIOEndpoint interface
- Remove trailing whitespace from .env.template

Fixes test failure: test_concurrent_requests AttributeError
Addresses shellcheck warnings in run-server.sh

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
@crivetimihai crivetimihai merged commit 94b12b2 into IBM:main Oct 4, 2025
35 checks passed
@crivetimihai crivetimihai mentioned this pull request Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants