GRPC C++  1.39.1
xds_credentials.h
Go to the documentation of this file.
1 //
2 //
3 // Copyright 2020 gRPC 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 GRPC_CORE_LIB_SECURITY_CREDENTIALS_XDS_XDS_CREDENTIALS_H
20 #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_XDS_XDS_CREDENTIALS_H
21 
23 
24 #include <grpc/grpc_security.h>
25 
28 
29 namespace grpc_core {
30 
31 extern const char kCredentialsTypeXds[];
32 
34  public:
35  explicit XdsCredentials(
36  RefCountedPtr<grpc_channel_credentials> fallback_credentials)
38  fallback_credentials_(std::move(fallback_credentials)) {}
39 
41  RefCountedPtr<grpc_call_credentials> call_creds, const char* target_name,
42  const grpc_channel_args* args, grpc_channel_args** new_args) override;
43 
44  private:
45  RefCountedPtr<grpc_channel_credentials> fallback_credentials_;
46 };
47 
49  public:
51  RefCountedPtr<grpc_server_credentials> fallback_credentials)
53  fallback_credentials_(std::move(fallback_credentials)) {}
54 
56  const grpc_channel_args* /* args */) override;
57 
58  private:
59  RefCountedPtr<grpc_server_credentials> fallback_credentials_;
60 };
61 
63  const char* const* subject_alternative_names,
64  size_t subject_alternative_names_size,
65  const std::vector<StringMatcher>& matchers);
66 
67 } // namespace grpc_core
68 
69 #endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_XDS_XDS_CREDENTIALS_H */
Definition: xds_credentials.h:33
XdsCredentials(RefCountedPtr< grpc_channel_credentials > fallback_credentials)
Definition: xds_credentials.h:35
RefCountedPtr< grpc_channel_security_connector > create_security_connector(RefCountedPtr< grpc_call_credentials > call_creds, const char *target_name, const grpc_channel_args *args, grpc_channel_args **new_args) override
Definition: xds_credentials.cc:118
Definition: xds_credentials.h:48
XdsServerCredentials(RefCountedPtr< grpc_server_credentials > fallback_credentials)
Definition: xds_credentials.h:50
RefCountedPtr< grpc_server_security_connector > create_security_connector(const grpc_channel_args *) override
Definition: xds_credentials.cc:201
Round Robin Policy.
Definition: backend_metric.cc:26
bool TestOnlyXdsVerifySubjectAlternativeNames(const char *const *subject_alternative_names, size_t subject_alternative_names_size, const std::vector< StringMatcher > &matchers)
Definition: xds_credentials.cc:105
const char kCredentialsTypeXds[]
Definition: xds_credentials.cc:32
Definition: async_unary_call.h:398
An array of arguments that can be passed around.
Definition: grpc_types.h:132
Definition: credentials.h:102
Definition: credentials.h:224