-
Notifications
You must be signed in to change notification settings - Fork 114
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
Consolidate oak containers protos into one ergonomic file for customer teams, and add relevant build targets #4663
Open
jul-sh
wants to merge
10
commits into
project-oak:main
Choose a base branch
from
jul-sh:ergonomic-protos
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
aab669a
Consolidate oak containers protos into one file customer teams, and a…
jul-sh e4ac9aa
add cc grpc build target
jul-sh 3a82357
Preserve existing proto files, so the change is not considered blocking
jul-sh 0460e40
apply formatting
jul-sh 0f855c7
Merge remote-tracking branch 'origin/main' into ergonomic-protos
jul-sh e6c19f7
remove outdated todo
jul-sh 345cf98
Merge remote-tracking branch 'origin/main' into ergonomic-protos
jul-sh 3ae4f36
build mocks
jul-sh 16f0b7a
publicly import services and messages, instead of duplicating them
jul-sh d274752
Merge remote-tracking branch 'origin/main' into ergonomic-protos
jul-sh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// | ||
// Copyright 2023 The Project Oak Authors | ||
// | ||
// 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. | ||
// | ||
|
||
// Interfaces that may be invoked by the application | ||
|
||
syntax = "proto3"; | ||
|
||
package oak.containers.v1; | ||
|
||
import "oak_crypto/proto/v1/crypto.proto"; | ||
import "google/protobuf/empty.proto"; | ||
import "proto/containers/common.proto"; | ||
|
||
// Defines the service exposed by the orchestrator, that can be invoked by the application. | ||
service Orchestrator { | ||
// Exposes the previously loaded trusted application config to the application, | ||
// which may choose to retrieve it. | ||
rpc GetApplicationConfig(google.protobuf.Empty) returns (GetApplicationConfigResponse) {} | ||
|
||
// Notifies the orchestrator that the trusted app is ready to serve requests and listening on the | ||
// pre-arranged port (8080). | ||
rpc NotifyAppReady(google.protobuf.Empty) returns (google.protobuf.Empty) {} | ||
} | ||
|
||
// Choice between a key generated by the enclave instance and the key distributed to the enclave | ||
// group with Key Provisioning. | ||
enum KeyOrigin { | ||
KEY_ORIGIN_UNSPECIFIED = 0; | ||
INSTANCE = 1; | ||
GROUP = 2; | ||
} | ||
|
||
message DeriveSessionKeysRequest { | ||
KeyOrigin key_origin = 1; | ||
// Ephemeral Diffie-Hellman client public key that is needed to derive session keys. | ||
bytes serialized_encapsulated_public_key = 2; | ||
} | ||
|
||
message DeriveSessionKeysResponse { | ||
// Session keys for decrypting client requests and encrypting enclave responses. | ||
oak.crypto.v1.SessionKeys session_keys = 1; | ||
} | ||
|
||
message SignRequest { | ||
KeyOrigin key_origin = 1; | ||
bytes message = 2; | ||
} | ||
|
||
message SignResponse { | ||
oak.crypto.v1.Signature signature = 1; | ||
} | ||
|
||
// RPC service that is exposed to an enclave application and allows it to: | ||
// - Encrypt/decrypt messages | ||
// - Sign arbitrary data | ||
// TODO(#4504): Implement data signing. | ||
service OrchestratorCrypto { | ||
// Derives session keys for decrypting client requests and encrypting enclave responses. | ||
rpc DeriveSessionKeys(DeriveSessionKeysRequest) returns (DeriveSessionKeysResponse) {} | ||
// Signs the provided message using the hardware rooted signing key. | ||
rpc Sign(SignRequest) returns (SignResponse) {} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: In theory, you could use "import public" (https://protobuf.dev/programming-guides/proto3/#importing) to import the symbols from application_interfaces.proto. But it might be simpler to just duplicate the definitions if you expect the migration to be quick -- especially since using "import public" would also cause
OrchestratorCrypto
to be exposed here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, sounds like a reasonable option. Updated to use public imports