This repository has been archived by the owner on Nov 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for an optional, secure gRPC service
This commit adds a gRPC service to Stenographer and implements a call to retrieve PCAP via stenoread. The gRPC service is designed to only use a secure channel (due to the sensitivity of packet data) with SSL certificates that are managed separately from those created by stenokeys.sh (due to users needing to manage remote access to many servers running Stenographer, though technically users could share the certs used by the local Stenographer HTTP service). This commit explicitly does not address any client-side integration with the gRPC service, but clients can build interaction based on the protobuf and documentation in DESIGN.md. Below is a summary of the additions and changes: - Added rpc/rpc.go - Added protobuf/steno.proto - Changed config/config.go to support Rpc configuration - Changed stenographer.go to check for Rpc configuration and (if found) run gRPC server as a goroutine - Updated DESIGN docs to describe Rpc functionality
- Loading branch information
Showing
6 changed files
with
515 additions
and
0 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2019 Josh Liburdi and Google Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
syntax = "proto3"; | ||
package steno; | ||
|
||
service Stenographer { | ||
rpc RetrievePcap(PcapRequest) returns (stream PcapResponse) {} | ||
} | ||
|
||
message PcapRequest { | ||
string uid = 1; | ||
int64 chunk_size = 2; | ||
int64 max_size = 3; | ||
string query = 4; | ||
} | ||
|
||
message PcapResponse { | ||
string uid = 1; | ||
bytes pcap = 2; | ||
} |
Oops, something went wrong.