Asylo
enclave_credentials_options.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2017 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_ENCLAVE_CREDENTIALS_OPTIONS_H_
20 #define ASYLO_GRPC_AUTH_ENCLAVE_CREDENTIALS_OPTIONS_H_
21 
22 #include <string>
23 
24 #include "absl/types/optional.h"
25 #include "asylo/identity/assertion_description_util.h"
26 #include "asylo/identity/identity.pb.h"
27 #include "asylo/identity/identity_acl.pb.h"
28 
29 namespace asylo {
30 
31 /// Options used to configure a `::grpc::ChannelCredentials` object or a
32 /// `::grpc::ServerCredentials` object for use in an enclave system.
34  /// Combines the given EnclaveCredentialsOptions with this object.
35  ///
36  /// \param additional_options The EnclaveCredentialsOptions object to
37  /// combine with this object.
38  /// \return This object, modified to add the `additional_options`.
40  const EnclaveCredentialsOptions &additional_options);
41 
42  /// Additional data that is authenticated during establishment of the gRPC
43  /// channel. This string does not need to be null-terminated.
45 
46  /// Assertions offered by the credential holder.
48 
49  /// Peer assertions accepted by the credential holder.
51 
52  /// The accepted ACL for the peer. Failure to match the ACL against the
53  /// authenticated peer's identities will cause gRPC channel establishment to
54  /// fail.
56 };
57 
58 } // namespace asylo
59 
60 #endif // ASYLO_GRPC_AUTH_ENCLAVE_CREDENTIALS_OPTIONS_H_
Options used to configure a ::grpc::ChannelCredentials object or a ::grpc::ServerCredentials object f...
Definition: enclave_credentials_options.h:33
EnclaveCredentialsOptions & Add(const EnclaveCredentialsOptions &additional_options)
Combines the given EnclaveCredentialsOptions with this object.
ABSL_CONST_INIT const char kStatusMoveAssignmentMsg[]
AssertionDescriptionHashSet accepted_peer_assertions
Peer assertions accepted by the credential holder.
Definition: enclave_credentials_options.h:50
std::string additional_authenticated_data
Additional data that is authenticated during establishment of the gRPC channel.
Definition: enclave_credentials_options.h:44
absl::optional< IdentityAclPredicate > peer_acl
The accepted ACL for the peer.
Definition: enclave_credentials_options.h:55
AssertionDescriptionHashSet self_assertions
Assertions offered by the credential holder.
Definition: enclave_credentials_options.h:47