-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facilitate OPA decision correlation with business flows #3041
Facilitate OPA decision correlation with business flows #3041
Conversation
filters/openpolicyagent/opaauthorizerequest/opaauthorizerequest_test.go
Outdated
Show resolved
Hide resolved
@JanardhanSharma please sign off your commits use |
d3e8c4c
to
43f11eb
Compare
Signed-off-by: Janardhan Sharma <[email protected]>
Signed-off-by: Janardhan Sharma <[email protected]>
Signed-off-by: Janardhan Sharma <[email protected]>
Signed-off-by: Magnus Jungsbluth <[email protected]> Signed-off-by: Janardhan Sharma <[email protected]>
OpenTelemetry-OpenTracing bridge span kind can not be changed after creation, see open-telemetry/opentelemetry-go#3953 The workaround is to specify span kind on creation which works for both Open Tracing and Open Telemetry bridge spans. Note that this change removes non-standard "shedder" kind from spans created by `admissionControl` filter. Use operation name "admission_control" to query its spans instead if needed. For zalando#2104 Signed-off-by: Alexander Yastrebov <[email protected]> Signed-off-by: Janardhan Sharma <[email protected]>
Make `defaultConfig` return configuration equal to one created from default flags and modified by a helper function for defining expected test case values. Signed-off-by: Alexander Yastrebov <[email protected]> Signed-off-by: Janardhan Sharma <[email protected]>
Signed-off-by: Janardhan Sharma <[email protected]>
…[email protected]> Signed-off-by: Janardhan Sharma <[email protected]>
65a1998
to
372e51e
Compare
|
Signed-off-by: Janardhan Sharma <[email protected]>
@szuecs Could you may be add @mjungsbluth as reviewer as well, please. He can have a quick look as well. |
fixed |
Signed-off-by: Janardhan Sharma <[email protected]>
|
Signed-off-by: Janardhan Sharma <[email protected]>
Signed-off-by: Janardhan Sharma <[email protected]>
Signed-off-by: Janardhan Sharma <[email protected]>
👍 |
@AlexanderYastrebov Could you please merge this please. This has been reviewed and approved long back, just left to be merged. |
I think formatting needs to be fixed (via |
Signed-off-by: Janardhan Sharma <[email protected]>
fixed. Please go ahead. |
👍 |
1 similar comment
👍 |
* build(deps): bump alpine from `77726ef` to `b89d9c9` in /packaging: zalando/skipper#3122 * build(deps): bump docker/build-push-action from 5.4.0 to 6.1.0: zalando/skipper#3124 * build(deps): bump amazonlinux from `0d172f8` to `b0016cb` in /fuzz: zalando/skipper#3125 * Facilitate OPA decision correlation with business flows: zalando/skipper#3041 * config: fix defaultFiltersFlags.String: zalando/skipper#3127 * config: fix defaultFiltersFlags yaml test case: zalando/skipper#3128 * filters/auth: add token validator filter: zalando/skipper#3126 * metrics: register skipper_filter_create_duration_seconds: zalando/skipper#3129 * cmd/skipper: allow exclusion of insecure cipher suites: zalando/skipper#3123 diff zalando/skipper@v0.21.124...v0.21.133
…-version skipper: update canary version to v0.21.133 * build(deps): bump alpine from `77726ef` to `b89d9c9` in /packaging: zalando/skipper#3122 * build(deps): bump docker/build-push-action from 5.4.0 to 6.1.0: zalando/skipper#3124 * build(deps): bump amazonlinux from `0d172f8` to `b0016cb` in /fuzz: zalando/skipper#3125 * Facilitate OPA decision correlation with business flows: zalando/skipper#3041 * config: fix defaultFiltersFlags.String: zalando/skipper#3127 * config: fix defaultFiltersFlags yaml test case: zalando/skipper#3128 * filters/auth: add token validator filter: zalando/skipper#3126 * metrics: register skipper_filter_create_duration_seconds: zalando/skipper#3129 * cmd/skipper: allow exclusion of insecure cipher suites: zalando/skipper#3123 diff zalando/skipper@v0.21.124...v0.21.133
* build(deps): bump alpine from `77726ef` to `b89d9c9` in /packaging: zalando/skipper#3122 * build(deps): bump docker/build-push-action from 5.4.0 to 6.1.0: zalando/skipper#3124 * build(deps): bump amazonlinux from `0d172f8` to `b0016cb` in /fuzz: zalando/skipper#3125 * Facilitate OPA decision correlation with business flows: zalando/skipper#3041 * config: fix defaultFiltersFlags.String: zalando/skipper#3127 * config: fix defaultFiltersFlags yaml test case: zalando/skipper#3128 * filters/auth: add token validator filter: zalando/skipper#3126 * metrics: register skipper_filter_create_duration_seconds: zalando/skipper#3129 * cmd/skipper: allow exclusion of insecure cipher suites: zalando/skipper#3123 diff zalando/skipper@v0.21.124...v0.21.133 depends on #7757
* build(deps): bump alpine from `77726ef` to `b89d9c9` in /packaging: zalando/skipper#3122 * build(deps): bump docker/build-push-action from 5.4.0 to 6.1.0: zalando/skipper#3124 * build(deps): bump amazonlinux from `0d172f8` to `b0016cb` in /fuzz: zalando/skipper#3125 * Facilitate OPA decision correlation with business flows: zalando/skipper#3041 * config: fix defaultFiltersFlags.String: zalando/skipper#3127 * config: fix defaultFiltersFlags yaml test case: zalando/skipper#3128 * filters/auth: add token validator filter: zalando/skipper#3126 * metrics: register skipper_filter_create_duration_seconds: zalando/skipper#3129 * cmd/skipper: allow exclusion of insecure cipher suites: zalando/skipper#3123 diff zalando/skipper@v0.21.124...v0.21.133 depends on #7757
This reverts commit 2a623a9. The code panics with: ``` fatal error: concurrent map writes goroutine 191993 [running]: github.com/zalando/skipper/filters/openpolicyagent.setDecisionIdInRequest(0x4004494720, {0x40067c6440?, 0x10?}) github.com/zalando/skipper/filters/openpolicyagent/evaluation.go:92 +0xe4 github.com/zalando/skipper/filters/openpolicyagent.(*OpenPolicyAgentInstance).Eval(0x40059ef400, {0x16b6bb0, 0x40044946c0}, 0x4004494720) github.com/zalando/skipper/filters/openpolicyagent/evaluation.go:27 +0x164 github.com/zalando/skipper/filters/openpolicyagent/opaauthorizerequest.(*opaAuthorizeRequestFilter).Request(0x4002234520, {0x16ccd90, 0x40091ca100}) github.com/zalando/skipper/filters/openpolicyagent/opaauthorizerequest/opaauthorizerequest.go:131 +0x1a4 ``` Signed-off-by: Alexander Yastrebov <[email protected]>
…" (#3138) This reverts commit 2a623a9. The code panics with: ``` fatal error: concurrent map writes goroutine 191993 [running]: github.com/zalando/skipper/filters/openpolicyagent.setDecisionIdInRequest(0x4004494720, {0x40067c6440?, 0x10?}) github.com/zalando/skipper/filters/openpolicyagent/evaluation.go:92 +0xe4 github.com/zalando/skipper/filters/openpolicyagent.(*OpenPolicyAgentInstance).Eval(0x40059ef400, {0x16b6bb0, 0x40044946c0}, 0x4004494720) github.com/zalando/skipper/filters/openpolicyagent/evaluation.go:27 +0x164 github.com/zalando/skipper/filters/openpolicyagent/opaauthorizerequest.(*opaAuthorizeRequestFilter).Request(0x4002234520, {0x16ccd90, 0x40091ca100}) github.com/zalando/skipper/filters/openpolicyagent/opaauthorizerequest/opaauthorizerequest.go:131 +0x1a4 ``` Signed-off-by: Alexander Yastrebov <[email protected]>
* build(deps): bump alpine from `77726ef` to `b89d9c9` in /packaging: zalando/skipper#3122 * build(deps): bump docker/build-push-action from 5.4.0 to 6.1.0: zalando/skipper#3124 * build(deps): bump amazonlinux from `0d172f8` to `b0016cb` in /fuzz: zalando/skipper#3125 * Facilitate OPA decision correlation with business flows: zalando/skipper#3041 * config: fix defaultFiltersFlags.String: zalando/skipper#3127 * config: fix defaultFiltersFlags yaml test case: zalando/skipper#3128 * filters/auth: add token validator filter: zalando/skipper#3126 * metrics: register skipper_filter_create_duration_seconds: zalando/skipper#3129 * cmd/skipper: allow exclusion of insecure cipher suites: zalando/skipper#3123 * Revert "Facilitate OPA decision correlation with business flows (#3041)": zalando/skipper#3138 * build(deps): bump docker/build-push-action from 6.1.0 to 6.2.0: zalando/skipper#3134 * dependabot: group GoLang dependencies update: zalando/skipper#3136 * build(deps): bump github.com/open-policy-agent/opa from 0.65.0 to 0.66.0: zalando/skipper#3135 * build(deps): bump amazonlinux from `b0016cb` to `5bf7910` in /fuzz: zalando/skipper#3133 * metrics: refactor prometheus metric registration: zalando/skipper#3132 diff zalando/skipper@v0.21.124...v0.21.139 depends on #7786
* build(deps): bump alpine from `77726ef` to `b89d9c9` in /packaging: zalando/skipper#3122 * build(deps): bump docker/build-push-action from 5.4.0 to 6.1.0: zalando/skipper#3124 * build(deps): bump amazonlinux from `0d172f8` to `b0016cb` in /fuzz: zalando/skipper#3125 * Facilitate OPA decision correlation with business flows: zalando/skipper#3041 * config: fix defaultFiltersFlags.String: zalando/skipper#3127 * config: fix defaultFiltersFlags yaml test case: zalando/skipper#3128 * filters/auth: add token validator filter: zalando/skipper#3126 * metrics: register skipper_filter_create_duration_seconds: zalando/skipper#3129 * cmd/skipper: allow exclusion of insecure cipher suites: zalando/skipper#3123 * Revert "Facilitate OPA decision correlation with business flows (#3041)": zalando/skipper#3138 * build(deps): bump docker/build-push-action from 6.1.0 to 6.2.0: zalando/skipper#3134 * dependabot: group GoLang dependencies update: zalando/skipper#3136 * build(deps): bump github.com/open-policy-agent/opa from 0.65.0 to 0.66.0: zalando/skipper#3135 * build(deps): bump amazonlinux from `b0016cb` to `5bf7910` in /fuzz: zalando/skipper#3133 * metrics: refactor prometheus metric registration: zalando/skipper#3132 diff zalando/skipper@v0.21.124...v0.21.139 depends on #7786
* build(deps): bump alpine from `77726ef` to `b89d9c9` in /packaging: zalando/skipper#3122 * build(deps): bump docker/build-push-action from 5.4.0 to 6.1.0: zalando/skipper#3124 * build(deps): bump amazonlinux from `0d172f8` to `b0016cb` in /fuzz: zalando/skipper#3125 * Facilitate OPA decision correlation with business flows: zalando/skipper#3041 * config: fix defaultFiltersFlags.String: zalando/skipper#3127 * config: fix defaultFiltersFlags yaml test case: zalando/skipper#3128 * filters/auth: add token validator filter: zalando/skipper#3126 * metrics: register skipper_filter_create_duration_seconds: zalando/skipper#3129 * cmd/skipper: allow exclusion of insecure cipher suites: zalando/skipper#3123 * Revert "Facilitate OPA decision correlation with business flows (#3041)": zalando/skipper#3138 * build(deps): bump docker/build-push-action from 6.1.0 to 6.2.0: zalando/skipper#3134 * dependabot: group GoLang dependencies update: zalando/skipper#3136 * build(deps): bump github.com/open-policy-agent/opa from 0.65.0 to 0.66.0: zalando/skipper#3135 * build(deps): bump amazonlinux from `b0016cb` to `5bf7910` in /fuzz: zalando/skipper#3133 * metrics: refactor prometheus metric registration: zalando/skipper#3132 diff zalando/skipper@v0.21.124...v0.21.139 depends on #7786
Context
Problem
Currently there is no recommended way of correlating OPA decisions with execution flows. This leaves the OPA integrators to take different approaches which could carry security risks and break as the platform evolves.
Correlation is required by two main use cases,
Solution
Improve the Skipper filter
opaAuthorizeRequest
to inject decisionID as an input to the policy. Add a new attribute to the filterMetadata calledopen_policy_agent
and under that add thedecision_id
.Similar solution for Envoy exists: open-policy-agent/opa#6519
Ref: dynamic meta-data
Changes
Decision id is added to the request object and is available to be used in the policies.