Skip to content

Commit

Permalink
Cherry-picked changes for release 0.12.0-rc.2 (#976)
Browse files Browse the repository at this point in the history
  • Loading branch information
hdkshingala authored Nov 28, 2022
2 parents 6a21c44 + fac1c05 commit 116cb2f
Show file tree
Hide file tree
Showing 14 changed files with 261 additions and 287 deletions.
20 changes: 11 additions & 9 deletions api/aperture/policy/language/v1/classifier.proto
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,21 @@ message Classifier {
// pointer: /user/name
// ```
//
// Example of Rego module which also disables propagation by disabling telemetry:
// Example of Rego module which also disables telemetry visibility of label:
// ```yaml
// rego:
// query: data.user_from_cookie.user
// source: |
// package: user_from_cookie
// cookies: split(input.attributes.request.http.headers.cookie, ';')
// cookie: cookies[_]
// cookie.startswith: ('session=')
// session: substring(cookie, count('session='), -1)
// parts: split(session, '.')
// object: json.unmarshal(base64url.decode(parts[0]))
// user: object.user
// package user_from_cookie
// cookies := split(input.attributes.request.http.headers.cookie, "; ")
// user := user {
// cookie := cookies[_]
// startswith(cookie, "session=")
// session := substring(cookie, count("session="), -1)
// parts := split(session, ".")
// object := json.unmarshal(base64url.decode(parts[0]))
// user := object.user
// }
// telemetry: false
// ```
// [attribute-context]: https://www.envoyproxy.io/docs/envoy/latest/api-v3/service/auth/v3/attribute_context.proto
Expand Down
20 changes: 11 additions & 9 deletions api/gen/proto/go/aperture/policy/language/v1/classifier.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions docs/content/assets/openapiv2/aperture-controller.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1708,19 +1708,21 @@ definitions:
pointer: /user/name
```
Example of Rego module which also disables propagation by disabling telemetry:
Example of Rego module which also disables telemetry visibility of label:
```yaml
rego:
query: data.user_from_cookie.user
source: |
package: user_from_cookie
cookies: split(input.attributes.request.http.headers.cookie, ';')
cookie: cookies[_]
cookie.startswith: ('session=')
session: substring(cookie, count('session='), -1)
parts: split(session, '.')
object: json.unmarshal(base64url.decode(parts[0]))
user: object.user
package user_from_cookie
cookies := split(input.attributes.request.http.headers.cookie, "; ")
user := user {
cookie := cookies[_]
startswith(cookie, "session=")
session := substring(cookie, count("session="), -1)
parts := split(session, ".")
object := json.unmarshal(base64url.decode(parts[0]))
user := object.user
}
telemetry: false
```
[attribute-context]: https://www.envoyproxy.io/docs/envoy/latest/api-v3/service/auth/v3/attribute_context.proto
Expand Down
20 changes: 11 additions & 9 deletions docs/content/assets/openapiv2/aperture.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2095,19 +2095,21 @@ definitions:
pointer: /user/name
```
Example of Rego module which also disables propagation by disabling telemetry:
Example of Rego module which also disables telemetry visibility of label:
```yaml
rego:
query: data.user_from_cookie.user
source: |
package: user_from_cookie
cookies: split(input.attributes.request.http.headers.cookie, ';')
cookie: cookies[_]
cookie.startswith: ('session=')
session: substring(cookie, count('session='), -1)
parts: split(session, '.')
object: json.unmarshal(base64url.decode(parts[0]))
user: object.user
package user_from_cookie
cookies := split(input.attributes.request.http.headers.cookie, "; ")
user := user {
cookie := cookies[_]
startswith(cookie, "session=")
session := substring(cookie, count("session="), -1)
parts := split(session, ".")
object := json.unmarshal(base64url.decode(parts[0]))
user := object.user
}
telemetry: false
```
[attribute-context]: https://www.envoyproxy.io/docs/envoy/latest/api-v3/service/auth/v3/attribute_context.proto
Expand Down
20 changes: 11 additions & 9 deletions docs/content/references/configuration/policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2152,20 +2152,22 @@ extractor:
pointer: /user/name
```

Example of Rego module which also disables propagation by disabling telemetry:
Example of Rego module which also disables telemetry visibility of label:

```yaml
rego:
query: data.user_from_cookie.user
source: |
package: user_from_cookie
cookies: split(input.attributes.request.http.headers.cookie, ';')
cookie: cookies[_]
cookie.startswith: ('session=')
session: substring(cookie, count('session='), -1)
parts: split(session, '.')
object: json.unmarshal(base64url.decode(parts[0]))
user: object.user
package user_from_cookie
cookies := split(input.attributes.request.http.headers.cookie, "; ")
user := user {
cookie := cookies[_]
startswith(cookie, "session=")
session := substring(cookie, count("session="), -1)
parts := split(session, ".")
object := json.unmarshal(base64url.decode(parts[0]))
user := object.user
}
telemetry: false
```

Expand Down
20 changes: 11 additions & 9 deletions docs/gen/policy/policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1622,19 +1622,21 @@ definitions:
pointer: /user/name
```
Example of Rego module which also disables propagation by disabling telemetry:
Example of Rego module which also disables telemetry visibility of label:
```yaml
rego:
query: data.user_from_cookie.user
source: |
package: user_from_cookie
cookies: split(input.attributes.request.http.headers.cookie, ';')
cookie: cookies[_]
cookie.startswith: ('session=')
session: substring(cookie, count('session='), -1)
parts: split(session, '.')
object: json.unmarshal(base64url.decode(parts[0]))
user: object.user
package user_from_cookie
cookies := split(input.attributes.request.http.headers.cookie, "; ")
user := user {
cookie := cookies[_]
startswith(cookie, "session=")
session := substring(cookie, count("session="), -1)
parts := split(session, ".")
object := json.unmarshal(base64url.decode(parts[0]))
user := object.user
}
telemetry: false
```
[attribute-context]: https://www.envoyproxy.io/docs/envoy/latest/api-v3/service/auth/v3/attribute_context.proto
Expand Down
Loading

0 comments on commit 116cb2f

Please sign in to comment.