//
// Copyright 2022 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.
//

syntax = "proto3";

package oak.session.v1;

import "proto/session/messages.proto";

option java_multiple_files = true;
option java_package = "com.google.oak.session.v1";

// Service definition for unary communication with Oak server.
service UnarySession {
  // Generally speaking, Oak doesn't provide out-of-the-box service definitions,
  // as this is almost never something that someone needs, and it restricts the
  // server capability.
  //
  // Instead, you should define Oak-enabled methods using the provided transport
  // message types, along with the application SDK methods that make it easy to
  // implement the Oak functionality for these methods.
  option deprecated = true;

  // Gets a attestation evidence and endorsements.
  rpc GetEndorsedEvidence(GetEndorsedEvidenceRequest)
      returns (GetEndorsedEvidenceResponse);

  // Performs lookup for a list of encrypted keys. The keys should be encrypted
  // using the Public key provided by the enclave. The response is encrypted
  // using the response key (supplied by the client).
  rpc Invoke(InvokeRequest) returns (InvokeResponse);
}
