Skip to content
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

Add mode to PipeInstance #8423

Merged
merged 27 commits into from
Dec 17, 2019
Merged

Add mode to PipeInstance #8423

merged 27 commits into from
Dec 17, 2019

Conversation

athampy
Copy link
Member

@athampy athampy commented Sep 28, 2019

Description:
Allows fine-grained access control for PipeInstances by specifying a mode parameter

Risk Level: Low
Testing: Added unit test
Fixes #5808

@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #8423 was opened by athampy.

see: more, trace.

@dio
Copy link
Member

dio commented Sep 30, 2019

@athampy could fix the formatting error? Thanks!

@athampy
Copy link
Member Author

athampy commented Sep 30, 2019

@dio updated

@@ -20,6 +20,9 @@ message Pipe {
// Paths starting with '@' will result in an error in environments other than
// Linux.
string path = 1 [(validate.rules).string = {min_bytes: 1}];

// [#not-implemented-hide:]
uint32 mode = 2 [(validate.rules).uint32 = {lte: 777}];
Copy link
Member

Choose a reason for hiding this comment

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

lte: 0777?

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

Copy link
Member

Choose a reason for hiding this comment

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

0777 != 777 :)

Copy link
Member

Choose a reason for hiding this comment

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

wait, protobuf doesn't accept octal?

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe it does but proto_format insists on decimal representation

api/envoy/api/v3alpha/core/address.proto Outdated Show resolved Hide resolved
test/common/network/address_impl_test.cc Outdated Show resolved Hide resolved
@lizan lizan added api-review-required API review required by @envoyproxy/api-shepherds waiting labels Oct 1, 2019
@lizan lizan added the waiting label Oct 2, 2019
@athampy
Copy link
Member Author

athampy commented Oct 3, 2019

/wait

@@ -20,6 +20,9 @@ message Pipe {
// Paths starting with '@' will result in an error in environments other than
// Linux.
string path = 1 [(validate.rules).string = {min_bytes: 1}];

// [#not-implemented-hide:]
uint32 mode = 2 [(validate.rules).uint32 = {lte: 777}];
Copy link
Member

Choose a reason for hiding this comment

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

0777 != 777 :)

api/envoy/api/v2/core/address.proto Outdated Show resolved Hide resolved
@athampy
Copy link
Member Author

athampy commented Oct 9, 2019

/retest

@repokitteh-read-only
Copy link

🐴 hold your horses - no failures detected, yet.

🐱

Caused by: a #8423 (comment) was created by @athampy.

see: more, trace.

@stale
Copy link

stale bot commented Oct 16, 2019

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

LGTM with small comments, thanks.

/wait

Comment on lines 35 to 36
* router: exposed DOWNSTREAM_REMOTE_ADDRESS as custom HTTP request/response headers.
* api: added ability to specify `mode` for :ref:`Pipe <envoy_api_field_core.Pipe.mode>`.
Copy link
Member

Choose a reason for hiding this comment

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

merge issue here, also please alpha short api

Copy link
Member Author

Choose a reason for hiding this comment

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

source/common/network/address_impl.cc Show resolved Hide resolved
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

LGTM with a few small comments, thanks you!

/wait

@@ -32,6 +33,7 @@ Version history
* thrift_proxy: added support for cluster header based routing.
* thrift_proxy: added stats to the router filter.
* tls: remove TLS 1.0 and 1.1 from client defaults
* router: exposed DOWNSTREAM_REMOTE_ADDRESS as custom HTTP request/response headers.
Copy link
Member

Choose a reason for hiding this comment

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

revert

Copy link
Member Author

Choose a reason for hiding this comment

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

done

source/common/network/address_impl.cc Show resolved Hide resolved
@athampy
Copy link
Member Author

athampy commented Dec 13, 2019

/retest

@repokitteh-read-only
Copy link

🙀 Error while processing event:

evaluation error
error: function error error: user: combined status is failure, but no failed builds.
🐱

Caused by: a #8423 (comment) was created by @athampy.

see: more, trace.

Signed-off-by: Akhil Thampy <[email protected]>
@athampy athampy force-pushed the gh-5808 branch 2 times, most recently from 699486c to d0d9e00 Compare December 15, 2019 22:00
Signed-off-by: Akhil Thampy <[email protected]>
@mattklein123
Copy link
Member

Looks like a legit ASAN failure. PTAL.

/wait

Signed-off-by: Akhil Thampy <[email protected]>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks!

@mattklein123 mattklein123 merged commit 750431a into envoyproxy:master Dec 17, 2019
spenceral added a commit to spenceral/envoy that referenced this pull request Dec 20, 2019
* master: (167 commits)
  stats: Avoid asserts in fuzz-tests by eliminating arbitrary length limits, using the new MemBlock wrapper for memcpy (envoyproxy#8779)
  Make %UPSTREAM_LOCAL_ADDRESS% access-log format work for HTTP requests. (envoyproxy#9362)
  tools: API boosting support for using decls and enum constants. (envoyproxy#9418)
  Fix incorrect cluster InitializePhase type (envoyproxy#9379)
  build: fix merge race between envoyproxy#9241 and envoyproxy#9413. (envoyproxy#9427)
  fuzz: fix incorrect evaluator test (envoyproxy#9402)
  server: fix bogus startup log message (envoyproxy#9404)
  tools: Add protoxform tests (envoyproxy#9241)
  api: options after import (envoyproxy#9413)
  misc: use std::move instead of constructing a copy (envoyproxy#9415)
  tools: API boosting support for rewriting elaborated types. (envoyproxy#9375)
  docs: fix invalid transport_socket value (envoyproxy#9403)
  fix typo in docs (envoyproxy#9394)
  srds: remove to-de-removed scopes first and then apply additions to avoid scope key conflict. (envoyproxy#9366)
  api: generate whole directory and sync (envoyproxy#9382)
  bazel: Add load statements for proto_library (envoyproxy#9367)
  Fix typo (envoyproxy#9388)
  Correct test of OptionsImpl argc type (Was: Correct type for std::array size() result) (envoyproxy#9290)
  http1 encode trailers in chunk encoding (envoyproxy#8667)
  Add mode to PipeInstance (envoyproxy#8423)
  ...
prakhag1 pushed a commit to prakhag1/envoy that referenced this pull request Jan 3, 2020
Signed-off-by: Akhil Thampy <[email protected]>
Signed-off-by: Prakhar <[email protected]>
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.

Add file mode to Pipe listeners
5 participants