Asylo
null_credentials_options.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2018 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_NULL_CREDENTIALS_OPTIONS_H_
20 #define ASYLO_GRPC_AUTH_NULL_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 /// bidirectionally-unauthenticated gRPC channel between two enclave entities.
28 ///
29 /// A credential configured with these options enforces bidirectional
30 /// authentication using the null identity. The null identity specifies no
31 /// identity in particular, which means that the resulting connection is
32 /// essentially unauthenticated.
33 ///
34 /// Sample usage for creating `::grpc::ChannelCredentials`:
35 ///
36 /// ```
37 /// std::shared_ptr<::grpc::ChannelCredentials> creds =
38 /// EnclaveChannelCredentials(BidirectionalNullCredentialsOptions());
39 /// ```
40 ///
41 /// Sample usage for creating `::grpc::ServerCredentials`:
42 ///
43 /// ```
44 /// std::shared_ptr<::grpc::ServerCredentials> creds =
45 /// EnclaveServerCredentials(BidirectionalNullCredentialsOptions());
46 /// ```
47 ///
48 /// \return Options used to configure gRPC credentials for a
49 /// bidirectionally-unauthenticated channel.
51 
52 /// Creates options suitable for configuring a credential used in establishing a
53 /// unidirectionally-unauthenticated gRPC channel between two enclave entities.
54 ///
55 /// A credential configured with these options enforces unidirectional
56 /// authentication using the null identity. The null identity specifies no
57 /// identity in particular, which means that in the resulting connection the
58 /// peer does not authenticate.
59 ///
60 /// Sample usage for creating `::grpc::ChannelCredentials`:
61 ///
62 /// ```
63 /// std::shared_ptr<::grpc::ChannelCredentials> creds =
64 /// EnclaveChannelCredentials(PeerNullCredentialsOptions());
65 /// ```
66 ///
67 /// Sample usage for creating `::grpc::ServerCredentials`:
68 ///
69 /// ```
70 /// std::shared_ptr<::grpc::ServerCredentials> creds =
71 /// EnclaveServerCredentials(PeerNullCredentialsOptions());
72 /// ```
73 ///
74 /// \return Options used to configure gRPC credentials for a channel that is
75 /// unauthenticated on the peer's end.
77 
78 /// Creates options suitable for configuring a credential used in establishing a
79 /// unidirectionally-unauthenticated gRPC channel between two enclave entities.
80 ///
81 /// A credential configured with these options enforces unidirectional
82 /// authentication using the null identity. The null identity specifies no
83 /// identity in particular, which means that in the resulting connection
84 /// the credential holder does not authenticate.
85 ///
86 /// Sample usage for creating `::grpc::ChannelCredentials`:
87 ///
88 /// ```
89 /// std::shared_ptr<::grpc::ChannelCredentials> creds =
90 /// EnclaveChannelCredentials(SelfNullCredentialsOptions());
91 /// ```
92 ///
93 /// Sample usage for creating `::grpc::ServerCredentials`:
94 ///
95 /// ```
96 /// std::shared_ptr<::grpc::ServerCredentials> creds =
97 /// EnclaveServerCredentials(SelfNullCredentialsOptions());
98 /// ```
99 ///
100 /// \return Options used to configure gRPC credentials for a channel that is
101 /// unauthenticated on the credential holder's end.
103 
104 } // namespace asylo
105 
106 #endif // ASYLO_GRPC_AUTH_NULL_CREDENTIALS_OPTIONS_H_
EnclaveCredentialsOptions BidirectionalNullCredentialsOptions()
Creates options suitable for configuring a credential used in establishing a bidirectionally-unauthen...
EnclaveCredentialsOptions SelfNullCredentialsOptions()
Creates options suitable for configuring a credential used in establishing a unidirectionally-unauthe...
ABSL_CONST_INIT const char kStatusMoveAssignmentMsg[]
EnclaveCredentialsOptions PeerNullCredentialsOptions()
Creates options suitable for configuring a credential used in establishing a unidirectionally-unauthe...