-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cilium: Use cilium-envoy-starter to run Envoy without privileges
Introduce a `cilium-envoy-starter` that forks and execs `cilium-envoy` after having dropped all privileges. Perform bpf map and privileged socket option operations in `cilium-envoy-starter`, as requested by Cilium filters running in `cilium-envoy` via a pipe between the two. Currently the protocol over this pipe supports only the following operations: - dump capabilities cilium-envoy-starter is running with - open bpf maps - perform bpf map lookups - set socket options cilium-envoy-starter fails to start if it does not have adequate privileges needed for the above operations. cilium-envoy now exits if it is running with any privileges when Cilium filters are first configured. Implementation detail: - libcap is not used, as it would be hard to cross-compile for both arm64 and amd64. Fortunately we only need to drop capabilities, so using the syscall interface is not complicated. - Patch Envoy to support setting socket options from listener filters and use them to set privileged options for the listener. - Remove the unused support for creating and manipulating bpf maps. - Remove setrlimit call that is only needed if the process is creating bpf maps. - Minor cleanup in socket option implementation to move unused fields from SocketMarkOption class to SocketOption where they are used. Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
- Loading branch information
1 parent
35a929a
commit 9a0da50
Showing
20 changed files
with
1,110 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
/bazel-* | ||
|
||
/cilium-envoy | ||
/cilium-envoy-starter | ||
/Dockerfile.istio_proxy | ||
/Dockerfile.builder-refresh | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.