0

I am trying to get this gRPC server example to work with Google Asylo (https://github.com/google/asylo/tree/master/asylo/examples/grpc_server).. To initialize the server I need to a specify a server_address in this config file (https://github.com/google/asylo/blob/master/asylo/examples/grpc_server/grpc_server_config.proto)

The server address in the example is written like this:

/ The address that the gRPC server inside the enclave will be hosted on.
 // Required.
optional string server_address = 205739939;

I am not sure what is the format of this address (i.e., is it IPv4 or Ipv6). When I try the address in the example it gives me the following error:

E0415 20:26:28.102505429 139772652978128 server_chttp2.cc:40] {"created":"@1555359988.102435497","description":"No address added out of total 1 resolved","file":"external/com_github_grpc_grpc/src/core/ext/transport/chttp2/server/chttp2_server.cc","file_line":348,"referenced_errors":[{"created":"@1555359988.102435497","description":"Address family not supported by protocol family","errno":106,"file":"external/com_github_grpc_grpc/src/core/lib/iomgr/socket_utils_common_posix.cc","file_line":379,"os_error":"Address family not supported by protocol family","syscall":"socket","target_address":"[::1]:0"}]} 2019-04-15 20:26:28 FATAL grpc_server_driver.cc : 62 : Load grpc_server/grpc_server_enclave.so failed: ::asylo::error::GoogleErrorSpace::INTERNAL: Failed to start server

I would like to write Ipv4 address for example: 127.0.0.1:5000 but I fail to do that. Any pointers are appreciated ?

1 Answers1

0

@Tarek Elgamal

The .proto files is not where you would put the ip address. server_address is a field in the .proto message definition for communication between the trusted application and non-trusted application.

optional string server_address = 205739939;

IP address for the example is being set at the following line 34 of grpc_server_driver.cc

This value is passed to the trust application via the configuration at line 47 of grpc_server_driver.

The trusted application will break down the .proto message sent by the enclave manager during the enclave initialization method.

asylo::Status GrpcServerEnclave::Initialize(
    const asylo::EnclaveConfig &enclave_config) LOCKS_EXCLUDED(server_mutex_) {
  // Fail if there is no server_address available.
  if (!enclave_config.HasExtension(server_address)) {
    return asylo::Status(asylo::error::GoogleError::INVALID_ARGUMENT,
                         "Expected a server_address extension on config.");
  }