Skip to content

Commit fc89491

Browse files
committed
docs: update OPA plugin README
Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
1 parent e64222c commit fc89491

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

plugins/external/opa/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
> Author: Shriti Priya
44
> Version: 0.1.0
55
6-
An OPA plugin that enforces rego policies on requests and allows/denies requests as per policies.
6+
An OPA (Open Policy Agent) plugin that enforces Rego policies on requests and allows or denies requests based on policy evaluation.
77

88
The OPA plugin is composed of two components:
9-
1. OPA server
10-
2. The pre hooks on tools that talks to OPA server running as background service within the same container. Whenever a tool is invoked, if OPA Plugin is in action, a policy will be applied on the tool call to allow/deny it.
9+
1. **OPA Server**: Runs as a background service evaluating policies
10+
2. **Plugin Hooks**: Intercepts tool invocations and communicates with the OPA server for policy decisions
11+
12+
Whenever a tool is invoked with the OPA Plugin active, a policy is applied to the tool call to allow or deny execution.
1113

1214
### OPA Server
13-
To define a policy file you need to go into opaserver/rego and create a sample policy file for you.
14-
Example -`policy.rego` is present.
15-
Once you have this file created in this location, when building the server, the opa binaries will be downloaded and a container will be build.
16-
In the `run_server.sh` file, the opa server will run as a background service in the container with the rego policy file.
15+
To define a policy file, create a Rego policy file in `opaserver/rego/`. An example `policy.rego` file is provided.
16+
17+
When building the server, the OPA binaries will be downloaded and a container will be built. The `run_server.sh` script starts the OPA server as a background service within the container, loading the specified Rego policy file.
1718

1819
### OPA Plugin
1920
The OPA plugin runs as an external plugin with pre/post tool invocations. So everytime a tool invocation is made, and if OPAPluginFilter has been defined in config.yaml file, the tool invocation will pass through this OPA Plugin.

0 commit comments

Comments
 (0)