Skip to content

Commit

Permalink
Fixing typos (open-policy-agent#5389)
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Deininger <[email protected]>
  • Loading branch information
deining authored Nov 16, 2022
1 parent 09dd80b commit 50b27aa
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docs/content/deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ containers:
httpGet:
scheme: HTTP # assumes OPA listens on localhost:8181
port: 8181
initialDelaySeconds: 5 # tune these periods for your environemnt
initialDelaySeconds: 5 # tune these periods for your environment
periodSeconds: 5
readinessProbe:
httpGet:
Expand Down Expand Up @@ -498,7 +498,7 @@ Use the following JSON structure to build more complex capability checks.

"type": "function", // REQUIRED: states this is a function

"args": [ // REQUIRED: List of types to be passed in as an arguement: any, number, string, boolean, object, array, set.
"args": [ // REQUIRED: List of types to be passed in as an argument: any, number, string, boolean, object, array, set.
{
"type": "number"
},
Expand Down
4 changes: 2 additions & 2 deletions docs/content/envoy-tutorial-gloo-edge.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ kubectl patch vs httpbin --type=merge --patch "$(cat vs-patch.yaml)"

### 8. Exercise the OPA Policy

Before we exercise the policy, for convience sake, we will want to store Alice and Bob's tokens in environment variables as such:
Before we exercise the policy, for convenience sake, we will want to store Alice and Bob's tokens in environment variables as such:

```bash
export ALICE_TOKEN="eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.eyJleHAiOiAyMjQxMDgxNTM5LCAibmJmIjogMTUxNDg1MTEzOSwgInJvbGUiOiAiZ3Vlc3QiLCAic3ViIjogIllXeHBZMlU9In0.Uk5hgUqMuUfDLvBLnlXMD0-X53aM_Hlziqg3vhOsCc8"
Expand Down Expand Up @@ -328,7 +328,7 @@ curl http -XPOST -Is -H "Authorization: Bearer $BOB_TOKEN" localhost:8080/post
HTTP/1.1 200 OK
```

Check OPA's descision logs to view the inputs received by OPA from Gloo Edge and the results generated by OPA.
Check OPA's decision logs to view the inputs received by OPA from Gloo Edge and the results generated by OPA.

```bash
kubectl logs deployment/opa -n gloo-system
Expand Down
2 changes: 1 addition & 1 deletion docs/content/kubernetes-primer.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ test_image_safety { # line 3

**Different Package**. On line 1 the `package` directive puts these tests in a different package than admission control policy itself. This is the recommended best practice.

**Import**. On line 2 `import data.kubernetes.admission` allows us to reference the admission control policy using the name `admission` everwhere in the test package. `import` is not strictly necessary--it simply sets up an alias; you could instead reference `data.kubernetes.admission` inside the rules.
**Import**. On line 2 `import data.kubernetes.admission` allows us to reference the admission control policy using the name `admission` everywhere in the test package. `import` is not strictly necessary--it simply sets up an alias; you could instead reference `data.kubernetes.admission` inside the rules.

**Unit Test**. On line 3 `test_image_safety` defines a unittest. If the rule evaluates to true the test passes; otherwise it fails. When you use the OPA test runner, anything in any package starting with `test` is treated as a test.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/management-bundles.md
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ We can now start OPA as a server using:
```bash
opa run --server --set default_decision=policies -c configuration.yaml
```
To interact with the server you can do a simple **curl** to verify if it works as inteded:
To interact with the server you can do a simple **curl** to verify if it works as intended:
```bash
curl localhost:8181 -i -d '{ "message":"world"}' -H 'Content-Type:application/json'
Expand Down
2 changes: 1 addition & 1 deletion docs/content/management-decision-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ operations
package system.log
mask[{"op": "upsert", "path": "/input/password", "value": x}] {
# conditionally upsert password if it existed in the orginal event
# conditionally upsert password if it existed in the original event
input.input.password
x := "**REDACTED**"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/content/management-discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ endpoint. If only one service is defined, there is no need to set `discovery.ser
OPA generates it's subsequent configuration by querying the Rego and JSON files
contained inside the discovery bundle. The default query is `data` however this
can be overriden by specifying the `discovery.decision`.
can be overridden by specifying the `discovery.decision`.

```yaml
services:
Expand Down
2 changes: 1 addition & 1 deletion docs/content/policy-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ names_with_dev
The `every` keyword takes an (optional) key argument, a value argument, a domain, and a
block of further queries, its "body".

The keyword is used to explicity assert that its body is true for *any element in the domain*.
The keyword is used to explicitly assert that its body is true for *any element in the domain*.
It will iterate over the domain, bind its variables, and check that the body holds
for those bindings.
If one of the bindings does not yield a successful evaluation of the body, the overall
Expand Down
2 changes: 1 addition & 1 deletion docs/content/policy-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ By default optimizations are disabled.
Policies are partially evaluated. Rules that DO NOT depend on unknowns (directly or indirectly) are
evaluated and the virtual documents they produce are inlined into call sites. Virtual documents that
are required at evaluation time are not inlined. For example, if a base or virtual document is
targetted by a `with` statement in the policy, the document will not be inlined.
targeted by a `with` statement in the policy, the document will not be inlined.

Rules that depend on unknowns (directly or indirectly) are also partially evaluated however the
virtual documents they produce ARE NOT inlined into call sites. The output policy should be structurally
Expand Down
6 changes: 3 additions & 3 deletions docs/content/policy-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ raw_result_parts_hs256 := io.jwt.decode_verify(raw_result_hs256, {"secret": "foo
```live:jwt/verify/round_trip_raw:output
```

Now encode the and sign the same token contents but with `io.jwt.encode_sign` instead of the `raw` varient.
Now encode the and sign the same token contents but with `io.jwt.encode_sign` instead of the `raw` variant.
```live:jwt/verify/round_trip:module:hidden
```
```live:jwt/verify/round_trip:query:merge_down
Expand Down Expand Up @@ -904,10 +904,10 @@ The table below shows examples of calling `http.send`:
#### Notes on Name Resolution (`net.lookup_ip_addr`)

The lookup mechanism uses either the pure-Go, or the cgo-based resolver, depending on the operating system and availability of cgo.
The latter depends on flags that can be provided when building OPA as a Go library, and can be adjusted at runtime via the GODEBUG enviroment variable.
The latter depends on flags that can be provided when building OPA as a Go library, and can be adjusted at runtime via the GODEBUG environment variable.
See [these docs on the `net` package](https://pkg.go.dev/[email protected]#hdr-Name_Resolution) for details.

Note that the cgo-based resolver is often **preferrable**: It will take advantage of host-based DNS caching in place.
Note that the cgo-based resolver is often **preferable**: It will take advantage of host-based DNS caching in place.
This built-in function only caches DNS lookups within _a single_ policy evaluation.

#### Examples of `net.cidr_contains_matches`
Expand Down
2 changes: 1 addition & 1 deletion docs/content/rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,7 @@ that the server is operational. Optionally it can account for bundle activation
#### Query Parameters
* `bundles` - Boolean parameter to account for bundle activation status in response. This includes any discovery bundles or bundles defined in the loaded discovery configuration.
* `plugins` - Boolean parameter to account for plugin status in response.
* `exclude-plugin` - String parameter to exclude a plugin from status checks. Can be added multiple times. Does nothing if `plugins` is not true. This parameter is useful for special use cases where a plugin depends on the server being fully initialized before it can fully intialize itself.
* `exclude-plugin` - String parameter to exclude a plugin from status checks. Can be added multiple times. Does nothing if `plugins` is not true. This parameter is useful for special use cases where a plugin depends on the server being fully initialized before it can fully initialize itself.

#### Status Codes
- **200** - OPA service is healthy. If the `bundles` option is specified then all configured bundles have
Expand Down
2 changes: 1 addition & 1 deletion docs/content/wasm.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ In the ABI column, you can find the ABI version with which the export was introd
| `entrypoints` | <div>`value_addr entrypoints(void)`</div><div>Returns the address of a mapping of entrypoints to numeric identifiers that can be selected when evaluating the policy. </div> | 1.0 |
| `opa_eval_ctx_new` | <div>`ctx_addr opa_eval_ctx_new(void)`</div><div>Returns the address of a newly allocated evaluation context. </div> | 1.0 |
| `opa_eval_ctx_set_input` | <div>`void opa_eval_ctx_set_input(ctx_addr, value_addr)`</div><div>Set the input value to use during evaluation. This must be called before each `eval()` call. If the input value is not set before evaluation, references to the `input` document result produce no results (i.e., they are undefined.) </div> | 1.0 |
| `opa_eval_ctx_set_data` | <div>`void opa_eval_ctx_set_data(ctx_addr, value_addr)` </div><div>Set the data value to use during evalutaion. This should be called before each `eval()` call. If the data value is not set before evalutaion, references to base `data` documents produce no results (i.e., they are undefined.) </div> | 1.0 |
| `opa_eval_ctx_set_data` | <div>`void opa_eval_ctx_set_data(ctx_addr, value_addr)` </div><div>Set the data value to use during evaluation. This should be called before each `eval()` call. If the data value is not set before evaluation, references to base `data` documents produce no results (i.e., they are undefined.) </div> | 1.0 |
| `opa_eval_ctx_set_entrypoint` | <div>`void opa_eval_ctx_set_entrypoint(ctx_addr, entrypoint_id)` </div><div>Set the entrypoint to evaluate. By default, entrypoint with id `0` is evaluated. </div> | 1.0 |
| `opa_eval_ctx_get_result` | <div>`value_addr opa_eval_ctx_get_result(ctx_addr)`</div><div>Get the result set produced by the evaluation process. </div> | 1.0 |
| `opa_malloc` | <div>`addr opa_malloc(int32 size)`</div><div>Allocates size bytes in the shared memory and returns the starting address. </div> | 1.0 |
Expand Down

0 comments on commit 50b27aa

Please sign in to comment.