Skip to content

Support for gRPC accesslog unauthorized respose flag.#2756

Merged
htuch merged 1 commit intoenvoyproxy:masterfrom
colabsaumoh:accesslog-review
Mar 8, 2018
Merged

Support for gRPC accesslog unauthorized respose flag.#2756
htuch merged 1 commit intoenvoyproxy:masterfrom
colabsaumoh:accesslog-review

Conversation

@saumoh
Copy link
Copy Markdown
Contributor

@saumoh saumoh commented Mar 8, 2018

title: Add support for response flag unauthorized (by external service) in gRPC access log.
Adding support for gRPC access log support for response flag Unauthorized.
Here we are adding support for envoyproxy/data-plane-api#505

Risk Level: Low
Small optional feature.

Testing:
Added UT's.

Docs Changes: N/A

Signed-off-by: Saurabh Mohan saurabh+github@tigera.io

Signed-off-by: Saurabh Mohan <saurabh+github@tigera.io>
}

if (request_info.getResponseFlag(RequestInfo::ResponseFlag::UnauthorizedExternalService)) {
common_access_log.mutable_response_flags()->mutable_unauthorized_details()->set_reason(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's a bit weird that we have "details" in a "response_flags" message, but that's an API level concern. I wonder if we should rename that before moving it out of "not implemented" status. Thoughts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

may be rename "_details" to "_reasons". That way we can set multiple reasons under it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm thinking rename response_flags to response_details or response_info, i.e. it's no longer just flags. I'll merge this, but just putting this out there for future followup. Thanks!

Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

LGTM

@htuch htuch self-assigned this Mar 8, 2018
@htuch htuch merged commit e9494ae into envoyproxy:master Mar 8, 2018
@saumoh saumoh deleted the accesslog-review branch May 4, 2018 17:28
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.

2 participants