Asylo
peer_sgx_age_remote_credentials_options.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2020 Asylo authors
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef ASYLO_GRPC_AUTH_PEER_SGX_AGE_REMOTE_CREDENTIALS_OPTIONS_H_
20 #define ASYLO_GRPC_AUTH_PEER_SGX_AGE_REMOTE_CREDENTIALS_OPTIONS_H_
21 
22 #include "asylo/grpc/auth/enclave_credentials_options.h"
23 
24 namespace asylo {
25 
26 /// Creates options suitable for configuring a credential used in establishing a
27 /// unidirectionally-authenticated gRPC channel where it accepts identities
28 /// attested by a remote SGX enclave using Asylo's Assertion Generator Enclave.
29 ///
30 /// A credential configured with these options enforces that the peer
31 /// authenticates using SGX enclave code identity attested by Asylo's Assertion
32 /// Generator Enclave..
33 ///
34 /// Sample usage for creating `::grpc::ChannelCredentials`:
35 ///
36 /// ```
37 /// std::shared_ptr<::grpc::ChannelCredentials> creds =
38 /// EnclaveChannelCredentials(PeerSgxAgeRemoteCredentialsOptions());
39 /// ```
40 ///
41 /// Sample usage for creating `::grpc::ServerCredentials`:
42 ///
43 /// ```
44 /// std::shared_ptr<::grpc::ServerCredentials> creds =
45 /// EnclaveServerCredentials(PeerSgxAgeRemoteCredentialsOptions());
46 /// ```
47 ///
48 /// \return Options used to configure gRPC credentials for a channel that is
49 /// unidirectionally-authenticated on the peer's end using
50 /// SGX enclave code identity.
52 
53 } // namespace asylo
54 
55 #endif // ASYLO_GRPC_AUTH_PEER_SGX_AGE_REMOTE_CREDENTIALS_OPTIONS_H_
ABSL_CONST_INIT const char kStatusMoveAssignmentMsg[]
EnclaveCredentialsOptions PeerSgxAgeRemoteCredentialsOptions()
Creates options suitable for configuring a credential used in establishing a unidirectionally-authent...