Skip to content

ext_authz: Set response flag and code details to UAEX when denied#18740

Merged
ggreenway merged 4 commits intoenvoyproxy:mainfrom
dio:fix-18691
Oct 28, 2021
Merged

ext_authz: Set response flag and code details to UAEX when denied#18740
ggreenway merged 4 commits intoenvoyproxy:mainfrom
dio:fix-18691

Conversation

@dio
Copy link
Member

@dio dio commented Oct 25, 2021

Commit Message: This patch sets the response flag and code details to UAEX when the ext_authz network filter denies a connection.

Additional Description: N/A
Risk Level: Low
Testing: Added
Docs Changes: N/A
Release Notes: Added
Platform-Specific Features: N/A
Fixes #18691

dio added 2 commits October 25, 2021 03:21
This patch sets response flag to UAEX when ext_authz network filter
denies a connection.

Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Copy link
Member

@ggreenway ggreenway left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

I think this should also call stream_info_.setResponseCodeDetails() using the same values as http: https://github.com/envoyproxy/envoy/blob/main/source/extensions/filters/http/ext_authz/ext_authz.cc#L18

/wait

Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
@dio dio changed the title ext_authz: Set response flag to UAEX when denied ext_authz: Set response flag ad code details to UAEX when denied Oct 26, 2021
@dio
Copy link
Member Author

dio commented Oct 26, 2021

@ggreenway oops. Thank you, I missed that one. Added.

@dio dio changed the title ext_authz: Set response flag ad code details to UAEX when denied ext_authz: Set response flag and code details to UAEX when denied Oct 26, 2021
Copy link
Member

@ggreenway ggreenway left a comment

Choose a reason for hiding this comment

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

One small nit; other than that it looks good.


// Response code details when the check method gets a denied response from the external auth
// service.
constexpr absl::string_view AuthzDenied = "ext_authz_denied";
Copy link
Member

Choose a reason for hiding this comment

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

Please de-duplicate these and move to source/extensions/filters/common/ext_authz/ext_authz.h

Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Copy link
Member

@ggreenway ggreenway left a comment

Choose a reason for hiding this comment

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

LGTM

@ggreenway ggreenway merged commit 945b583 into envoyproxy:main Oct 28, 2021
mpuncel added a commit to mpuncel/envoy that referenced this pull request Oct 29, 2021
* main: (221 commits)
  deps: Bump `protobuf` -> 3.19.0 (envoyproxy#18471)
  tooling: auto-assign dependency shephards (envoyproxy#18794)
  clang-tidy: Return from diff fun if empty diff (envoyproxy#18815)
  repokitteh: Block PRs pending deps approval (envoyproxy#18814)
  deps: Bump `org_llvm_llvm` -> 12.0.1, `com_github_wavm_wavm` -> 9ffd3e2 (envoyproxy#18747)
  dns resolvers: add All lookup mode (envoyproxy#18464)
  doc: fix link formatting for TLS session_timeout (envoyproxy#18790)
  ext_authz: Set response flag and code details to UAEX when denied (envoyproxy#18740)
  socket options: add support for directly creating ipv4/ipv6 pairs (envoyproxy#18769)
  ecds: make onConfigUpdate generic over filter type (envoyproxy#18061)
  bazel: update CMake instructions in EXTERNAL_DEPS.md (envoyproxy#18799)
  upstream: fix typo in comment (envoyproxy#18798)
  runtime: removing envoy.reloadable_features.grpc_json_transcoder_adhere_to_buffer_limits (envoyproxy#18696)
  bazel: Add CC=clang to clang configuration (envoyproxy#18732)
  fix error request id in the dubbbo local reply (envoyproxy#18741)
  event: assert the case of both read and closed event registered (envoyproxy#18265)
  tcp proxy connect tunneling: improved testing (envoyproxy#18784)
  deps: Bump `protoc-gen-validate` -> 0.6.2 (envoyproxy#18742)
  deps: Bump `rules_pkg` -> ad57589 (envoyproxy#18746)
  bazel: copy .bazelversion for envoy filter examples (envoyproxy#18730)
  ...

Signed-off-by: Michael Puncel <mpuncel@squareup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

network external auth failure reason not set in access logs

2 participants